STPH#35077 Correctiebestellingen ook negatieve levering

svn path=/Database/trunk/; revision=29018
This commit is contained in:
Jos Groot Lipman
2016-04-19 11:52:38 +00:00
parent 3975da6022
commit d4604e51ef
2 changed files with 10 additions and 1 deletions

View File

@@ -371,7 +371,9 @@ CREATE_TABLE(bes_bestelling_item, 0)
NUMBER(5),
bes_bestelling_item_status
NUMBER(10),
CONSTRAINT bes_c_bes_bestelling_item CHECK (bes_bestelling_item_aantalontv<=bes_bestelling_item_aantal)
CONSTRAINT bes_c_bes_bestelling_item
CHECK ((bes_bestelling_item_aantal>=0 AND bes_bestelling_item_aantalontv<=bes_bestelling_item_aantal)
OR (bes_bestelling_item_aantal<0 AND bes_bestelling_item_aantalontv>=bes_bestelling_item_aantal))
);
--CREATE_TABLE(bes_bestellingstatuses, 0)

View File

@@ -524,6 +524,13 @@ INSERT INTO fac_usrrap (fac_usrrap_omschrijving, fac_usrrap_view_name,fac_usrrap
FROM fac_functie WHERE fac_functie_code='WEB_UDRMAN'
AND NOT EXISTS (SELECT '' FROM fac_usrrap WHERE UPPER(fac_usrrap_view_name)='MLD_V_UDR_OPDRACHTMATERIAAL');
/////////////////////////////////////////////////////////////////////////////////////////// STPH#35077
ALTER TABLE bes_bestelling_item DROP CONSTRAINT bes_c_bes_bestelling_item;
ALTER TABLE bes_bestelling_item ADD
CONSTRAINT bes_c_bes_bestelling_item
CHECK ((bes_bestelling_item_aantal>=0 AND bes_bestelling_item_aantalontv<=bes_bestelling_item_aantal)
OR (bes_bestelling_item_aantal<0 AND bes_bestelling_item_aantalontv>=bes_bestelling_item_aantal));
///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////