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. * Initial Release.

2
debian/rules vendored
View File

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

View File

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

View File

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

View File

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