Bugzilla – Attachment 22158 Details for
Bug 11092
Need a processing fee and billing fee on late notices.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add a processing fee and billing fee on late notices
overduerules.pl.diff (text/plain), 5.05 KB, created by
Blou
on 2013-10-21 13:41:03 UTC
(
hide
)
Description:
Add a processing fee and billing fee on late notices
Filename:
MIME Type:
Creator:
Blou
Created:
2013-10-21 13:41:03 UTC
Size:
5.05 KB
patch
obsolete
>diff --git a/tools/overduerules.pl b/tools/overduerules.pl >index cc90d0b..250fcd0 100755 >--- a/tools/overduerules.pl >+++ b/tools/overduerules.pl >@@ -36,7 +36,7 @@ my @categories = @{$dbh->selectall_arrayref( > { Slice => {} } > )}; > my @category_codes = map { $_->{categorycode} } @categories; >-our @rule_params = qw(delay letter debarred); >+our @rule_params = qw(delay letter debarred invoice); > > # blank_row($category_code) - return true if the entire row is blank. > sub blank_row { >@@ -81,12 +81,12 @@ if ($op eq 'save') { > my @names=$input->param(); > my $sth_search = $dbh->prepare("SELECT count(*) AS total FROM overduerules WHERE branchcode=? AND categorycode=?"); > >- my $sth_insert = $dbh->prepare("INSERT INTO overduerules (branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3) VALUES (?,?,?,?,?,?,?,?,?,?,?)"); >- my $sth_update=$dbh->prepare("UPDATE overduerules SET delay1=?, letter1=?, debarred1=?, delay2=?, letter2=?, debarred2=?, delay3=?, letter3=?, debarred3=? WHERE branchcode=? AND categorycode=?"); >+ my $sth_insert = $dbh->prepare("INSERT INTO overduerules (branchcode,categorycode, delay1,letter1,debarred1,invoice1, delay2,letter2,debarred2,invoice2, delay3,letter3,debarred3,invoice3) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); >+ my $sth_update=$dbh->prepare("UPDATE overduerules SET delay1=?, letter1=?, debarred1=?, invoice1=?, delay2=?, letter2=?, debarred2=?, invoice2=?, delay3=?, letter3=?, debarred3=?, invoice3=? WHERE branchcode=? AND categorycode=?"); > my $sth_delete=$dbh->prepare("DELETE FROM overduerules WHERE branchcode=? AND categorycode=?"); > foreach my $key (@names){ > # ISSUES >- if ($key =~ /(delay|letter|debarred)([1-3])-(.*)/) { >+ if ($key =~ /(delay|letter|debarred|invoice)([1-3])-(.*)/) { > my $type = $1; # data type > my $num = $2; # From 1 to 3 > my $bor = $3; # borrower category >@@ -100,6 +100,8 @@ if ($op eq 'save') { > } > } > >+warn "requete: ".$sth_insert; >+ > # figure out which rows need to be deleted > my @rows_to_delete = grep { blank_row($_) } @category_codes; > >@@ -145,12 +147,15 @@ if ($op eq 'save') { > ($temphash{$bor}->{"delay1"}?$temphash{$bor}->{"delay1"}:undef), > ($temphash{$bor}->{"letter1"}?$temphash{$bor}->{"letter1"}:""), > ($temphash{$bor}->{"debarred1"}?$temphash{$bor}->{"debarred1"}:0), >+ ($temphash{$bor}->{"invoice1"}?$temphash{$bor}->{"invoice1"}:0), > ($temphash{$bor}->{"delay2"}?$temphash{$bor}->{"delay2"}:undef), > ($temphash{$bor}->{"letter2"}?$temphash{$bor}->{"letter2"}:""), > ($temphash{$bor}->{"debarred2"}?$temphash{$bor}->{"debarred2"}:0), >+ ($temphash{$bor}->{"invoice2"}?$temphash{$bor}->{"invoice2"}:0), > ($temphash{$bor}->{"delay3"}?$temphash{$bor}->{"delay3"}:undef), > ($temphash{$bor}->{"letter3"}?$temphash{$bor}->{"letter3"}:""), > ($temphash{$bor}->{"debarred3"}?$temphash{$bor}->{"debarred3"}:0), >+ ($temphash{$bor}->{"invoice3"}?$temphash{$bor}->{"invoice3"}:0), > $branch ,$bor > ); > } else { >@@ -158,12 +163,15 @@ if ($op eq 'save') { > ($temphash{$bor}->{"delay1"}?$temphash{$bor}->{"delay1"}:0), > ($temphash{$bor}->{"letter1"}?$temphash{$bor}->{"letter1"}:""), > ($temphash{$bor}->{"debarred1"}?$temphash{$bor}->{"debarred1"}:0), >+ ($temphash{$bor}->{"invoice1"}?$temphash{$bor}->{"invoice1"}:0), > ($temphash{$bor}->{"delay2"}?$temphash{$bor}->{"delay2"}:0), > ($temphash{$bor}->{"letter2"}?$temphash{$bor}->{"letter2"}:""), > ($temphash{$bor}->{"debarred2"}?$temphash{$bor}->{"debarred2"}:0), >+ ($temphash{$bor}->{"invoice2"}?$temphash{$bor}->{"invoice2"}:0), > ($temphash{$bor}->{"delay3"}?$temphash{$bor}->{"delay3"}:0), > ($temphash{$bor}->{"letter3"}?$temphash{$bor}->{"letter3"}:""), >- ($temphash{$bor}->{"debarred3"}?$temphash{$bor}->{"debarred3"}:0) >+ ($temphash{$bor}->{"debarred3"}?$temphash{$bor}->{"debarred3"}:0), >+ ($temphash{$bor}->{"invoice3"}?$temphash{$bor}->{"invoice3"}:0) > ); > } > } >@@ -244,6 +252,7 @@ for my $data (@categories) { > } > if ($dat->{"delay$i"}){$row{"delay$i"}=$dat->{"delay$i"};} > if ($dat->{"debarred$i"}){$row{"debarred$i"}=$dat->{"debarred$i"};} >+ if ($dat->{"invoice$i"}){$row{"invoice$i"}=$dat->{"invoice$i"};} > } > } > push @line_loop,\%row;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11092
:
22158
|
22159
|
22160
|
28716