[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5256] trunk
- Subject: SF.net SVN: ledger-smb:[5256] trunk
- From: ..hidden..
- Date: Sat, 24 Nov 2012 11:18:58 +0000
Revision: 5256
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5256&view=rev
Author: einhverfr
Date: 2012-11-24 11:18:58 +0000 (Sat, 24 Nov 2012)
Log Message:
-----------
Merging from branches/1.3
Modified Paths:
--------------
trunk/LedgerSMB/Form.pm
trunk/bin/ic.pl
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3:3711-5253
+ /branches/1.3:3711-5255
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2012-11-24 11:15:31 UTC (rev 5255)
+++ trunk/LedgerSMB/Form.pm 2012-11-24 11:18:58 UTC (rev 5256)
@@ -1808,6 +1808,14 @@
my ( $self, $myconfig, $table, $transdate, $entity_class) = @_;
+ if (!$entity_class){
+ if ($table eq 'customer'){
+ $entity_class = 2;
+ } elsif ($table eq 'vendor') {
+ $entity_class = 1;
+ }
+ }
+
my @queryargs;
my $where;
if ($transdate) {
@@ -1827,9 +1835,9 @@
$self->{"${table}number"} = $self->{$table};
}
- my $name = $self->like( lc $self->{$table} );
+ my $name = $self->like( lc $self->{$table} ) if $self->{$table};
- $self->{"${table}number"}=$self->like(lc $self->{"${table}number"});#added % and % for searching key vendor/customer number.
+ $self->{"${table}number"}=$self->like(lc $self->{"${table}number"}) if $self->{"${table}number"};#added % and % for searching key vendor/customer number.
# Vendor and Customer are now views into entity_credit_account.
my $query = qq/
Modified: trunk/bin/ic.pl
===================================================================
--- trunk/bin/ic.pl 2012-11-24 11:15:31 UTC (rev 5255)
+++ trunk/bin/ic.pl 2012-11-24 11:18:58 UTC (rev 5256)
@@ -2882,7 +2882,7 @@
<input type=hidden name="vendor_$i" value="$form->{"vendor_$i"}">
</td>
<td>$form->{"vendor_mn_$i"}
- <input type=hidden name="vendor_$i" value="$form->{"vendor_mn_$i"}">
+ <input type=hidden name="vendor_mn_$i" value="$form->{"vendor_mn_$i"}">
</td>
|;
}
@@ -2990,7 +2990,7 @@
<td>$customer</td>
<input type=hidden name="customer_$i" value="$form->{"customer_$i"}">
<td>$form->{"customer_mn_$i"}</td>
- <input type=hidden name="customer_$i" value="$form->{"customer_mn_$i"}">
+ <input type=hidden name="customer_mn_$i" value="$form->{"customer_mn_$i"}">
|;
if ( $form->{selectpricegroup} ) {
@@ -3341,7 +3341,7 @@
sub check_vendor {
- @flds = qw(vendor partnumber lastcost leadtime vendorcurr);
+ @flds = qw(vendor vendor_mn partnumber lastcost leadtime vendorcurr);
@a = ();
$count = 0;
@@ -3376,7 +3376,7 @@
if ( ($form->{"vendor_$i"} || $form->{vendornumber})
&& !$form->{"vendor_id_$i"} ) {
( $form->{vendor} ) = split /--/, $form->{"vendor_$i"};
- if ( ( $j = $form->get_name( \%myconfig, "vendor" ) ) > 1 ) {
+ if ( ( $j = $form->get_name( \%myconfig, "vendor", undef, 1) ) > 1 ) {
&select_name( "vendor", $i );
$form->finalize_request();
}
@@ -3386,6 +3386,7 @@
# we got one name
$form->{"vendor_$i"} =
qq|$form->{name_list}[0]->{name}--$form->{name_list}[0]->{id}|;
+ $form->{"vendor_nm_$1"} = $form->{name_list}[0]->{meta_number};
}
else {
@@ -3415,7 +3416,7 @@
sub check_customer {
@flds =
- qw(customer validfrom validto pricebreak customerprice pricegroup customercurr);
+ qw(customer customer_mn validfrom validto pricebreak customerprice pricegroup customercurr);
@a = ();
$count = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.