[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5255] branches/1.3
- Subject: SF.net SVN: ledger-smb:[5255] branches/1.3
- From: ..hidden..
- Date: Sat, 24 Nov 2012 11:15:32 +0000
Revision: 5255
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5255&view=rev
Author: einhverfr
Date: 2012-11-24 11:15:31 +0000 (Sat, 24 Nov 2012)
Log Message:
-----------
Correcting other bugs on parts pricematrix screen
Modified Paths:
--------------
branches/1.3/LedgerSMB/Form.pm
branches/1.3/bin/ic.pl
Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm 2012-11-24 10:38:06 UTC (rev 5254)
+++ branches/1.3/LedgerSMB/Form.pm 2012-11-24 11:15:31 UTC (rev 5255)
@@ -1920,6 +1920,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) {
@@ -1939,9 +1947,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: branches/1.3/bin/ic.pl
===================================================================
--- branches/1.3/bin/ic.pl 2012-11-24 10:38:06 UTC (rev 5254)
+++ branches/1.3/bin/ic.pl 2012-11-24 11:15:31 UTC (rev 5255)
@@ -2855,7 +2855,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>
|;
}
@@ -2963,7 +2963,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} ) {
@@ -3314,7 +3314,7 @@
sub check_vendor {
- @flds = qw(vendor partnumber lastcost leadtime vendorcurr);
+ @flds = qw(vendor vendor_mn partnumber lastcost leadtime vendorcurr);
@a = ();
$count = 0;
@@ -3349,7 +3349,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();
}
@@ -3359,6 +3359,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 {
@@ -3388,7 +3389,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.