Ammends
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
8b005ae012
commit
d4b1105cda
|
@ -80,14 +80,11 @@ module.exports = Self => {
|
||||||
throw new UserError('This ticket is already invoiced');
|
throw new UserError('This ticket is already invoiced');
|
||||||
|
|
||||||
// Validates ticket amount
|
// Validates ticket amount
|
||||||
if (ticket.totalWithVat == 0) {
|
if (ticket.totalWithVat == 0)
|
||||||
// Change state to delivered
|
|
||||||
throw new UserError(`A ticket with an amount of zero can't be invoiced`);
|
throw new UserError(`A ticket with an amount of zero can't be invoiced`);
|
||||||
}
|
|
||||||
|
|
||||||
// Validates ticket nagative base
|
// Validates ticket nagative base
|
||||||
const hasNegativeBase = await getNegativeBase(ticketId, myOptions);
|
const hasNegativeBase = await getNegativeBase(ticketId, myOptions);
|
||||||
|
|
||||||
if (hasNegativeBase && company.code == 'VNL')
|
if (hasNegativeBase && company.code == 'VNL')
|
||||||
throw new UserError(`A ticket with a negative base can't be invoiced`);
|
throw new UserError(`A ticket with a negative base can't be invoiced`);
|
||||||
} else {
|
} else {
|
||||||
|
@ -104,9 +101,6 @@ module.exports = Self => {
|
||||||
companyId = company.companyFk;
|
companyId = company.companyFk;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set shipped at night
|
|
||||||
maxShipped.setHours(23, 59, 59, 59);
|
|
||||||
|
|
||||||
// Validate invoiceable client
|
// Validate invoiceable client
|
||||||
const isClientInvoiceable = await isInvoiceable(clientId, myOptions);
|
const isClientInvoiceable = await isInvoiceable(clientId, myOptions);
|
||||||
if (!isClientInvoiceable)
|
if (!isClientInvoiceable)
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<div fixed-bottom-right>
|
<div fixed-bottom-right>
|
||||||
<vn-vertical style="align-items: center;">
|
<vn-vertical style="align-items: center;">
|
||||||
<vn-button class="round sm vn-mb-sm"
|
<vn-button class="round sm vn-mb-sm"
|
||||||
icon="icon-invoices"
|
icon="add"
|
||||||
ng-click="invoicingOptions.show($event)"
|
ng-click="invoicingOptions.show($event)"
|
||||||
vn-tooltip="Make invoice..."
|
vn-tooltip="Make invoice..."
|
||||||
tooltip-position="left"
|
tooltip-position="left"
|
||||||
|
|
|
@ -4,3 +4,4 @@ Due date: Fecha vencimiento
|
||||||
Has PDF: PDF disponible
|
Has PDF: PDF disponible
|
||||||
Minimum: Minimo
|
Minimum: Minimo
|
||||||
Maximum: Máximo
|
Maximum: Máximo
|
||||||
|
Manual invoicing: Facturación manual
|
Loading…
Reference in New Issue