diff --git a/forms/reports/items-form/ui.xml b/forms/reports/items-form/ui.xml index 8e857561..15eb72dd 100644 --- a/forms/reports/items-form/ui.xml +++ b/forms/reports/items-form/ui.xml @@ -26,8 +26,8 @@ - SELECT id, reino FROM vn2008.reinos - WHERE display != FALSE ORDER BY reino + SELECT id, name FROM vn.itemCategory + WHERE display ORDER BY name diff --git a/forms/reports/shelves/ui.xml b/forms/reports/shelves/ui.xml index ca3c8fc7..49072a77 100644 --- a/forms/reports/shelves/ui.xml +++ b/forms/reports/shelves/ui.xml @@ -25,9 +25,9 @@ on-ready="this.onConfigChange()"> SELECT c.id, c.name reportTitle, c.namePrefix, c.warehouse, c.family, - c.shelf, c.maxAmount, c.showPacking, c.stack, t.reino_id realm + c.shelf, c.maxAmount, c.showPacking, c.stack, it.categoryFk realm FROM shelfConfig c - JOIN vn2008.Tipos t ON t.tipo_id = c.family + JOIN vn.itemType it ON it.id = c.family @@ -39,8 +39,8 @@ - SELECT id, reino FROM vn2008.reinos - WHERE display != FALSE ORDER BY reino + SELECT id, name FROM vn.itemCategory + WHERE display ORDER BY name @@ -48,8 +48,8 @@ - SELECT tipo_id, Tipo FROM vn2008.Tipos - WHERE reino_id = #realm ORDER BY Tipo + SELECT id, name FROM vn.itemType + WHERE categoryFk = #realm ORDER BY name diff --git a/rest/misc/exchange-rate.php b/rest/misc/exchange-rate.php index 75d839d9..6e0dc96d 100644 --- a/rest/misc/exchange-rate.php +++ b/rest/misc/exchange-rate.php @@ -6,14 +6,14 @@ */ class ExchangeRate extends Vn\Lib\Method { function run($db) { - $db->selectDb('vn2008'); + $db->selectDb('vn'); // Indica la URL del archivo $xml = new SimpleXMLElement( 'http://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml', 0, TRUE); - $date = $db->getValue("SELECT MAX(date) fecha FROM reference_rate"); + $date = $db->getValue("SELECT MAX(dated) fecha FROM referenceRate"); $maxDate = $date ? DateTime::createFromFormat('Y-m-d', $date) : NULL; foreach ($xml->Cube[0]->Cube as $cube) { @@ -29,7 +29,7 @@ class ExchangeRate extends Vn\Lib\Method { 'rate' => $subCube['rate'] ]; $db->query( - 'REPLACE INTO reference_rate(moneda_id, date, rate) + 'REPLACE INTO referenceRate(currencyFk, dated, `value`) VALUES(2, #date, #rate)', $params );