forked from verdnatura/hedera-web
Packages displayed in delivery notes.
This commit is contained in:
parent
f65b53b567
commit
e5d2bbc2f2
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.405.63) stable; urgency=low
|
||||
hedera-web (1.405.64) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
<vn-group>
|
||||
<vn-param id="ticket-id" on-changed="onTicketChange"/>
|
||||
<vn-hash-param key="ticket" param="ticket-id"/>
|
||||
<db-form id="ticket">
|
||||
<db-model id="ticket-data" property="model">
|
||||
<custom>
|
||||
CALL myTicketGet (#ticket)
|
||||
</custom>
|
||||
<sql-batch property="batch">
|
||||
<sql-batch id="batch">
|
||||
<custom>
|
||||
<item name="ticket" param="ticket-id"/>
|
||||
</custom>
|
||||
</sql-batch>
|
||||
<db-form id="ticket">
|
||||
<db-model id="ticket-data" property="model" batch="batch">
|
||||
<custom>
|
||||
CALL myTicketGet (#ticket)
|
||||
</custom>
|
||||
</db-model>
|
||||
</db-form>
|
||||
</vn-group>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<div class="head">
|
||||
<div>
|
||||
<p class="important ticket-id">
|
||||
<htk-text column="id" form="ticket"/>
|
||||
@<htk-text column="id" form="ticket"/>
|
||||
</p>
|
||||
<p>
|
||||
<htk-text form="ticket" column="landed" format="%D"/>
|
||||
|
@ -63,18 +63,23 @@
|
|||
</div>
|
||||
</div>
|
||||
<htk-repeater form-id="iter" renderer="repeaterFunc">
|
||||
<db-model property="model" id="movements">
|
||||
<db-model
|
||||
property="model"
|
||||
id="movements"
|
||||
batch="batch">
|
||||
<custom>
|
||||
CALL myTicketGetRows (#ticket)
|
||||
</custom>
|
||||
<sql-batch property="batch">
|
||||
<custom>
|
||||
<item name="ticket" param="ticket-id"/>
|
||||
</custom>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
<custom>
|
||||
<div class="line">
|
||||
<htk-image
|
||||
form="iter"
|
||||
column="image"
|
||||
class="photo"
|
||||
directory="catalog"
|
||||
subdir="200x200"
|
||||
full-dir="900x900"/>
|
||||
<p class="concept">
|
||||
<htk-text form="iter" column="concept"/>
|
||||
<htk-text form="iter" column="size"/>
|
||||
|
@ -91,6 +96,37 @@
|
|||
</div>
|
||||
</custom>
|
||||
</htk-repeater>
|
||||
<htk-repeater form-id="iter" id="packages" class="packages">
|
||||
<db-model
|
||||
property="model"
|
||||
on-status-changed="onPackagesChanged"
|
||||
batch="batch">
|
||||
<custom>
|
||||
CALL myTicketGetPackages (#ticket)
|
||||
</custom>
|
||||
</db-model>
|
||||
<custom>
|
||||
<div class="line">
|
||||
<htk-image
|
||||
form="iter"
|
||||
column="image"
|
||||
class="photo"
|
||||
directory="catalog"
|
||||
subdir="200x200"
|
||||
full-dir="900x900"/>
|
||||
<p class="subtotal">
|
||||
<htk-text form="iter" column="quantity"/>
|
||||
</p>
|
||||
<p class="concept">
|
||||
<htk-text form="iter" column="name"/>
|
||||
</p>
|
||||
<p class="amount">
|
||||
@<htk-text form="iter" column="id"/>
|
||||
</p>
|
||||
<div class="clear"/>
|
||||
</div>
|
||||
</custom>
|
||||
</htk-repeater>
|
||||
</div>
|
||||
</div>
|
||||
</vn>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.405.63",
|
||||
"version": "1.405.64",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
});
|
||||
|
|
|
@ -33,4 +33,10 @@ h2
|
|||
border-top: 1px solid #333;
|
||||
padding-top: .3em;
|
||||
}
|
||||
|
||||
.packages
|
||||
{
|
||||
width: 50%;
|
||||
padding-top: 1em;
|
||||
margin-left: 0;
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -54,5 +54,19 @@
|
|||
<t>Total + tax</t>
|
||||
<htk-text format="%.2d€" form="ticket" column="total"/>
|
||||
</p>
|
||||
<htk-grid id="packages" class="packages">
|
||||
<db-model
|
||||
property="model"
|
||||
conn="conn"
|
||||
batch="batch"
|
||||
on-status-changed="onPackagesChanged">
|
||||
<custom>
|
||||
CALL myTicketGetPackages (#ticket)
|
||||
</custom>
|
||||
</db-model>
|
||||
<htk-column-spin title="_Ref" column="id"/>
|
||||
<htk-column-spin title="_Amount" column="quantity"/>
|
||||
<htk-column-text title="_Item" column="name"/>
|
||||
</htk-grid>
|
||||
</div>
|
||||
</vn>
|
||||
|
|
Loading…
Reference in New Issue