From b5443053fdb3418cc4d3fd9eee92c4b342d545cb Mon Sep 17 00:00:00 2001 From: Irka Date: Sat, 2 Aug 2014 10:06:39 +0200 Subject: [PATCH] MT#8433 Don't clear contract_balances on invoice deletion. As far as I remember it is rudiment of old invoicing schema, when balance supposed to be changed on invoice issue. Web interfaces allows to remove invoices, it led to removed balance => fixed. --- lib/NGCP/Schema/Result/contract_balances.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Schema/Result/contract_balances.pm b/lib/NGCP/Schema/Result/contract_balances.pm index a8d42fa7..a79887ab 100644 --- a/lib/NGCP/Schema/Result/contract_balances.pm +++ b/lib/NGCP/Schema/Result/contract_balances.pm @@ -75,7 +75,7 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, join_type => "LEFT", - on_delete => "CASCADE", + on_delete => "SET NULL", on_update => "CASCADE", }, );