#4466 InvoiceIn Rectification #1902

Merged
jorgep merged 20 commits from 4466-invoiceInRectificated into dev 2024-02-06 07:49:20 +00:00
19 changed files with 12 additions and 134 deletions
Showing only changes of commit 567359ad6a - Show all commits

View File

@ -1,16 +1,15 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`ticketStateToday`
AS SELECT `ts`.`ticketFk` AS `ticket`,
AS SELECT
`ts`.`ticketFk` AS `ticketFk`,
`ts`.`state` AS `state`,
`ts`.`productionOrder` AS `productionOrder`,
`ts`.`alertLevel` AS `alertLevel`,
`ts`.`userFk` AS `worker`,
`ts`.`userFk` AS `userFk`,
`ts`.`code` AS `code`,
`ts`.`updated` AS `updated`,
`ts`.`isPicked` AS `isPicked`
FROM (
`vn`.`ticketState` `ts`
JOIN `vn`.`ticket` `t` ON(`t`.`id` = `ts`.`ticketFk`)
)
WHERE `t`.`shipped` BETWEEN `util`.`VN_CURDATE`() AND `MIDNIGHT`(`util`.`VN_CURDATE`())
FROM `ticketState` `ts`
JOIN `ticket` `t` ON `t`.`id` = `ts`.`ticketFk`
WHERE `t`.`shipped` BETWEEN `util`.`VN_CURDATE`() AND `MIDNIGHT`(`util`.`VN_CURDATE`());

View File

@ -9,7 +9,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
lhp.m3,
dl.minSpeed
FROM ticket t
JOIN ticketStateToday tst ON tst.ticket = t.id
JOIN ticketStateToday tst ON tst.ticketFk = t.id
JOIN state s ON s.id = tst.state
JOIN saleVolume sv ON sv.ticketFk = t.id
LEFT JOIN lastHourProduction lhp ON lhp.warehouseFk = t.warehouseFk

View File

@ -1,8 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`Equipos`
AS SELECT `h`.`code` AS `alias`,
`h`.`description` AS `descripcion`,
`h`.`workerFk` AS `trabajador_id`,
`h`.`windowsSerial` AS `windowsSerial`
FROM `vn`.`host` `h`

View File

@ -1,6 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`Prioridades`
AS SELECT `qp`.`id` AS `Id_Prioridad`,
`qp`.`priority` AS `Prioridad`
FROM `vn`.`queuePriority` `qp`

View File

@ -1,7 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`deliveryPoint`
AS SELECT `dp`.`id` AS `id`,
`dp`.`name` AS `name`,
`dp`.`ubication` AS `ubication`
FROM `vn`.`deliveryPoint` `dp`

View File

@ -1,6 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`device_user`
AS SELECT `dpu`.`deviceProductionFk` AS `device_id`,
`dpu`.`userFk` AS `user_id`
FROM `vn`.`deviceProductionUser` `dpu`

View File

@ -1,10 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`edi_feature`
AS SELECT `edi`.`feature`.`item_id` AS `item_id`,
`edi`.`feature`.`feature_type_id` AS `feature_type_id`,
`edi`.`feature`.`feature_value` AS `feature_value`,
`edi`.`feature`.`entry_date` AS `entry_date`,
`edi`.`feature`.`expiry_date` AS `expiry_date`,
`edi`.`feature`.`change_date_time` AS `change_date_time`
FROM `edi`.`feature`

View File

@ -1,9 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`edi_genus`
AS SELECT `edi`.`genus`.`genus_id` AS `genus_id`,
`edi`.`genus`.`latin_genus_name` AS `latin_genus_name`,
`edi`.`genus`.`entry_date` AS `entry_date`,
`edi`.`genus`.`expiry_date` AS `expiry_date`,
`edi`.`genus`.`change_date_time` AS `change_date_time`
FROM `edi`.`genus`

View File

@ -1,11 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`edi_item_feature`
AS SELECT `edi`.`item_feature`.`item_id` AS `item_id`,
`edi`.`item_feature`.`presentation_order` AS `presentation_order`,
`edi`.`item_feature`.`feature` AS `feature`,
`edi`.`item_feature`.`regulation_type` AS `regulation_type`,
`edi`.`item_feature`.`entry_date` AS `entry_date`,
`edi`.`item_feature`.`expiry_date` AS `expiry_date`,
`edi`.`item_feature`.`change_date_time` AS `change_date_time`
FROM `edi`.`item_feature`

View File

