[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Cash receipt search result selection



I have fixed some formatting in the area of the fix.  This will
probably create an svn conflict when you svn up.  Just be aware and
resolve the conflict in favor of the patch I have committed.

Best Wishes,
Chris Travers

On Thu, May 19, 2011 at 12:51 PM, Erik Huelsmann <..hidden..> wrote:
> When selecting:
>
> Cash -> Receipts
>
> and clicking on Continue on the subsequent screen, I'm presented with
> 3 lines (I have 3 companies defined in my testing database) and 3
> columns: a line number in the first, a radio button in the last and an
> empty column in the middle.
>
> The middle column should contain the company name, judging by
> UI/payments/payment1_5.html, which injects the "name" element in the
> middle column. Looking through scripts/payment.pl,
> LedgerSMB/DBObject/Payment.pm and sql/modules/Payment.sql, I think the
> column is defined to contain the company legal name, concatenated with
> the description. The company legal name seems to agree with the "Name"
> field in the AR/Customer definition screen.
>
> [ testing interjected ]
>
>
> Ah! None of my companies have descriptions, leading to an empty
> account name column! Now that I set a description on one, suddenly the
> company name and account description are shown in the list!
>
> Wait! Now I know how to fix this. Patch below:
>
> Index: sql/modules/Payment.sql
> ===================================================================
> --- sql/modules/Payment.sql     (revision 3142)
> +++ sql/modules/Payment.sql     (working copy)
> @@ -39,7 +39,7 @@
>
>  BEGIN
>        FOR out_entity IN
> -               SELECT ec.id, cp.legal_name||': '||ec.description as
> name, e.entity_class, ec.discount_account_id, ec.meta_number
> +               SELECT ec.id, cp.legal_name||coalesce(':
> '||ec.description,'') as name, e.entity_class, ec.discount_account_id,
> ec.meta_number
>                FROM entity_credit_account ec
>                JOIN entity e ON (ec.entity_id = e.id)
>                JOIN company cp ON (cp.entity_id = e.id)
>
>
> Bye,
>
> Erik.
>