File: /www/exchange2/sql/archive/2016-03-07-TT1012.sql
INSERT INTO manual_transactions_rejected (manual_transaction_id,transaction_type,debtor_id,originator_id,currency_id,amount,reference_to,specific_allocation,notes,transaction_file,specific_deductible,deductible_amount,trailing_balance,trailing_balance_amt,transref_list,reconcile_payment,reconcile_ref,status,reconcile_status,interface,transaction_date,notification_title,transaction_name,reject_status,created_at,created_by,delete_notes)
(
SELECT manual_transaction_id,transaction_type,debtor_id,originator_id,currency_id,amount,reference_to,specific_allocation,notes,transaction_file,specific_deductible,deductible_amount,trailing_balance,trailing_balance_amt,transref_list,reconcile_payment,reconcile_ref,status,reconcile_status,interface,transaction_date,notification_title,transaction_name,0,NOW(),1,'Action Required:- We have deleted this Credit Note as it does not reconcile transactions on this account. Please delete this notice as it\'s no longer valid.'
FROM manual_transactions
WHERE manual_transaction_id IN (515,521,519,517)
);
DELETE FROM `manual_transactions` WHERE `manual_transaction_id` IN (515,521,519,517);
UPDATE `manual_transactions` SET `transref_list`='' WHERE `manual_transaction_id`=1680 LIMIT 1;
UPDATE manual_transactions SET amount=amount+617.29 WHERE manual_transaction_id=1680;
INSERT INTO manual_transactions (manual_transaction_id,amount,transaction_type,originator_id,debtor_id,status,interface,transaction_date,created_at)
VALUES(null,617.29,91,102,191,1,1,"2014-03-26",NOW());
SET @trans_id = LAST_INSERT_ID();
INSERT INTO statements (manual_transaction_id,originator_id)
SELECT manual_transaction_id,originator_id
FROM manual_transactions
WHERE manual_transaction_id=@trans_id;
UPDATE `manual_transactions` SET `transref_list`='' WHERE `manual_transaction_id`=1681 LIMIT 1;
UPDATE manual_transactions SET amount=amount+416.47 WHERE manual_transaction_id=1681;
INSERT INTO manual_transactions (manual_transaction_id,amount,transaction_type,originator_id,debtor_id,status,interface,transaction_date,created_at)
VALUES(null,416.47,91,102,191,1,1,"2014-04-17",NOW());
SET @trans_id = LAST_INSERT_ID();
INSERT INTO statements (manual_transaction_id,originator_id)
SELECT manual_transaction_id,originator_id
FROM manual_transactions
WHERE manual_transaction_id=@trans_id;
UPDATE `manual_transactions` SET `transref_list`='17179' WHERE `manual_transaction_id`=18071 LIMIT 1;
UPDATE manual_transactions SET amount=amount+156.09 WHERE manual_transaction_id=18071;
INSERT INTO manual_transactions (manual_transaction_id,amount,transaction_type,originator_id,debtor_id,status,interface,transaction_date,created_at)
VALUES(null,156.09,91,218,507,1,1,"2015-09-18",NOW());
SET @trans_id = LAST_INSERT_ID();
INSERT INTO statements (manual_transaction_id,originator_id)
SELECT manual_transaction_id,originator_id
FROM manual_transactions
WHERE manual_transaction_id=@trans_id;
INSERT INTO manual_transactions_rejected (manual_transaction_id,transaction_type,debtor_id,originator_id,currency_id,amount,reference_to,specific_allocation,notes,transaction_file,specific_deductible,deductible_amount,trailing_balance,trailing_balance_amt,transref_list,reconcile_payment,reconcile_ref,status,reconcile_status,interface,transaction_date,notification_title,transaction_name,reject_status,created_at,created_by,delete_notes)
(
SELECT manual_transaction_id,transaction_type,debtor_id,originator_id,currency_id,amount,reference_to,specific_allocation,notes,transaction_file,specific_deductible,deductible_amount,trailing_balance,trailing_balance_amt,transref_list,reconcile_payment,reconcile_ref,status,reconcile_status,interface,transaction_date,notification_title,transaction_name,0,NOW(),1,'Action Required:- We have deleted this Credit Note as it does not reconcile transactions on this account. Please delete this notice as it\'s no longer valid.'
FROM manual_transactions
WHERE manual_transaction_id IN (988)
);
DELETE FROM `manual_transactions` WHERE `manual_transaction_id` IN (988);
UPDATE `manual_transactions` SET `transref_list`='1551' WHERE `manual_transaction_id`=3702 LIMIT 1;
UPDATE manual_transactions SET amount=amount+1650 WHERE manual_transaction_id=3702;
INSERT INTO manual_transactions (manual_transaction_id,amount,transaction_type,originator_id,debtor_id,status,interface,transaction_date,created_at)
VALUES(null,1650,91,102,191,1,1,"2015-09-18",NOW());
SET @trans_id = LAST_INSERT_ID();
INSERT INTO statements (manual_transaction_id,originator_id)
SELECT manual_transaction_id,originator_id
FROM manual_transactions
WHERE manual_transaction_id=@trans_id;