Merge branch '2985-invoiceOut_manual' of https://gitea.verdnatura.es/verdnatura/salix into 2984-invoiceOut_global
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Joan Sanchez 2021-08-09 13:00:41 +02:00
commit 3a45c99594
4 changed files with 6 additions and 10 deletions

View File

@ -80,14 +80,11 @@ module.exports = Self => {
throw new UserError('This ticket is already invoiced');
// Validates ticket amount
if (ticket.totalWithVat == 0) {
// Change state to delivered
if (ticket.totalWithVat == 0)
throw new UserError(`A ticket with an amount of zero can't be invoiced`);
}
// Validates ticket nagative base
const hasNegativeBase = await getNegativeBase(ticketId, myOptions);
if (hasNegativeBase && company.code == 'VNL')
throw new UserError(`A ticket with a negative base can't be invoiced`);
} else {
@ -104,9 +101,6 @@ module.exports = Self => {
companyId = company.companyFk;
}
// Set shipped at night
maxShipped.setHours(23, 59, 59, 59);
// Validate invoiceable client
const isClientInvoiceable = await isInvoiceable(clientId, myOptions);
if (!isClientInvoiceable)

View File

@ -60,7 +60,7 @@
<div fixed-bottom-right>
<vn-vertical style="align-items: center;">
<vn-button class="round sm vn-mb-sm"
icon="icon-invoices"
icon="add"
ng-click="invoicingOptions.show($event)"
vn-tooltip="Make invoice..."
tooltip-position="left"

View File

@ -5,3 +5,4 @@ Has PDF: PDF disponible
Minimum: Minimo
Maximum: Máximo
Global invoicing: Facturación global
Manual invoicing: Facturación manual

View File

@ -2,3 +2,4 @@ Create manual invoice: Crear factura manual
Some fields are required: Algunos campos son obligatorios
Client and max shipped fields should be filled: Los campos de cliente y fecha límite deben rellenarse
Max date: Fecha límite
Serial: Serie