mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge branch 'unstable-fix-business-reports' of https://github.com/christopherlam/gnucash into unstable
This commit is contained in:
commit
3c13f565d3
@ -776,12 +776,11 @@
|
||||
(add-html! document "</tr></table>")
|
||||
)
|
||||
|
||||
; add the date
|
||||
(let ((date-table #f)
|
||||
(post-date (gncInvoiceGetDatePosted invoice))
|
||||
(due-date (gncInvoiceGetDateDue invoice)))
|
||||
(if (not (zero? post-date))
|
||||
(begin
|
||||
;; add the date
|
||||
(if (gncInvoiceIsPosted invoice)
|
||||
(let ((date-table #f)
|
||||
(post-date (gncInvoiceGetDatePosted invoice))
|
||||
(due-date (gncInvoiceGetDateDue invoice)))
|
||||
(set! date-table (make-date-table))
|
||||
(make-date-row! date-table (_ "Date") post-date date-format)
|
||||
(if (opt-val "Display" "Due Date")
|
||||
@ -790,7 +789,7 @@
|
||||
(add-html! document
|
||||
(string-append "<font color='red'>"
|
||||
(_ "INVOICE NOT POSTED")
|
||||
"</font>"))))
|
||||
"</font>")))
|
||||
|
||||
(make-break! document)
|
||||
|
||||
|
@ -857,19 +857,17 @@
|
||||
'attribute (list "cellpadding" 0)
|
||||
'attribute (list "width" "100%"))
|
||||
|
||||
(set! date-object (let ((date-table #f)
|
||||
(post-date (gncInvoiceGetDatePosted invoice))
|
||||
(due-date (gncInvoiceGetDateDue invoice)))
|
||||
|
||||
(if (not (zero? post-date))
|
||||
(begin
|
||||
(set! date-object
|
||||
(if (gncInvoiceIsPosted invoice)
|
||||
(let ((date-table #f)
|
||||
(post-date (gncInvoiceGetDatePosted invoice))
|
||||
(due-date (gncInvoiceGetDateDue invoice)))
|
||||
(set! date-table (make-date-table))
|
||||
;; oli-custom - moved invoice number here
|
||||
(gnc:html-table-append-row!
|
||||
;; Translators: %s below is "Invoice" or "Bill" or even the
|
||||
;; custom title from the options. The next column contains
|
||||
;; the number of the document.
|
||||
date-table (list (sprintf #f (_ "%s #") title) (gncInvoiceGetID invoice)))
|
||||
date-table (list (sprintf #f (_ "%s #") title) (gncInvoiceGetID invoice)))
|
||||
;; Translators: The first %s below is "Invoice" or
|
||||
;; "Bill" or even the custom title from the
|
||||
;; options. This string sucks for i18n, but I don't
|
||||
@ -879,10 +877,8 @@
|
||||
(make-date-row! date-table (_ "Due Date") due-date date-format)
|
||||
date-table)
|
||||
(gnc:make-html-text
|
||||
;; oli-custom - FIXME: I have a feeling I broke a
|
||||
;; translation by not using string-expand for
|
||||
(string-append title "<br>"
|
||||
(_ "Invoice in progress..."))))))
|
||||
(string-append title "<br>"
|
||||
(_ "Invoice in progress...")))))
|
||||
|
||||
(gnc:html-table-append-row!
|
||||
helper-table
|
||||
|
@ -708,22 +708,18 @@
|
||||
document
|
||||
(make-myname-table book date-format))
|
||||
|
||||
(let ((date-table #f)
|
||||
(post-date (gncInvoiceGetDatePosted invoice))
|
||||
(due-date (gncInvoiceGetDateDue invoice)))
|
||||
|
||||
(if (not (zero? post-date))
|
||||
(begin
|
||||
(set! date-table (make-date-table))
|
||||
(make-date-row! date-table (string-append title " " (_ "Date")) post-date date-format)
|
||||
(make-date-row! date-table (_ "Due Date") due-date date-format)
|
||||
(gnc:html-document-add-object! document date-table))
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:make-html-text
|
||||
(_ "Invoice in progress...")))))
|
||||
|
||||
|
||||
(if (gncInvoiceIsPosted invoice)
|
||||
(let ((date-table #f)
|
||||
(post-date (gncInvoiceGetDatePosted invoice))
|
||||
(due-date (gncInvoiceGetDateDue invoice)))
|
||||
(set! date-table (make-date-table))
|
||||
(make-date-row! date-table (string-append title " " (_ "Date")) post-date date-format)
|
||||
(make-date-row! date-table (_ "Due Date") due-date date-format)
|
||||
(gnc:html-document-add-object! document date-table))
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:make-html-text
|
||||
(_ "Invoice in progress..."))))
|
||||
|
||||
(make-break! document)
|
||||
(make-break! document)
|
||||
|
@ -193,7 +193,7 @@
|
||||
(if (date-due-col column-vector)
|
||||
(addto! row-contents
|
||||
(if (and due-date
|
||||
(not (zero? due-date)))
|
||||
(gncInvoiceDateExists due-date))
|
||||
(qof-print-date due-date)
|
||||
"")))
|
||||
(if (num-col column-vector)
|
||||
|
@ -291,7 +291,7 @@
|
||||
(if (date-due-col column-vector)
|
||||
(addto! row-contents
|
||||
(if (and due-date
|
||||
(not (zero? due-date)))
|
||||
(gncInvoiceDateExists due-date))
|
||||
(qof-print-date due-date)
|
||||
"")))
|
||||
(if (num-col column-vector)
|
||||
|
@ -246,7 +246,7 @@
|
||||
<td align="right" class="invnum"><big><strong><?scm:d invoiceid ?></strong></big></td>
|
||||
</tr>
|
||||
<?scm )) ?>
|
||||
<?scm (if (zero? postdate) (begin ?>
|
||||
<?scm (if (not (gncInvoiceDateExists postdate)) (begin ?>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><?scm:d (_ "Invoice in progress...") ?></td>
|
||||
</tr>
|
||||
|
@ -1856,7 +1856,7 @@ gncInvoiceApplyPayment (const GncInvoice *invoice, Transaction *txn,
|
||||
gncOwnerAutoApplyPaymentsWithLots (owner, selected_lots);
|
||||
}
|
||||
|
||||
static gboolean gncInvoiceDateExists (time64 date)
|
||||
gboolean gncInvoiceDateExists (time64 date)
|
||||
{
|
||||
return date != INT64_MAX;
|
||||
}
|
||||
|
@ -275,6 +275,7 @@ static inline GncInvoice * gncInvoiceLookup (const QofBook *book, const GncGUID
|
||||
void gncInvoiceBeginEdit (GncInvoice *invoice);
|
||||
void gncInvoiceCommitEdit (GncInvoice *invoice);
|
||||
int gncInvoiceCompare (const GncInvoice *a, const GncInvoice *b);
|
||||
gboolean gncInvoiceDateExists (time64 date);
|
||||
gboolean gncInvoiceIsPosted (const GncInvoice *invoice);
|
||||
gboolean gncInvoiceIsPaid (const GncInvoice *invoice);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user