Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6998-supplierMigration
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-06-20 05:52:06 +02:00
commit 7619fa74ba
9 changed files with 23 additions and 23 deletions

View File

@ -5,10 +5,10 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplierPackaging_R
) )
BEGIN BEGIN
/** /**
* Selecciona los embalajes de un proveedor a partir de una fecha * Create a report with packaging balance
* *
* @param vFromDated Fecha de la que partir * @param vFromDated Starting date
* @param vSupplierFk Id del proveedor * @param vSupplierFk Supplier ID
*/ */
SET @vBalance = 0; SET @vBalance = 0;
SET @vItemFk = NULL; SET @vItemFk = NULL;
@ -99,6 +99,7 @@ BEGIN
WHERE su.id = vSupplierFk WHERE su.id = vSupplierFk
AND t.shipped < vFromDated AND t.shipped < vFromDated
AND p.isPackageReturnable AND p.isPackageReturnable
AND NOT t.isDeleted
GROUP BY s.itemFk GROUP BY s.itemFk
UNION ALL UNION ALL
SELECT vSupplierFk, SELECT vSupplierFk,
@ -138,8 +139,9 @@ BEGIN
JOIN client c ON c.id = t.clientFk JOIN client c ON c.id = t.clientFk
JOIN supplier su ON su.nif = c.fi JOIN supplier su ON su.nif = c.fi
WHERE su.id = vSupplierFk WHERE su.id = vSupplierFk
AND t.shipped >= vFromDated AND t.shipped < vFromDated
AND p.isPackageReturnable AND p.isPackageReturnable
AND NOT t.isDeleted
GROUP BY p.itemFk GROUP BY p.itemFk
ORDER BY itemFk, landed, entryFk ORDER BY itemFk, landed, entryFk
) sub ) sub

View File

@ -0,0 +1,3 @@
ALTER TABLE vn.client
CHANGE hasIncoterms hasIncoterms__ tinyint(1) DEFAULT 0 NOT NULL
COMMENT '@deprecated 2024-06-12 refs #7545 Received incoterms authorization from client';

View File

@ -232,5 +232,6 @@
"Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member", "Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member",
"It has been invoiced but the PDF could not be generated": "It has been invoiced but the PDF could not be generated", "It has been invoiced but the PDF could not be generated": "It has been invoiced but the PDF could not be generated",
"It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated", "It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated",
"Cannot add holidays on this day": "Cannot add holidays on this day" "Cannot add holidays on this day": "Cannot add holidays on this day",
} "Cannot send mail": "Cannot send mail"
}

View File

@ -365,5 +365,6 @@
"You can only have one PDA": "Solo puedes tener un PDA", "You can only have one PDA": "Solo puedes tener un PDA",
"It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF", "It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF",
"It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono", "It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono",
"Payment method is required": "El método de pago es obligatorio" "Payment method is required": "El método de pago es obligatorio",
} "Cannot send mail": "Não é possível enviar o email"
}

View File

@ -359,5 +359,6 @@
"Select ticket or client": "Choisissez un ticket ou un client", "Select ticket or client": "Choisissez un ticket ou un client",
"It was not able to create the invoice": "Il n'a pas été possible de créer la facture", "It was not able to create the invoice": "Il n'a pas été possible de créer la facture",
"It has been invoiced but the PDF could not be generated": "La facture a été émise mais le PDF n'a pas pu être généré", "It has been invoiced but the PDF could not be generated": "La facture a été émise mais le PDF n'a pas pu être généré",
"It has been invoiced but the PDF of refund not be generated": "Il a été facturé mais le PDF de remboursement n'a pas été généré" "It has been invoiced but the PDF of refund not be generated": "Il a été facturé mais le PDF de remboursement n'a pas été généré",
"Cannot send mail": "Impossible d'envoyer le mail"
} }

View File

@ -96,10 +96,6 @@ module.exports = Self => {
arg: 'despiteOfClient', arg: 'despiteOfClient',
type: 'any' type: 'any'
}, },
{
arg: 'hasIncoterms',
type: 'boolean'
},
{ {
arg: 'hasElectronicInvoice', arg: 'hasElectronicInvoice',
type: 'boolean' type: 'boolean'

View File

@ -97,9 +97,6 @@
"hasCoreVnh": { "hasCoreVnh": {
"type": "boolean" "type": "boolean"
}, },
"hasIncoterms": {
"type": "boolean"
},
"isTaxDataChecked":{ "isTaxDataChecked":{
"type": "boolean" "type": "boolean"
}, },

View File

@ -184,11 +184,6 @@
</vn-check> </vn-check>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-check
label="Incoterms authorization"
ng-model="$ctrl.client.hasIncoterms"
vn-acl="administrative">
</vn-check>
<vn-check <vn-check
label="Electronic invoice" label="Electronic invoice"
ng-model="$ctrl.client.hasElectronicInvoice" ng-model="$ctrl.client.hasElectronicInvoice"

View File

@ -2,6 +2,7 @@ const path = require('path');
const smtp = require('./smtp'); const smtp = require('./smtp');
const Component = require('./component'); const Component = require('./component');
const Report = require('./report'); const Report = require('./report');
const UserError = require('vn-loopback/util/user-error');
if (!process.env.OPENSSL_CONF) if (!process.env.OPENSSL_CONF)
process.env.OPENSSL_CONF = '/etc/ssl/'; process.env.OPENSSL_CONF = '/etc/ssl/';
@ -9,7 +10,6 @@ if (!process.env.OPENSSL_CONF)
class Email extends Component { class Email extends Component {
constructor(name, args) { constructor(name, args) {
super(name); super(name);
this.args = args; this.args = args;
} }
@ -88,7 +88,11 @@ class Email extends Component {
force: options.force force: options.force
}; };
return await smtp.send(mailOptions); try {
return await smtp.send(mailOptions);
} catch (error) {
throw new UserError('Cannot send mail');
}
} }
} }