Bug 11573: (follow-up) Handle daily rental in db update

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2019-07-26 12:52:44 +01:00
parent 81137a17f2
commit 70d7226f9e
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 23 additions and 0 deletions

View File

@ -1,6 +1,29 @@
$DBversion = 'XXX'; # will be replaced by the RM
if ( CheckVersion($DBversion) ) {
$dbh->do(qq{
UPDATE
accountlines
SET
accounttype = 'RENT_DAILY_RENEW'
WHERE
accounttype = 'Rent'
AND
description LIKE 'Renewal of Daily Rental Item%';
});
$dbh->do(qq{
UPDATE
accountlines
SET
accounttype = 'RENT_DAILY'
WHERE
accounttype = 'Rent'
AND
description LIKE 'Daily rental';
});
$dbh->do(qq{
UPDATE
accountlines