[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4851] branches/1.3
- Subject: SF.net SVN: ledger-smb:[4851] branches/1.3
- From: ..hidden..
- Date: Wed, 06 Jun 2012 10:24:03 +0000
Revision: 4851
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4851&view=rev
Author: einhverfr
Date: 2012-06-06 10:24:03 +0000 (Wed, 06 Jun 2012)
Log Message:
-----------
Adding new customer/vendor link for customers/vendors on invoices and transactions. Only shows when customer/vendor selection is not a dropdown. Brings up new window for entry of customer or vendor.
Modified Paths:
--------------
branches/1.3/Changelog
branches/1.3/bin/aa.pl
branches/1.3/bin/ir.pl
branches/1.3/bin/is.pl
branches/1.3/bin/oe.pl
Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog 2012-06-06 09:20:54 UTC (rev 4850)
+++ branches/1.3/Changelog 2012-06-06 10:24:03 UTC (rev 4851)
@@ -2,6 +2,9 @@
Initial Release: Monday, Oct 12 2011
Supported Presently
+Changelog for 1.3.19
+* New link for customer/vendor when not a dropdown (Chris T)
+
Changelog for 1.3.18
* Fixed missing template for CSV pricelists (Chris T)
* Added ODS pricelists (Chris T)
Modified: branches/1.3/bin/aa.pl
===================================================================
--- branches/1.3/bin/aa.pl 2012-06-06 09:20:54 UTC (rev 4850)
+++ branches/1.3/bin/aa.pl 2012-06-06 10:24:03 UTC (rev 4851)
@@ -444,6 +444,11 @@
# $locale->text('Add AP Transaction');
# $locale->text('Edit AR Transaction');
# $locale->text('Edit AP Transaction');
+ if ($form->{ARAP} eq 'AP'){
+ $vcscript = 'vendor.pl';
+ } elsif ($form->{ARAP} eq 'AR'){
+ $vcscript = 'customer.pl';
+ }
my $title_msgid="$title $form->{ARAP} Transaction";
if ($form->{reverse} == 0){
#$form->{title} = $locale->text("[_1] [_2] Transaction", $title, $form->{ARAP});
@@ -558,7 +563,9 @@
$name =
( $form->{"select$form->{vc}"} )
? qq|<select name="$form->{vc}">$form->{"select$form->{vc}"}</select>|
- : qq|<input name="$form->{vc}" value="$form->{$form->{vc}}" size=35>|;
+ : qq|<input name="$form->{vc}" value="$form->{$form->{vc}}" size=35>
+ <a href="$vcscript?action=add" target="new" id="new-contact">[|
+ . $locale->text('New') . qq|]</a>|;
$employee = qq|
<input type=hidden name=employee value="$form->{employee}">
@@ -632,12 +639,12 @@
<table>
<tr>
<th align="right" nowrap>$label</th>
- <td colspan=3>$name</td>
+ <td colspan=3>$name
+ </td>
<input type=hidden name="select$form->{vc}" value="|
. $form->escape( $form->{"select$form->{vc}"}, 1 ) . qq|">
</tr>
<tr>
- <td></td>
<td colspan=3>
<table width=100%>
<tr>
Modified: branches/1.3/bin/ir.pl
===================================================================
--- branches/1.3/bin/ir.pl 2012-06-06 09:20:54 UTC (rev 4850)
+++ branches/1.3/bin/ir.pl 2012-06-06 10:24:03 UTC (rev 4851)
@@ -383,7 +383,9 @@
. $form->escape( $form->{selectvendor}, 1 ) . qq|">|;
}
else {
- $vendor = qq|<input name=vendor value="$form->{vendor}" size=35>|;
+ $vendor = qq|<input name=vendor value="$form->{vendor}" size=35>
+ <a href="vendor.pl?action=add" target="new" id="new-contact">[|
+ . $locale->text('New') . qq|]</a>|;
}
$department = qq|
Modified: branches/1.3/bin/is.pl
===================================================================
--- branches/1.3/bin/is.pl 2012-06-06 09:20:54 UTC (rev 4850)
+++ branches/1.3/bin/is.pl 2012-06-06 10:24:03 UTC (rev 4851)
@@ -346,63 +346,65 @@
s/option>\Q$form->{$_}\E/option selected>$form->{$_}/;
}
- for (qw(customer department employee)) {
- $form->{"select$_"} = $form->unescape( $form->{"select$_"} );
- $form->{"select$_"} =~ s/ selected//;
- $form->{"select$_"} =~ s/(<option value="\Q$form->{$_}\E")/$1 selected="selected"/;
- }
-
- $form->{exchangerate} =
+ for (qw(customer department employee)) {
+ $form->{"select$_"} = $form->unescape( $form->{"select$_"} );
+ $form->{"select$_"} =~ s/ selected//;
+ $form->{"select$_"} =~ s/(<option value="\Q$form->{$_}\E")/$1 selected="selected"/;
+ }
+
+ $form->{exchangerate} =
$form->format_amount( \%myconfig, $form->{exchangerate} );
- $exchangerate = qq|<tr>|;
- $exchangerate .= qq|
- <th align=right nowrap>| . $locale->text('Currency') . qq|</th>
- <td><select name="currency">$form->{selectcurrency}</select></td>
-| if $form->{defaultcurrency};
- $exchangerate .= qq|
- <input type=hidden name="selectcurrency" value="$form->{selectcurrency}">
- <input type=hidden name="defaultcurrency"value="$form->{defaultcurrency}">
-|;
-
- if ( $form->{defaultcurrency}
+ $exchangerate = qq|<tr>|;
+ $exchangerate .= qq|
+ <th align=right nowrap>| . $locale->text('Currency') . qq|</th>
+ <td><select name="currency">$form->{selectcurrency}</select></td>
+| if $form->{defaultcurrency};
+ $exchangerate .= qq|
+ <input type=hidden name="selectcurrency" value="$form->{selectcurrency}">
+ <input type=hidden name="defaultcurrency"value="$form->{defaultcurrency}">
+|;
+
+ if ( $form->{defaultcurrency}
&& $form->{currency} ne $form->{defaultcurrency} )
{
if ( $form->{forex} ) {
- $exchangerate .=
- qq|<th align=right>|
- . $locale->text('Exchange Rate')
- . qq|</th><td>$form->{exchangerate}<input type="hidden" name="exchangerate" value="$form->{exchangerate}"></td>|;
- }
- else {
- $exchangerate .=
- qq|<th align=right>|
- . $locale->text('Exchange Rate')
- . qq|</th><td><input name="exchangerate" size="10" value="$form->{exchangerate}"></td>|;
- }
- }
- $exchangerate .= qq|
-<input type=hidden name="forex" value="$form->{forex}">
-</tr>
-|;
-
- if ( $form->{selectcustomer} ) {
- $customer = qq|<select name="customer">$form->{selectcustomer}</select>
- <input type="hidden" name="selectcustomer" value="|
- . $form->escape( $form->{selectcustomer}, 1 ) . qq|">|;
- }
- else {
- $customer = qq|<input name="customer" value="$form->{customer}" size="35">|;
- }
-
- $department = qq|
- <tr>
- <th align="right" nowrap>| . $locale->text('Department') . qq|</th>
- <td colspan="3"><select name="department">$form->{selectdepartment}</select>
- <input type="hidden" name="selectdepartment" value="|
- . $form->escape( $form->{selectdepartment}, 1 ) . qq|">
- </td>
- </tr>
+ $exchangerate .=
+ qq|<th align=right>|
+ . $locale->text('Exchange Rate')
+ . qq|</th><td>$form->{exchangerate}<input type="hidden" name="exchangerate" value="$form->{exchangerate}"></td>|;
+ }
+ else {
+ $exchangerate .=
+ qq|<th align=right>|
+ . $locale->text('Exchange Rate')
+ . qq|</th><td><input name="exchangerate" size="10" value="$form->{exchangerate}"></td>|;
+ }
+ }
+ $exchangerate .= qq|
+<input type=hidden name="forex" value="$form->{forex}">
+</tr>
+|;
+
+ if ( $form->{selectcustomer} ) {
+ $customer = qq|<select name="customer">$form->{selectcustomer}</select>
+ <input type="hidden" name="selectcustomer" value="|
+ . $form->escape( $form->{selectcustomer}, 1 ) . qq|">|;
+ }
+ else {
+ $customer = qq|<input name="customer" value="$form->{customer}" size="35">
+ <a target="new" id="new-contact" href="customer.pl?action=add">[| .
+ $locale->text('New') . qq|]</a> |;
+ }
+
+ $department = qq|
+ <tr>
+ <th align="right" nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan="3"><select name="department">$form->{selectdepartment}</select>
+ <input type="hidden" name="selectdepartment" value="|
+ . $form->escape( $form->{selectdepartment}, 1 ) . qq|">
+ </td>
+ </tr>
| if $form->{selectdepartment};
$n = ( $form->{creditremaining} < 0 ) ? "0" : "1";
@@ -419,21 +421,21 @@
. qq| %</td>
</tr>
|;
- }
-
- $employee = qq|
- <input type=hidden name="employee" value="$form->{employee}">
-|;
-
- $employee = qq|
- <tr>
- <th align=right nowrap>| . $locale->text('Salesperson') . qq|</th>
- <td><select name="employee">$form->{selectemployee}</select></td>
- <input type=hidden name="selectemployee" value="|
- . $form->escape( $form->{selectemployee}, 1 ) . qq|">
- </tr>
-| if $form->{selectemployee};
+ }
+ $employee = qq|
+ <input type=hidden name="employee" value="$form->{employee}">
+|;
+
+ $employee = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Salesperson') . qq|</th>
+ <td><select name="employee">$form->{selectemployee}</select></td>
+ <input type=hidden name="selectemployee" value="|
+ . $form->escape( $form->{selectemployee}, 1 ) . qq|">
+ </tr>
+| if $form->{selectemployee};
+
$i = $form->{rowcount} + 1;
$focus = "partnumber_$i";
@@ -483,14 +485,14 @@
<tr valign=top>
<td>
<table>
- <tr>
- <th align=right nowrap>| . $locale->text('Customer') . qq|</th>
- <td colspan=3>$customer</td>
- <input type=hidden name="customer_id" value="$form->{customer_id}">
- <input type=hidden name="oldcustomer" value="$form->{oldcustomer}">
- </tr>
- <tr>
- <td></td>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Customer') . qq|</th>
+ <td colspan=3>$customer</td>
+ <input type=hidden name="customer_id" value="$form->{customer_id}">
+ <input type=hidden name="oldcustomer" value="$form->{oldcustomer}">
+ </tr>
+ <tr>
+ <td></td>
<td colspan=3>
<table>
<tr>
@@ -524,48 +526,48 @@
</tr>
<tr>
- <th align="right" nowrap>| . $locale->text('Record in') . qq|</th>
- <td colspan="3"><select name="AR">$form->{selectAR}</select></td>
- <input type="hidden" name="selectAR" value="$form->{selectAR}">
- </tr>
- $department
- $exchangerate
- <tr>
- <th align=right nowrap>| . $locale->text('Shipping Point') . qq|</th>
- <td colspan=3><input name="shippingpoint" size="35" value="$form->{shippingpoint}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Ship via') . qq|</th>
- <td colspan=3><input name="shipvia" size="35" value="$form->{shipvia}"></td>
- </tr>
- </table>
- </td>
+ <th align="right" nowrap>| . $locale->text('Record in') . qq|</th>
+ <td colspan="3"><select name="AR">$form->{selectAR}</select></td>
+ <input type="hidden" name="selectAR" value="$form->{selectAR}">
+ </tr>
+ $department
+ $exchangerate
+ <tr>
+ <th align=right nowrap>| . $locale->text('Shipping Point') . qq|</th>
+ <td colspan=3><input name="shippingpoint" size="35" value="$form->{shippingpoint}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Ship via') . qq|</th>
+ <td colspan=3><input name="shipvia" size="35" value="$form->{shipvia}"></td>
+ </tr>
+ </table>
+ </td>
<td align=right>
<table>
- $employee
- <tr>
- <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
- <td><input name="invnumber" size="20" value="$form->{invnumber}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
- <td><input name="ordnumber" size="20" value="$form->{ordnumber}"></td>
-<input type=hidden name="quonumber" value="$form->{quonumber}">
- </tr>
- <tr>
- <th align=right>| . $locale->text('Invoice Date') . qq|</th>
- <td><input class="date" name="transdate" size="11" title="$myconfig{dateformat}" value="$form->{transdate}"></td>
- </tr>
- <tr>
- <th align=right>| . $locale->text('Due Date') . qq|</th>
- <td><input class="date" name="duedate" size="11" title="$myconfig{dateformat}" value="$form->{duedate}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('PO Number') . qq|</th>
- <td><input name="ponumber" size="20" value="$form->{ponumber}"></td>
- </tr>
- </table>
- </td>
+ $employee
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
+ <td><input name="invnumber" size="20" value="$form->{invnumber}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
+ <td><input name="ordnumber" size="20" value="$form->{ordnumber}"></td>
+<input type=hidden name="quonumber" value="$form->{quonumber}">
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Invoice Date') . qq|</th>
+ <td><input class="date" name="transdate" size="11" title="$myconfig{dateformat}" value="$form->{transdate}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Due Date') . qq|</th>
+ <td><input class="date" name="duedate" size="11" title="$myconfig{dateformat}" value="$form->{duedate}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('PO Number') . qq|</th>
+ <td><input name="ponumber" size="20" value="$form->{ponumber}"></td>
+ </tr>
+ </table>
+ </td>
</tr>
</table>
</td>
@@ -630,25 +632,25 @@
}
if ( ( $introws = $form->numtextrows( $form->{intnotes}, 35, 8 ) ) < 2 ) {
$introws = 5;
- }
- $rows = ( $rows > $introws ) ? $rows : $introws;
- $notes =
-qq|<textarea name="notes" rows="$rows" cols="40" wrap="soft">$form->{notes}</textarea>|;
- $intnotes =
-qq|<textarea name="intnotes" rows="$rows" cols="40" wrap="soft">$form->{intnotes}</textarea>|;
-
- $form->{taxincluded} = ( $form->{taxincluded} ) ? "checked" : "";
-
+ }
+ $rows = ( $rows > $introws ) ? $rows : $introws;
+ $notes =
+qq|<textarea name="notes" rows="$rows" cols="40" wrap="soft">$form->{notes}</textarea>|;
+ $intnotes =
+qq|<textarea name="intnotes" rows="$rows" cols="40" wrap="soft">$form->{intnotes}</textarea>|;
+
+ $form->{taxincluded} = ( $form->{taxincluded} ) ? "checked" : "";
+
$taxincluded = "";
if ($form->{taxaccounts} ) {
$taxincluded = qq|
- <tr height="5"></tr>
- <tr>
- <td align=right>
- <input name="taxincluded" class="checkbox" type="checkbox" value="1" $form->{taxincluded}></td><th align=left>|
- . $locale->text('Tax Included')
- . qq|</th>
- </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td align=right>
+ <input name="taxincluded" class="checkbox" type="checkbox" value="1" $form->{taxincluded}></td><th align=left>|
+ . $locale->text('Tax Included')
+ . qq|</th>
+ </tr>
|;
}
@@ -847,35 +849,35 @@
$form->format_amount( \%myconfig, $form->{"exchangerate_$i"} );
$exchangerate = qq| |;
- if ( $form->{currency} ne $form->{defaultcurrency} ) {
- if ( $form->{"forex_$i"} ) {
- $exchangerate =
-qq|<input type="hidden" name="exchangerate_$i" value="$form->{"exchangerate_$i"}">$form->{"exchangerate_$i"}|;
- }
- else {
- $exchangerate =
-qq|<input name="exchangerate_$i" size="10" value="$form->{"exchangerate_$i"}">|;
- }
- }
-
- $exchangerate .= qq|
-<input type="hidden" name="forex_$i" value="$form->{"forex_$i"}">
-|;
-
- $column_data{paid} =
-qq|<td align="center"><input name="paid_$i" size="11" value="$form->{"paid_$i"}"></td>|;
- $column_data{exchangerate} = qq|<td align="center">$exchangerate</td>|;
- $column_data{AR_paid} =
-qq|<td align="center"><select name="AR_paid_$i">$form->{"selectAR_paid_$i"}</select></td>|;
- $column_data{datepaid} =
-qq|<td align="center"><input class="date" name="datepaid_$i" size="11" title="$myconfig{dateformat}" value="$form->{"datepaid_$i"}"></td>|;
- $column_data{source} =
-qq|<td align="center"><input name="source_$i" size="11" value="$form->{"source_$i"}"></td>|;
- $column_data{memo} =
-qq|<td align="center"><input name="memo_$i" size="11" value="$form->{"memo_$i"}"></td>|;
-
- for (@column_index) { print qq|$column_data{$_}\n| }
- print "
+ if ( $form->{currency} ne $form->{defaultcurrency} ) {
+ if ( $form->{"forex_$i"} ) {
+ $exchangerate =
+qq|<input type="hidden" name="exchangerate_$i" value="$form->{"exchangerate_$i"}">$form->{"exchangerate_$i"}|;
+ }
+ else {
+ $exchangerate =
+qq|<input name="exchangerate_$i" size="10" value="$form->{"exchangerate_$i"}">|;
+ }
+ }
+
+ $exchangerate .= qq|
+<input type="hidden" name="forex_$i" value="$form->{"forex_$i"}">
+|;
+
+ $column_data{paid} =
+qq|<td align="center"><input name="paid_$i" size="11" value="$form->{"paid_$i"}"></td>|;
+ $column_data{exchangerate} = qq|<td align="center">$exchangerate</td>|;
+ $column_data{AR_paid} =
+qq|<td align="center"><select name="AR_paid_$i">$form->{"selectAR_paid_$i"}</select></td>|;
+ $column_data{datepaid} =
+qq|<td align="center"><input class="date" name="datepaid_$i" size="11" title="$myconfig{dateformat}" value="$form->{"datepaid_$i"}"></td>|;
+ $column_data{source} =
+qq|<td align="center"><input name="source_$i" size="11" value="$form->{"source_$i"}"></td>|;
+ $column_data{memo} =
+qq|<td align="center"><input name="memo_$i" size="11" value="$form->{"memo_$i"}"></td>|;
+
+ for (@column_index) { print qq|$column_data{$_}\n| }
+ print "
</tr>\n";
}
Modified: branches/1.3/bin/oe.pl
===================================================================
--- branches/1.3/bin/oe.pl 2012-06-06 09:20:54 UTC (rev 4850)
+++ branches/1.3/bin/oe.pl 2012-06-06 10:24:03 UTC (rev 4851)
@@ -531,7 +531,9 @@
. $form->escape( $form->{"select$form->{vc}"}, 1 ) . qq|">|;
}
else {
- $vc = qq|<input name=$form->{vc} value="$form->{$form->{vc}}" size=35>|;
+ $vc = qq|<input name=$form->{vc} value="$form->{$form->{vc}}" size=35>
+ <a id="new-contact" target="new" href="$form->{vc}.pl?action=add">
+ [| . $locale->text('New') . qq|]</a>|;
}
$department = qq|
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.