Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
commit
f7d64e89ab
|
@ -200,6 +200,31 @@ module.exports = Self => {
|
||||||
const toTable = table.toTable;
|
const toTable = table.toTable;
|
||||||
const baseName = table.fileName;
|
const baseName = table.fileName;
|
||||||
|
|
||||||
|
const firstEntry = entries[0];
|
||||||
|
const entryName = firstEntry.entryName;
|
||||||
|
const startIndex = (entryName.length - 10);
|
||||||
|
const endIndex = (entryName.length - 4);
|
||||||
|
const dateString = entryName.substring(startIndex, endIndex);
|
||||||
|
|
||||||
|
const lastUpdated = new Date();
|
||||||
|
|
||||||
|
let updated = null;
|
||||||
|
if (file.updated) {
|
||||||
|
updated = new Date(file.updated);
|
||||||
|
updated.setHours(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Format string date to a date object
|
||||||
|
lastUpdated.setFullYear(`20${dateString.substring(4, 6)}`);
|
||||||
|
lastUpdated.setMonth(parseInt(dateString.substring(2, 4)) - 1);
|
||||||
|
lastUpdated.setDate(dateString.substring(0, 2));
|
||||||
|
lastUpdated.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
if (updated && lastUpdated <= updated) {
|
||||||
|
console.debug(`Table ${toTable} already updated, skipping...`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const tx = await Self.beginTransaction({});
|
const tx = await Self.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
CREATE TABLE `vn`.`mdbBranch` (
|
CREATE TABLE IF NOT EXISTS `vn`.`mdbBranch` (
|
||||||
`name` VARCHAR(255),
|
`name` VARCHAR(255),
|
||||||
PRIMARY KEY(`name`)
|
PRIMARY KEY(`name`)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE `vn`.`mdbVersion` (
|
CREATE TABLE IF NOT EXISTS `vn`.`mdbVersion` (
|
||||||
`app` VARCHAR(255) NOT NULL,
|
`app` VARCHAR(255) NOT NULL,
|
||||||
`branchFk` VARCHAR(255) NOT NULL,
|
`branchFk` VARCHAR(255) NOT NULL,
|
||||||
`version` INT,
|
`version` INT,
|
||||||
CONSTRAINT `mdbVersion_branchFk` FOREIGN KEY (`branchFk`) REFERENCES `vn`.`mdbBranch` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
|
CONSTRAINT `mdbVersion_branchFk` FOREIGN KEY (`branchFk`) REFERENCES `vn`.`mdbBranch` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
|
INSERT IGNORE INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
|
||||||
VALUES('MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer');
|
VALUES(318, 'MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer');
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
vn-id="model"
|
vn-id="model"
|
||||||
url="InvoiceOuts/filter"
|
url="InvoiceOuts/filter"
|
||||||
limit="20"
|
limit="20"
|
||||||
order="issued DESC">
|
order="issued DESC, id DESC">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
<vn-portal slot="topbar">
|
<vn-portal slot="topbar">
|
||||||
<vn-searchbar
|
<vn-searchbar
|
||||||
|
|
|
@ -56,7 +56,7 @@ module.exports = Self => {
|
||||||
salesIds.push(null);
|
salesIds.push(null);
|
||||||
|
|
||||||
const servicesIds = [];
|
const servicesIds = [];
|
||||||
if (services) {
|
if (services && services.length) {
|
||||||
for (let service of services)
|
for (let service of services)
|
||||||
servicesIds.push(service.id);
|
servicesIds.push(service.id);
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
filter="::$ctrl.filter"
|
filter="::$ctrl.filter"
|
||||||
limit="20"
|
limit="20"
|
||||||
data="weeklies"
|
data="weeklies"
|
||||||
order="ticketFk"
|
order="weekDay, ticketFk"
|
||||||
primary-key="ticketFk"
|
primary-key="ticketFk"
|
||||||
auto-load="true">
|
auto-load="true">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
|
|
|
@ -136,7 +136,8 @@ module.exports = {
|
||||||
|
|
||||||
const body = `No se ha podido enviar el albarán <strong>${ticket.id}</strong>
|
const body = `No se ha podido enviar el albarán <strong>${ticket.id}</strong>
|
||||||
al cliente <strong>${ticket.clientFk} - ${ticket.clientName}</strong>
|
al cliente <strong>${ticket.clientFk} - ${ticket.clientName}</strong>
|
||||||
porque la dirección de email <strong>"${ticket.recipient}"</strong> no es correcta o no está disponible.<br/><br/>
|
porque la dirección de email <strong>"${ticket.recipient}"</strong> no es correcta
|
||||||
|
o no está disponible.<br/><br/>
|
||||||
Para evitar que se repita este error, se ha eliminado la dirección de email de la ficha del cliente.
|
Para evitar que se repita este error, se ha eliminado la dirección de email de la ficha del cliente.
|
||||||
Actualiza la dirección de email con una correcta.`;
|
Actualiza la dirección de email con una correcta.`;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue