SQL refactor

This commit is contained in:
Juan 2018-05-11 16:50:43 +02:00
parent 87237ed366
commit a4d3f323c3
5 changed files with 11 additions and 13 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.405.91) stable; urgency=low
hedera-web (1.405.92) stable; urgency=low
* Initial Release.

2
debian/rules vendored
View File

@ -10,5 +10,5 @@ clean:
dh_clean $@
build:
npm install
npm --production run build

View File

@ -7,18 +7,16 @@
<div>
<htk-grid show-header="false">
<db-model property="model" id="tickets">
<custom>
SELECT invoice_id, serial_num, issued, amount
FROM invoice_view
ORDER BY issued DESC
LIMIT 100
</custom>
SELECT id, ref, issued, amount
FROM myInvoice
ORDER BY issued DESC
LIMIT 100
</db-model>
<htk-column-text title="_Serial" column="serial_num"/>
<htk-column-text title="_Serial" column="ref"/>
<htk-column-date title="_Date" column="issued" format="_%e %b %Y"/>
<htk-column-spin title="_Import" column="amount" unit="€" digits="2"/>
<htk-column-button
column="invoice_id"
column="id"
icon="download"
tip="_Download PDF"
on-clicked="onDownloadClick"/>

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.405.91",
"version": "1.405.92",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

View File

@ -1,5 +1,5 @@
SELECT CONCAT_WS('/', c.pdfsDir, invoiceGetPath(#invoice))
FROM config c
JOIN invoice_view i
WHERE i.invoice_id = #invoice
JOIN myInvoice i
WHERE i.id = #invoice