[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: small Patch for 1.2.13 / show customer number in customer select
- Subject: Re: small Patch for 1.2.13 / show customer number in customer select
- From: "Chris Travers" <..hidden..>
- Date: Mon, 2 Jun 2008 08:23:20 -0700
On Mon, Jun 2, 2008 at 4:33 AM, Florian Reitmeir <..hidden..> wrote:
> Hi,
>
> we use Ledger SMB now for a while .. and have customers with a large number
> of addresses.
>
> So its important for us, to see the customer number, while selecting a
> customer, and nice if its sorted after the customer number.
>
> so here the small patch, mabye someone will find it useful:
Please post the patch to the Sourceforge tracker. It won't get
applied because we don't make these sorts of changes in stable
branches (and because this area is fundamentally different in 1.3),
but then it is more visible if someone wants it.
Best Wishes,
Chris Travers
>
> --------------------------- CUT ---------------------------
>
> diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
> index abc280e..b2296a2 100755
> --- a/LedgerSMB/Form.pm
> +++ b/LedgerSMB/Form.pm
> @@ -1942,17 +1942,17 @@ sub all_vc {
>
> $self->{"${vc}_id"} *= 1;
>
> - $query = qq|SELECT id, name
> + $query = qq|SELECT id, name, customernumber
> FROM $vc
> WHERE 1=1
> $where
>
> UNION
>
> - SELECT id,name
> + SELECT id,name, customernumber
> FROM $vc
> WHERE id = ?
> - ORDER BY name|;
> + ORDER BY customernumber, name|;
>
> push( @queryargs, $self->{"${vc}_id"} );
>
> diff --git a/bin/is.pl b/bin/is.pl
> index f615a23..61741f2 100755
> --- a/bin/is.pl
> +++ b/bin/is.pl
> @@ -138,7 +138,7 @@ qq|<option
> value="$_->{projectnumber}--$_->{id}">$_->{projectnumber}\n|;
> $form->{customer} = "$form->{customer}--$form->{customer_id}";
> for ( @{ $form->{all_customer} } ) {
> $form->{selectcustomer} .=
> - qq|<option value="$_->{name}--$_->{id}">$_->{name}\n|;
> + qq|<option value="$_->{name}--$_->{id}">$_->{customernumber}
> $_->{name}\n|;
> }
> }
> --------------------------- CUT ---------------------------
>
>
> --
> Florian Reitmeir
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Ledger-smb-devel mailing list
> ..hidden..
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>