|
@@ -1,16 +1,15 @@
|
|
|
|
|
|
|
|
|
-SET ":title" = 'Fuel Voucher';
|
|
|
SET ":created" = COALESCE(:created, (SELECT created FROM code WHERE hash = :hash));
|
|
|
SET ":expiry" = COALESCE(:expiry, (SELECT expiry FROM code_detail WHERE hash = :hash));
|
|
|
SET ":value" = COALESCE(:value, (SELECT value FROM code_detail WHERE hash = :hash));
|
|
|
SET ":store" = COALESCE(:store, json_array((SELECT store FROM code_detail WHERE hash = :hash)));
|
|
|
SET ":used" = COALESCE(:used, (SELECT used FROM code_detail WHERE hash = :hash));
|
|
|
+SET ":type" = COALESCE(:type, json_array((SELECT type FROM code_detail WHERE hash = :hash)));
|
|
|
+SET ":title" = COALESCE(:type->>0, 'New')||' Voucher';
|
|
|
+SET ":type" = COALESCE(:type, json_array('Fuel'));
|
|
|
SET ":content" = (SELECT json(content) FROM code WHERE hash = :hash);
|
|
|
SET ":validate" = 'Update';
|
|
|
SET ":action" = (CASE COALESCE(:action, '') WHEN '' THEN NULL ELSE :action END);
|
|
|
SET ":method" = 'post';
|
|
|
-SET ":type" = json_array('Fuel');
|
|
|
SET ":preview" = (SELECT 'data:image/svg+xml;base64,'||svg FROM code WHERE hash = :hash);
|
|
|
SET ":autofill" = TRUE;
|
|
|
SET ":filter_config" = '[
|