test
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Javi Gallego 2021-11-18 08:21:02 +01:00
parent dc42c18ead
commit d46c590ccb
4 changed files with 23 additions and 4 deletions

View File

@ -0,0 +1,20 @@
const models = require('vn-loopback/server/server').models;
describe('invoiceIn getTotals()', () => {
it('should check that returns invoiceIn totals', async() => {
const invoiceInId = 1;
const tx = await models.InvoiceIn.beginTransaction({});
const options = {transaction: tx};
try {
const invoiceIntotals = await models.InvoiceIn.getTotals(invoiceInId, options);
expect(invoiceIntotals.totalTaxableBase).toEqual(invoiceIntotals.totalDueDay);
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;
}
});
});

View File

@ -1,5 +1,3 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => { module.exports = Self => {
Self.remoteMethodCtx('toBook', { Self.remoteMethodCtx('toBook', {
description: 'To book the invoiceIn', description: 'To book the invoiceIn',

View File

@ -74,6 +74,6 @@
</vn-supplier-descriptor-popover> </vn-supplier-descriptor-popover>
<vn-confirm <vn-confirm
vn-id="confirm-toBookAnyway" vn-id="confirm-toBookAnyway"
message="???" message="Are you sure you want to book this invoice?"
on-accept="$ctrl.onAcceptToBook()"> on-accept="$ctrl.onAcceptToBook()">
</vn-confirm> </vn-confirm>

View File

@ -14,4 +14,5 @@ InvoiceOut booked: Factura asentada
Are you sure you want to book this invoice?: Estas seguro de querer asentar esta factura? Are you sure you want to book this invoice?: Estas seguro de querer asentar esta factura?
Regenerate PDF invoice: Regenerar PDF factura Regenerate PDF invoice: Regenerar PDF factura
The invoice PDF document has been regenerated: El documento PDF de la factura ha sido regenerado The invoice PDF document has been regenerated: El documento PDF de la factura ha sido regenerado
The email can't be empty: El correo no puede estar vacío The email can't be empty: El correo no puede estar vacío
Are you sure you want to book this invoice?: Estas seguro de contabilizar esta factura?