diff --git a/db/dump/.dump/data.sql b/db/dump/.dump/data.sql
index f45773735..cd978e4a8 100644
--- a/db/dump/.dump/data.sql
+++ b/db/dump/.dump/data.sql
@@ -2128,7 +2128,7 @@ INSERT INTO `ACL` VALUES (746,'Claim','getSummary','READ','ALLOW','ROLE','claimV
INSERT INTO `ACL` VALUES (747,'CplusRectificationType','*','READ','ALLOW','ROLE','administrative',NULL);
INSERT INTO `ACL` VALUES (748,'SiiTypeInvoiceOut','*','READ','ALLOW','ROLE','salesPerson',NULL);
INSERT INTO `ACL` VALUES (749,'InvoiceCorrectionType','*','READ','ALLOW','ROLE','salesPerson',NULL);
-INSERT INTO `ACL` VALUES (750,'InvoiceOut','transferInvoice','WRITE','ALLOW','ROLE','administrative',NULL);
+INSERT INTO `ACL` VALUES (750,'InvoiceOut','transfer','WRITE','ALLOW','ROLE','administrative',NULL);
INSERT INTO `ACL` VALUES (751,'Application','executeProc','*','ALLOW','ROLE','employee',NULL);
INSERT INTO `ACL` VALUES (752,'Application','executeFunc','*','ALLOW','ROLE','employee',NULL);
INSERT INTO `ACL` VALUES (753,'NotificationSubscription','getList','READ','ALLOW','ROLE','employee',NULL);
diff --git a/db/versions/11376-pinkBamboo/00-firstScript.sql b/db/versions/11376-pinkBamboo/00-firstScript.sql
new file mode 100644
index 000000000..0c1e71a2f
--- /dev/null
+++ b/db/versions/11376-pinkBamboo/00-firstScript.sql
@@ -0,0 +1,2 @@
+ALTER TABLE vn.`zone` MODIFY COLUMN `price` DECIMAL(10,2);
+
diff --git a/loopback/locale/en.json b/loopback/locale/en.json
index 7372ac9a6..002a3307e 100644
--- a/loopback/locale/en.json
+++ b/loopback/locale/en.json
@@ -247,5 +247,7 @@
"The raid information is not correct": "The raid information is not correct",
"Payment method is required": "Payment method is required",
"Sales already moved": "Sales already moved",
- "Holidays to past days not available": "Holidays to past days not available"
+ "Holidays to past days not available": "Holidays to past days not available",
+ "There are tickets to be invoiced": "There are tickets to be invoiced for this zone, please delete them first",
+ "Price cannot be blank": "Price cannot be blank"
}
diff --git a/loopback/locale/es.json b/loopback/locale/es.json
index 5f595e1ae..a47195d07 100644
--- a/loopback/locale/es.json
+++ b/loopback/locale/es.json
@@ -397,5 +397,6 @@
"No address has coordinates": "Ninguna dirección tiene coordenadas",
"An item type with the same code already exists": "Un tipo con el mismo código ya existe",
"Holidays to past days not available": "Las vacaciones a días pasados no están disponibles",
- "All tickets have a route order": "Todos los tickets tienen orden de ruta"
-}
\ No newline at end of file
+ "All tickets have a route order": "Todos los tickets tienen orden de ruta",
+ "Price cannot be blank": "Price cannot be blank"
+}
diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js
index a681ebc83..95713f9fb 100644
--- a/modules/monitor/back/methods/sales-monitor/salesFilter.js
+++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js
@@ -89,6 +89,11 @@ module.exports = Self => {
type: 'number',
description: `The alert level of the tickets`
},
+ {
+ arg: 'packing',
+ type: 'string',
+ description: `The packing of the items`
+ },
{
arg: 'countryFk',
type: 'number',
@@ -174,7 +179,7 @@ module.exports = Self => {
stmt = new ParameterizedSQL(`
CREATE OR REPLACE TEMPORARY TABLE tmp.filter
(PRIMARY KEY (id))
- ENGINE = MEMORY
+ ENGINE = InnoDB
SELECT t.id,
t.shipped,
CAST(DATE(t.shipped) AS CHAR) shippedDate,
@@ -200,10 +205,18 @@ module.exports = Self => {
u.name userName,
c.salesPersonFk,
c.credit,
+ pm.name payMethod,
z.hour zoneLanding,
z.name zoneName,
z.id zoneFk,
st.classColor,
+ d.id departmentFk,
+ d.name department,
+ (SELECT GROUP_CONCAT(DISTINCT i.itemPackingTypeFk ORDER BY i.itemPackingTypeFk SEPARATOR ',')
+ FROM sale s
+ JOIN item i ON i.id = s.itemFk
+ WHERE s.ticketFk = t.id
+ ) AS packing,
TIME_FORMAT(t.shipped, '%H:%i') preparationHour,
TIME_FORMAT(z.hour, '%H:%i') theoreticalhour,
TIME_FORMAT(zed.etc, '%H:%i') practicalHour
@@ -217,7 +230,10 @@ module.exports = Self => {
LEFT JOIN ticketState ts ON ts.ticketFk = t.id
LEFT JOIN state st ON st.id = ts.stateFk
LEFT JOIN client c ON c.id = t.clientFk
+ LEFT JOIN payMethod pm ON pm.id = c.payMethodFk
LEFT JOIN worker wk ON wk.id = c.salesPersonFk
+ LEFT JOIN workerDepartment wd ON wd.workerFk = wk.id
+ LEFT JOIN department d ON d.id = wd.departmentFk
LEFT JOIN account.user u ON u.id = wk.id
LEFT JOIN (
SELECT zoneFk,
@@ -362,6 +378,7 @@ module.exports = Self => {
}
case 'agencyModeFk':
case 'warehouseFk':
+ case 'packing':
case 'countryFk':
param = `f.${param}`;
return {[param]: value};
diff --git a/modules/ticket/back/methods/expedition/filter.js b/modules/ticket/back/methods/expedition/filter.js
index 43be14349..bd2012668 100644
--- a/modules/ticket/back/methods/expedition/filter.js
+++ b/modules/ticket/back/methods/expedition/filter.js
@@ -49,7 +49,8 @@ module.exports = Self => {
es.workerFk expeditionScanWorkerFk,
su.name scannerUserName,
es.scanned,
- est.description state
+ est.description state,
+ de.longName
FROM vn.expedition e
LEFT JOIN vn.expeditionStateType est ON est.id = e.stateTypeFk
INNER JOIN vn.item i1 ON i1.id = e.freightItemFk
@@ -59,6 +60,7 @@ module.exports = Self => {
LEFT JOIN account.user u ON u.id = e.workerFk
LEFT JOIN vn.expeditionScan es ON es.expeditionFk = e.id
LEFT JOIN account.user su ON su.id = es.workerFk
+ LEFT JOIN dipole.expedition_PrintOut de ON de.expeditionFk = e.id
) e
`);
stmt.merge(conn.makeWhere(filter.where));
diff --git a/modules/zone/back/models/zone.js b/modules/zone/back/models/zone.js
index 6d5a6cdca..7b5cb4301 100644
--- a/modules/zone/back/models/zone.js
+++ b/modules/zone/back/models/zone.js
@@ -14,4 +14,18 @@ module.exports = Self => {
Self.validatesPresenceOf('agencyModeFk', {
message: `Agency cannot be blank`
});
+
+ Self.validatesPresenceOf('price', {
+ message: 'Price cannot be blank'
+ });
+ Self.validateAsync('price', priceIsValid, {
+ message: 'Price must be greater than 0'
+ });
+
+ async function priceIsValid(err, done) {
+ if (this.price <= 0)
+ err();
+
+ done();
+ }
};
diff --git a/print/templates/email/incoterms-authorization/locale/en.yml b/print/templates/email/incoterms-authorization/locale/en.yml
new file mode 100644
index 000000000..7e1402575
--- /dev/null
+++ b/print/templates/email/incoterms-authorization/locale/en.yml
@@ -0,0 +1,6 @@
+subject: Incoterms Authorization
+title: Incoterms Authorization
+description:
+ dear: Dear customer
+ instructions: Please find attached the Incoterms authorization form, which you must complete and sign.
+ conclusion: Thank you for your attention!
diff --git a/print/templates/reports/balance-compensation/locale/en.yml b/print/templates/reports/balance-compensation/locale/en.yml
new file mode 100644
index 000000000..824127482
--- /dev/null
+++ b/print/templates/reports/balance-compensation/locale/en.yml
@@ -0,0 +1,16 @@
+reportName: balance-compensation
+Place: Algemesí, on
+Compensation: Compensation of debtor and creditor balances
+In one hand: On one hand
+CIF: with CIF
+NIF: with NIF
+Home: and address located at
+In other hand: On the other hand
+Sr: Mr./Ms.
+Agree: Agree
+Date: On the date of
+Compensate: the balance of has been compensated
+From client: from the client/supplier
+Against the balance of: against the balance of
+Reception: Please confirm receipt of this compensation at the email
+Greetings: Best regards,
diff --git a/print/templates/reports/incoterms-authorization/locale/en.yml b/print/templates/reports/incoterms-authorization/locale/en.yml
new file mode 100644
index 000000000..eb6a8a513
--- /dev/null
+++ b/print/templates/reports/incoterms-authorization/locale/en.yml
@@ -0,0 +1,39 @@
+reportName: autorization-incoterms
+description: '{socialName} a duly constituted and responsible company limited
+and registered under corporate law {country} and here represented by {socialName}, with address in {address},
+CIF {fiscalID}. Hereinafter referred to as {name}.'
+issued: 'In {0}, on {1} of {2} of {3}'
+client: 'Customer {0}'
+declaration: '{socialName} hereby declares that:'
+declarations:
+ - 'All purchases made by {socialName} with {companyName} They are delivered according to the conditions defined in the Incoterm.'
+ - '{socialName} recognizes that it is important for {companyName} have
+proof of intra-community delivery of the goods to {destinationCountry} to
+be able to invoice with 0% VAT.'
+ - 'Therefore, by signing this agreement, {socialName} declares that all goods
+purchased from {companyName} will be delivered to {destinationCountry}.'
+ - 'Besides, {socialName} shall, at the first request of {companyName},
+provide proof that all products purchased from {companyName} have
+been delivered in {destinationCountry}.'
+ - 'In addition to the above, {companyName} will provide to {socialName}
+a monthly summary that includes all bills (and corresponding deliveries).
+{socialName} will sign and return the monthly summary to {companyName},
+S.L. within 5 days of receiving the summary.'
+signer:
+ representative: Representative
+ representativeRole: Position of the representative
+ signed: Date of signature
+manager: Manager
+months:
+ - 'January'
+ - 'February'
+ - 'March'
+ - 'April'
+ - 'May'
+ - 'June'
+ - 'July'
+ - 'August'
+ - 'September'
+ - 'October'
+ - 'November'
+ - 'December'