SQL refactor

This commit is contained in:
Juan Ferrer 2019-05-28 16:27:28 +02:00
parent dc41737464
commit 55b5409624
6 changed files with 6 additions and 6 deletions

2
debian/changelog vendored
View File

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

View File

@ -6,7 +6,7 @@
SELECT o.id, o.sent, o.notes, o.companyFk, SELECT o.id, o.sent, o.notes, o.companyFk,
ag.description agency, v.code method, ag.description agency, v.code method,
ad.nickname, ad.postalCode, ad.city, ad.street, ad.nickname, ad.postalCode, ad.city, ad.street,
t.*, c.credit, myClientGetDebt(NULL) debt t.*, c.credit, myClient_getDebt(NULL) debt
FROM myBasket o FROM myBasket o
JOIN vn.agencyMode ag ON ag.id = o.agencyModeFk JOIN vn.agencyMode ag ON ag.id = o.agencyModeFk
LEFT JOIN myAddress ad ON ad.id = o.addressFk LEFT JOIN myAddress ad ON ad.id = o.addressFk

View File

@ -26,7 +26,7 @@
<db-form property="form"> <db-form property="form">
<db-model property="model"> <db-model property="model">
<custom> <custom>
SELECT -myClientGetDebt(NULL) debt SELECT -myClient_getDebt(NULL) debt
</custom> </custom>
</db-model> </db-model>
</db-form> </db-form>

View File

@ -1,6 +1,6 @@
{ {
"name": "hedera-web", "name": "hedera-web",
"version": "1.406.49", "version": "1.406.50",
"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, vn.invoiceOut_getPath(#invoice))
FROM config c FROM config c
JOIN myInvoice i JOIN myInvoice i
WHERE i.id = #invoice WHERE i.id = #invoice

View File

@ -32,7 +32,7 @@ class RestService extends Service {
$method->service = $this; $method->service = $this;
if ($method::SECURITY == Security::DEFINER) { if ($method::SECURITY == Security::DEFINER) {
$isAuthorized = $db->getValue('SELECT userCheckRestPriv(#)', $isAuthorized = $db->getValue('SELECT myUser_checkRestPriv(#)',
[$_REQUEST['method']]); [$_REQUEST['method']]);
if (!$isAuthorized) if (!$isAuthorized)