SQL refactor
This commit is contained in:
parent
b56a12c341
commit
7f2f0372b3
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.405.99) stable; urgency=low
|
||||
hedera-web (1.406.01) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -212,11 +212,11 @@
|
|||
conn="conn"
|
||||
result-index="1"
|
||||
on-status-changed="refreshTitle">
|
||||
CALL item_available ();
|
||||
CALL itemGetAvailable;
|
||||
SELECT DISTINCT t.id, l.name
|
||||
FROM vn.item i
|
||||
JOIN vn.itemType t ON t.id = i.typeFk
|
||||
JOIN tmp.item_available a ON a.item_id = i.id
|
||||
JOIN tmp.itemAvailable a ON a.id = i.id
|
||||
JOIN vn.itemTypeL10n l ON l.id = t.id
|
||||
WHERE #filter
|
||||
ORDER BY name
|
||||
|
@ -232,11 +232,11 @@
|
|||
placeholder="_Color"
|
||||
param="color">
|
||||
<db-model property="model" auto-load="false" result-index="1">
|
||||
CALL item_available ();
|
||||
CALL itemGetAvailable;
|
||||
SELECT DISTINCT l.id, l.name
|
||||
FROM vn.item i
|
||||
JOIN vn.itemType t ON t.id = i.typeFk
|
||||
JOIN tmp.item_available a ON a.item_id = i.id
|
||||
JOIN tmp.itemAvailable a ON a.id = i.id
|
||||
JOIN vn.inkL10n l ON l.id = i.inkFk
|
||||
WHERE #filter
|
||||
ORDER BY name
|
||||
|
@ -254,11 +254,11 @@
|
|||
placeholder="_Producer"
|
||||
param="producer">
|
||||
<db-model property="model" auto-load="false" result-index="1">
|
||||
CALL item_available ();
|
||||
CALL itemGetAvailable;
|
||||
SELECT DISTINCT p.id, p.name
|
||||
FROM vn.item i
|
||||
JOIN vn.itemType t ON t.id = i.typeFk
|
||||
JOIN tmp.item_available a ON a.item_id = i.id
|
||||
JOIN tmp.itemAvailable a ON a.id = i.id
|
||||
JOIN vn.producer p ON p.id = i.producerFk
|
||||
WHERE #filter
|
||||
ORDER BY name
|
||||
|
@ -276,11 +276,11 @@
|
|||
placeholder="_Origin"
|
||||
param="origin">
|
||||
<db-model property="model" auto-load="false" result-index="1">
|
||||
CALL item_available ();
|
||||
CALL itemGetAvailable;
|
||||
SELECT DISTINCT o.id, l.name, o.code
|
||||
FROM vn.item i
|
||||
JOIN vn.itemType t ON t.id = i.typeFk
|
||||
JOIN tmp.item_available a ON a.item_id = i.id
|
||||
JOIN tmp.itemAvailable a ON a.id = i.id
|
||||
JOIN vn.origin o ON o.id = i.originFk
|
||||
JOIN vn.originL10n l ON l.id = o.id
|
||||
WHERE #filter
|
||||
|
@ -299,11 +299,11 @@
|
|||
placeholder="_Category"
|
||||
param="category">
|
||||
<db-model property="model" auto-load="false" result-index="1">
|
||||
CALL item_available ();
|
||||
CALL itemGetAvailable;
|
||||
SELECT DISTINCT i.category, i.category
|
||||
FROM vn.item i
|
||||
JOIN vn.itemType t ON t.id = i.typeFk
|
||||
JOIN tmp.item_available a ON a.item_id = i.id
|
||||
JOIN tmp.itemAvailable a ON a.id = i.id
|
||||
WHERE #filter
|
||||
ORDER BY category
|
||||
</db-model>
|
||||
|
|
|
@ -162,7 +162,7 @@ Hedera.Confirm = new Class
|
|||
var payAmount = this.$('total-amount').value;
|
||||
|
||||
var tpv = new Hedera.Tpv ({conn: this.conn});
|
||||
tpv.pay (payAmount, this.$('order-form').get ('company_id'));
|
||||
tpv.pay (payAmount, this.$('order-form').get ('companyFk'));
|
||||
}
|
||||
else
|
||||
this.hash.set ({'form': 'ecomerce/orders'});
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
<db-form id="order-form" on-ready="onOrderReady">
|
||||
<db-model property="model" result-index="1">
|
||||
CALL basketGetTax;
|
||||
SELECT o.id, o.date_send, o.note, o.company_id,
|
||||
SELECT o.id, o.sent, o.notes, o.companyFk,
|
||||
ag.description agency, v.code method,
|
||||
ad.nickname, ad.postalCode, ad.city, ad.street,
|
||||
t.*, c.credit, myClientGetDebt(NULL) debt
|
||||
FROM basket o
|
||||
JOIN vn.agencyMode ag ON ag.id = o.agency_id
|
||||
LEFT JOIN myAddress ad ON ad.id = o.address_id
|
||||
JOIN vn.deliveryMethod v ON v.id = o.delivery_method_id
|
||||
FROM myBasket o
|
||||
JOIN vn.agencyMode ag ON ag.id = o.agencyModeFk
|
||||
LEFT JOIN myAddress ad ON ad.id = o.addressFk
|
||||
JOIN vn.deliveryMethod v ON v.id = o.deliveryMethodFk
|
||||
JOIN myClient c
|
||||
JOIN (
|
||||
SELECT
|
||||
|
@ -34,7 +34,7 @@
|
|||
<div class="delivery">
|
||||
<p>
|
||||
<t>Delivery at</t>
|
||||
<htk-text format="%D" form="order-form" column="date_send"/>
|
||||
<htk-text format="%D" form="order-form" column="sent"/>
|
||||
</p>
|
||||
<p>
|
||||
<span id="method"><t>Agency</t></span>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.405.99",
|
||||
"version": "1.406.01",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue