we need to also remove fund debits
authorChris Sharp <csharp@georgialibraries.org>
Fri, 1 Apr 2016 18:31:44 +0000 (14:31 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 1 Apr 2016 18:31:44 +0000 (14:31 -0400)
acq/reset_po.pl

index 3f86eaf..9304681 100755 (executable)
@@ -27,6 +27,8 @@
 #[^^ recorded IDs]
 #delete from acq.edi_message where purchase_order in (270, 271, 274, 275);
 #update acq.purchase_order set state = 'pending', order_date = null where id in (270, 271, 274, 275);
+#delete from acq.fund_debit where id in (select fund_debit from acq.lineitem_detail where lineitem in (select id from acq.lineitem where purchase_order in (....)));
+#update acq.lineitem_detail set fund_debit = null where lineitem in (select id from acq.lineitem where purchase_order in (....));
 #commit;