summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoraurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46>2007-07-05 18:44:24 +0000
committeraurynn_cmd <aurynn_cmd@4979c152-3d1c-0410-bac9-87ea11338e46>2007-07-05 18:44:24 +0000
commit94903b12ecba837d8717bcf91b7bcc25556a996a (patch)
tree8e8185200c5a72e3cef0d7edf3391f38409a50ea /bin
parent9aec614fb5c2470d3bb60e88bb6a71429d50b790 (diff)
Modifications to support toggling of the On-Hold field in the ar and ap tables;
An On-Hold toggle button was added to the Invoice Edit page, as well as a selector for All Invoices (default), Active Invoices, and Held Invoices to the AR and AP search pages. Modifications as needed to bring the code in line with linuxpoet's entity patches. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1350 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rw-r--r--bin/aa.pl10
-rw-r--r--bin/ir.pl25
-rw-r--r--bin/is.pl28
3 files changed, 58 insertions, 5 deletions
diff --git a/bin/aa.pl b/bin/aa.pl
index fc398b81..73550101 100644
--- a/bin/aa.pl
+++ b/bin/aa.pl
@@ -1424,6 +1424,16 @@ qq|<input name="l_transdate" class=checkbox type=checkbox value=Y checked> |
</table>
</td>
</tr>
+
+ <tr>
+ <td>
+ |.$locale->text('All Invoices').qq|: <input type="radio" name="invoice_type" checked value="1">
+ |.$locale->text('Active').qq|: <input type="radio" name="invoice_type" value="2">
+ |.$locale->text('On Hold').qq|: <input type="radio" name="invoice_type" value="3">
+ <br/>
+ </td>
+ </tr>
+
<tr>
<td>
<table>
diff --git a/bin/ir.pl b/bin/ir.pl
index 50c7c51f..ed646c00 100644
--- a/bin/ir.pl
+++ b/bin/ir.pl
@@ -519,13 +519,22 @@ qq|<textarea name=intnotes rows=$rows cols=35 wrap=soft>$form->{intnotes}</texta
$form->{oldinvtotal} = $form->{invtotal};
$form->{invtotal} =
- $form->format_amount( \%myconfig, $form->{invtotal}, 2, 0 );
+ $form->format_amount( \%myconfig, $form->{invtotal}, 2, 0 );
+
+ my $hold;
+
+ if ($form->{on_hold}) {
+
+ $hold = qq| <font size="17"><b> This invoice is On Hold </b></font> |;
+ }
print qq|
<tr>
<td>
<table width=100%>
<tr valign=bottom>
+ | . $hold . qq|
+
<td>
<table>
<tr>
@@ -681,12 +690,14 @@ qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></t
{ ndx => 7, key => 'H', value => $locale->text('Schedule') },
'delete' =>
{ ndx => 8, key => 'D', value => $locale->text('Delete') },
+ 'on_hold' =>
+ { ndx => 9, key=> 'O', value => $locale->text('On Hold') },
);
if ( $form->{id} ) {
if ( $form->{locked} ) {
- for ( "post", "delete" ) { delete $button{$_} }
+ for ( "post", "delete", 'on_hold' ) { delete $button{$_} }
}
}
@@ -1119,3 +1130,13 @@ sub yes {
}
+sub on_hold {
+
+ if ($form->{id}) {
+
+ my $toggled = IS->toggle_on_old($form);
+
+ #&invoice_links(); # is that it?
+ &edit(); # it was already IN edit for this to be reached.
+ }
+} \ No newline at end of file
diff --git a/bin/is.pl b/bin/is.pl
index 3f8f6daa..a940fa7a 100644
--- a/bin/is.pl
+++ b/bin/is.pl
@@ -568,13 +568,21 @@ qq|<textarea name=intnotes rows=$rows cols=35 wrap=soft>$form->{intnotes}</texta
$form->{oldinvtotal} = $form->{invtotal};
$form->{invtotal} =
- $form->format_amount( \%myconfig, $form->{invtotal}, 2, 0 );
+ $form->format_amount( \%myconfig, $form->{invtotal}, 2, 0 );
+
+ my $hold;
+
+ if ($form->{on_hold}) {
+
+ $hold = qq| <font size="17"><b> This invoice is On Hold </b></font> |;
+ }
print qq|
<tr>
<td>
<table width=100%>
<tr valign=bottom>
+ | . $hold . qq|
<td>
<table>
<tr>
@@ -723,6 +731,8 @@ qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></t
# type=submit $locale->text('Sales Order')
if ( !$form->{readonly} ) {
+
+ # changes by Aurynn to add an On Hold button
%button = (
'update' =>
@@ -752,6 +762,8 @@ qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></t
{ ndx => 10, key => 'H', value => $locale->text('Schedule') },
'delete' =>
{ ndx => 11, key => 'D', value => $locale->text('Delete') },
+ 'on_hold' =>
+ { ndx => 12, key => 'O', value => $locale->text('On Hold') },
);
if ( $form->{id} ) {
@@ -772,9 +784,9 @@ qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></t
else {
if ( $transdate > $closedto ) {
-
+ # Added on_hold, by Aurynn.
for ( "update", "ship_to", "print", "e_mail", "post",
- "schedule" )
+ "schedule", "on_hold" )
{
$allowed{$_} = 1;
}
@@ -1177,3 +1189,13 @@ sub yes {
}
+sub on_hold {
+
+ if ($form->{id}) {
+
+ my $toggled = IS->toggle_on_old($form);
+
+ #&invoice_links(); # is that it?
+ &edit(); # it was already IN edit for this to be reached.
+ }
+} \ No newline at end of file