On Wednesday September 29 2010 14:46:13 Derek Atkins wrote: > Mike Evans <[email protected]> writes: > > On Tuesday September 28 2010 19:08:37 Geert Janssens wrote: > >> On Tuesday 28 September 2010, Derek Atkins wrote: > >> > > other invoice files before I post a patch. It should also keep the > >> > > default > >> > > string when the memo field is left blank. Would this impact > >> > > adversely anywhere > >> > > else? > >> > > >> > It would affect the case where there is no memo. Could you add code > >> > to keep the original text if the memo is empty? > >> > >> Unless an empty memo field and a blank memo field are considered two > >> separate things, I think that's what Mike proposed ;) > >> > >> Geert > > > > Yep, not so good to have nothing in there. So I'd propose the default > > string, hence no string change. > > Yeah, sorry, I didn't read completely last time. Yes, the default > string would need to be translated, but it's already in there so it > wouldn't break the string freeze. Therefore, this patch could make it > into 2.4.0 if we wanted. > > > Mike E > > -derek
I'd like you to consider the attached patch to implement the above. If there's no memo then the default string is used. Mike E -- GPG Key: 1024D/050895C2 Keyserver: http://pgp.mit.edu/ Search String: 0x050895C2
diff --git src/report/business-reports/easy-invoice.scm src/report/business-reports/easy-invoice.scm index 1c31ac6..3cde587 100644 --- src/report/business-reports/easy-invoice.scm +++ src/report/business-reports/easy-invoice.scm @@ -453,7 +453,10 @@ (gnc-print-date (gnc-transaction-get-date-posted t)))) (if (description-col used-columns) - (addto! row (_ "Payment, thank you"))) + (let* ((t (xaccSplitGetParent split)) + (m1 (xaccSplitGetMemo split))) + (if (string= m1 "")( addto! row (_ "Payment, thank you")) + ( addto! row m1 )))) (gnc:html-table-append-row/markup! table diff --git src/report/business-reports/fancy-invoice.scm src/report/business-reports/fancy-invoice.scm index 43237fc..61d336f 100644 --- src/report/business-reports/fancy-invoice.scm +++ src/report/business-reports/fancy-invoice.scm @@ -474,7 +474,10 @@ (gnc-print-date (gnc-transaction-get-date-posted t)))) (if (description-col used-columns) - (addto! row (_ "Payment, thank you"))) + (let* ((t (xaccSplitGetParent split)) + (m1 (xaccSplitGetMemo split))) + (if (string= m1 "")( addto! row (_ "Payment, thank you")) + ( addto! row m1 )))) (gnc:html-table-append-row/markup! table diff --git src/report/business-reports/invoice.scm src/report/business-reports/invoice.scm index e7912d2..b4789c1 100644 --- src/report/business-reports/invoice.scm +++ src/report/business-reports/invoice.scm @@ -422,7 +422,10 @@ (gnc-print-date (gnc-transaction-get-date-posted t)))) (if (description-col used-columns) - (addto! row (_ "Payment, thank you"))) + (let* ((t (xaccSplitGetParent split)) + (m1 (xaccSplitGetMemo split))) + (if (string= m1 "")( addto! row (_ "Payment, thank you")) + ( addto! row m1 )))) (gnc:html-table-append-row/markup! table
_______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