@ -1,10 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`edi_plant`
AS SELECT `edi`.`plant`.`plant_id` AS `plant_id`,
`edi`.`plant`.`genus_id` AS `genus_id`,
`edi`.`plant`.`specie_id` AS `specie_id`,
`edi`.`plant`.`entry_date` AS `entry_date`,
`edi`.`plant`.`expiry_date` AS `expiry_date`,
`edi`.`plant`.`change_date_time` AS `change_date_time`
FROM `edi`.`plant`

View File

@ -1,10 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`edi_type`
AS SELECT `edi`.`type`.`type_id` AS `type_id`,
`edi`.`type`.`type_group_id` AS `type_group_id`,
`edi`.`type`.`description` AS `description`,
`edi`.`type`.`entry_date` AS `entry_date`,
`edi`.`type`.`expiry_date` AS `expiry_date`,
`edi`.`type`.`change_date_time` AS `change_date_time`
FROM `edi`.`type`

View File

@ -1,10 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`edi_value`
AS SELECT `edi`.`value`.`type_id` AS `type_id`,
`edi`.`value`.`type_value` AS `type_value`,
`edi`.`value`.`type_description` AS `type_description`,
`edi`.`value`.`entry_date` AS `entry_date`,
`edi`.`value`.`expiry_date` AS `expiry_date`,
`edi`.`value`.`change_date_time` AS `change_date_time`
FROM `edi`.`value`

View File

@ -1,9 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`escritos`
AS SELECT `s`.`id` AS `id`,
`s`.`code` AS `abrev`,
`s`.`description` AS `descripcion`,
`s`.`isVisible` AS `visible`,
`s`.`hasCompany` AS `hasCompany`
FROM `vn`.`sample` `s`

View File

@ -1,10 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`person_user`
AS SELECT `u`.`id` AS `id`,
`u`.`role` AS `mysql_user_id`,
`u`.`name` AS `name`,
`u`.`password` AS `password`,
`u`.`active` AS `active`,
`u`.`lastPassChange` AS `last_pass_change`
FROM `account`.`user` `u`

View File

@ -1,9 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`person_user_idtrabajador`
AS SELECT `t`.`Id_Trabajador` AS `Id_Trabajador`
FROM (
`vn2008`.`person_user` `p`
JOIN `vn2008`.`Trabajadores` `t` ON(`p`.`id` = `t`.`user_id`)
)
WHERE `t`.`user_id` = `account`.`myUser_getId`()

View File

@ -1,7 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`reference_min`
AS SELECT `rc`.`dated` AS `date`,
`rc`.`value` AS `rate`,
`rc`.`currencyFk` AS `moneda_id`
FROM `vn`.`referenceCurrent` `rc`

View File

@ -1,4 +1,4 @@
DROP TRIGGER IF EXISTS vn2008.account_conciliacion_beforeInsert;
DROP TRIGGER IF EXISTS vn2008.account_conciliacion_BEFORE_INSERT;
ALTER TABLE IF EXISTS `vn2008`.`account_conciliacion` RENAME `vn`.`accountReconciliation`;
@ -11,4 +11,4 @@ CHANGE COLUMN IF EXISTS `importe` `amount` double NOT NULL,
CHANGE COLUMN IF EXISTS `Concepto` `concept` varchar(255) DEFAULT NULL,
CHANGE COLUMN IF EXISTS `DebeHaber` `debitCredit` smallint(6) NOT NULL,
CHANGE COLUMN IF EXISTS `id_calculated` `calculatedCode` varchar(255) DEFAULT NULL,
CHANGE COLUMN IF EXISTS `odbc_date` `created` timestamp NULL DEFAULT current_timestamp();
CHANGE COLUMN IF EXISTS `odbc_date` `created` timestamp NULL DEFAULT current_timestamp();

View File

@ -1,8 +1,8 @@
DROP TRIGGER IF EXISTS vn2008.awb_recibida_afterDelete;
DROP TRIGGER IF EXISTS vn2008.awb_recibida_ad;
ALTER TABLE IF EXISTS `vn2008`.`awb_recibida` RENAME `vn`.`awbInvoiceIn`;
ALTER TABLE IF EXISTS `vn`.`awbInvoiceIn`
CHANGE COLUMN IF EXISTS `awb_id` `awbFk` smallint(5) unsigned NOT NULL,
CHANGE COLUMN IF EXISTS `recibida_id` `invoiceInFk` mediumint(8) unsigned NOT NULL,
CHANGE COLUMN IF EXISTS `dua` `sad` varchar(18) DEFAULT NULL;
CHANGE COLUMN IF EXISTS `dua` `sad` varchar(18) DEFAULT NULL;

View File

@ -0,0 +1 @@
REVOKE SELECT ON TABLE vn2008.reference_min FROM logistic;