From e5d2bbc2f2f8d96cef333946aca80efc6cc7c009 Mon Sep 17 00:00:00 2001
From: Juan Ferrer Toribio
Date: Fri, 5 Jan 2018 13:57:35 +0100
Subject: [PATCH] Packages displayed in delivery notes.
---
debian/changelog | 2 +-
forms/ecomerce/ticket/style.css | 15 +++++++
forms/ecomerce/ticket/ticket.js | 6 +++
forms/ecomerce/ticket/ui.xml | 62 ++++++++++++++++++++------
package.json | 2 +-
reports/delivery-note/delivery-note.js | 6 +++
reports/delivery-note/style.css | 8 +++-
reports/delivery-note/ui.xml | 14 ++++++
8 files changed, 99 insertions(+), 16 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 7422bead..f96c6c4a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-hedera-web (1.405.63) stable; urgency=low
+hedera-web (1.405.64) stable; urgency=low
* Initial Release.
diff --git a/forms/ecomerce/ticket/style.css b/forms/ecomerce/ticket/style.css
index f815ff9e..f6c6a1b6 100644
--- a/forms/ecomerce/ticket/style.css
+++ b/forms/ecomerce/ticket/style.css
@@ -35,9 +35,24 @@
{
text-align: right;
}
+.ticket .packages
+{
+ margin-top: 1em;
+ padding-top: 1em;
+ border-top: 1px solid #DDD;
+ display: block;
+}
/* Lines */
+.ticket .line > .photo
+{
+ margin-right: 1em;
+ float: left;
+ border-radius: 50%;
+ height: 3.2em;
+ width: 3.2em;
+}
.ticket .line
{
padding: .5em 0;
diff --git a/forms/ecomerce/ticket/ticket.js b/forms/ecomerce/ticket/ticket.js
index 2cfcf4fe..bd34d1bb 100644
--- a/forms/ecomerce/ticket/ticket.js
+++ b/forms/ecomerce/ticket/ticket.js
@@ -36,5 +36,11 @@ Hedera.Ticket = new Class
var discount = form.get ('discount');
return form.get ('quantity') * price * ((100 - discount) / 100);
}
+
+ ,onPackagesChanged: function (model)
+ {
+ this.$('packages').node.style.display =
+ model.numRows > 0 ? 'block' : 'none';
+ }
});
diff --git a/forms/ecomerce/ticket/ui.xml b/forms/ecomerce/ticket/ui.xml
index 2f52b77d..6faa6287 100644
--- a/forms/ecomerce/ticket/ui.xml
+++ b/forms/ecomerce/ticket/ui.xml
@@ -2,16 +2,16 @@
+
+
+
+
+
-
+
CALL myTicketGet (#ticket)
-
-
-
-
-
@@ -29,7 +29,7 @@
-
+ @
@@ -63,18 +63,23 @@
-
+
CALL myTicketGetRows (#ticket)
-
-
-
-
-
+
+
+
+ CALL myTicketGetPackages (#ticket)
+
+
+
+
+
+
+
+
+
+
+
+
+ @
+
+
+
+
+
diff --git a/package.json b/package.json
index 1c3e3f5a..892174c5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hedera-web",
- "version": "1.405.63",
+ "version": "1.405.64",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {
diff --git a/reports/delivery-note/delivery-note.js b/reports/delivery-note/delivery-note.js
index 3a708bdc..1319c655 100644
--- a/reports/delivery-note/delivery-note.js
+++ b/reports/delivery-note/delivery-note.js
@@ -14,4 +14,10 @@ Hedera.DeliveryNote = new Class
var discount = form.get ('discount');
return form.get ('quantity') * price * ((100 - discount) / 100);
}
+
+ ,onPackagesChanged: function (model)
+ {
+ this.$('packages').node.style.display =
+ model.numRows > 0 ? 'block' : 'none';
+ }
});
diff --git a/reports/delivery-note/style.css b/reports/delivery-note/style.css
index 66a8d98f..23eb2f6b 100644
--- a/reports/delivery-note/style.css
+++ b/reports/delivery-note/style.css
@@ -33,4 +33,10 @@ h2
border-top: 1px solid #333;
padding-top: .3em;
}
-
+.packages
+{
+ width: 50%;
+ padding-top: 1em;
+ margin-left: 0;
+ display: none;
+}
diff --git a/reports/delivery-note/ui.xml b/reports/delivery-note/ui.xml
index c99fa713..7869e4c8 100644
--- a/reports/delivery-note/ui.xml
+++ b/reports/delivery-note/ui.xml
@@ -54,5 +54,19 @@
Total + tax
+
+
+
+ CALL myTicketGetPackages (#ticket)
+
+
+
+
+
+