Merge branch 'master' into 8030-master-HotFix-PriceDelta
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Pako Natek 2024-09-27 05:47:30 +00:00
commit 86e421f21c
5 changed files with 20 additions and 7 deletions

View File

@ -57,7 +57,7 @@ export default class App {
getUrl(route, appName = 'lilium') {
const index = window.location.hash.indexOf(route.toLowerCase());
const newRoute = index < 0 ? route : window.location.hash.substring(index);
let newRoute = index < 0 ? route : window.location.hash.substring(index);
const env = process.env.NODE_ENV;
const filter = {
where: {and: [
@ -66,6 +66,11 @@ export default class App {
]}
};
if (this.logger.$params.q)
newRoute = newRoute.concat(`?table=${this.logger.$params.q}`);
return this.logger.$http.get('Urls/findOne', {filter})
.then(res => {
if (res && res.data)

View File

@ -366,11 +366,11 @@
"The invoices have been created but the PDFs 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",
"Payment method is required": "El método de pago es obligatorio",
"Cannot send mail": "Não é possível enviar o email",
"Cannot send mail": "No se pudo enviar el correo",
"CONSTRAINT `supplierAccountTooShort` failed for `vn`.`supplier`": "La cuenta debe tener exactamente 10 dígitos",
"The sale not exists in the item shelving": "La venta no existe en la estantería del artículo",
"The entry not have stickers": "La entrada no tiene etiquetas",
"Too many records": "Demasiados registros",
"Original invoice not found": "Factura original no encontrada",
"The entry has no lines or does not exist": "La entrada no tiene lineas o no existe"
}
}

View File

@ -360,6 +360,6 @@
"It was not able to create the invoice": "Não foi possível criar a fatura",
"The invoices have been created but the PDFs could not be generated": "Foi faturado, mas o PDF não pôde ser gerado",
"It has been invoiced but the PDF of refund not be generated": "Foi faturado mas não foi gerado o PDF do reembolso",
"Original invoice not found": "Fatura original não encontrada"
"Original invoice not found": "Fatura original não encontrada",
"Cannot send mail": "Não é possível enviar o email"
}

View File

@ -38,9 +38,13 @@ module.exports = Self => {
const itemShelving = itemShelvingSale.itemShelving();
const quantity = itemShelving.visible + itemShelvingSale.quantity;
const available = itemShelving.available + itemShelvingSale.quantity;
await itemShelving.updateAttributes(
{visible: quantity},
{
visible: quantity,
available: available
},
myOptions
);
if (tx) await tx.commit();

View File

@ -75,7 +75,11 @@ module.exports = Self => {
const itemShelving = await models.ItemShelving.findById(itemShelvingFk, null, myOptions);
await itemShelving.updateAttributes({visible: itemShelving.visible - quantity}, myOptions);
await itemShelving.updateAttributes(
{
visible: itemShelving.visible - quantity,
available: itemShelving.available - quantity
}, myOptions);
await Self.updateAll(
{saleFk},