2293 - getVolume() call to saleVolume
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
a66cc4a36d
commit
dddfe2773a
|
@ -20,7 +20,7 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.getVolume = async ticketFk => {
|
Self.getVolume = async ticketFk => {
|
||||||
let [volume] = await Self.rawSql(`CALL vn.ticketListVolume(?)`, [ticketFk]);
|
return Self.rawSql(`SELECT * FROM vn.saleVolume
|
||||||
return volume;
|
WHERE ticketFk = ?`, [ticketFk]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@ describe('ticket getVolume()', () => {
|
||||||
let ticketFk = 1;
|
let ticketFk = 1;
|
||||||
await app.models.Ticket.getVolume(ticketFk)
|
await app.models.Ticket.getVolume(ticketFk)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
expect(response[0].m3).toEqual(1.09);
|
expect(response[0].volume).toEqual(1.09);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
sub-name="::sale.item.subName"/>
|
sub-name="::sale.item.subName"/>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td number>{{::sale.quantity}}</vn-td>
|
<vn-td number>{{::sale.quantity}}</vn-td>
|
||||||
<vn-td number>{{::sale.volume.m3 | number:3}}</vn-td>
|
<vn-td number>{{::sale.saleVolume.volume | number:3}}</vn-td>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
</vn-tbody>
|
</vn-tbody>
|
||||||
</vn-table>
|
</vn-table>
|
||||||
|
|
|
@ -39,7 +39,7 @@ class Controller extends Section {
|
||||||
this.sales.forEach(sale => {
|
this.sales.forEach(sale => {
|
||||||
this.volumes.forEach(volume => {
|
this.volumes.forEach(volume => {
|
||||||
if (sale.id === volume.saleFk)
|
if (sale.id === volume.saleFk)
|
||||||
sale.volume = volume;
|
sale.saleVolume = volume;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue