Merge branch 'maint'

This commit is contained in:
John Ralls 2016-06-28 16:22:53 -07:00
commit 9a8ed9323c
15 changed files with 12599 additions and 12000 deletions

234
ChangeLog
View File

@ -1,6 +1,238 @@
2016-06-24 John Ralls
* Update translations from the translation project. (HEAD, origin/maint, maint)
2016-06-23 John Ralls
* Remove automatch_store_transactions() from import-main-matcher.
2016-06-23 John Ralls
* Bug 760021 - File "Save As" to an existing file...overwrites without warning.
2016-06-23 John Ralls
* Bump CMake version to current.
2016-06-22 John Ralls
* Bug 761672 - Transfer made to placeholder account
2016-06-22 John Ralls
* Bug 764248 - saved-reports-2.4-backup line endings unconventional
2016-06-22 goodvibes2
* Update README to refer to wiki Submitting_Patches as per github discussion re this file.
2016-06-22 John Ralls
* Bug 748983 - Crash after opening money transfer dialog twice
2016-06-20 goodvibes2
* Bug 637004 Optionally allow customer and vendor address info to display Use an internal option to hold receivable/payable flag, remove trailing spaces.
2016-06-18 goodvibes2
* Bug 637004 Optionally allow customer and vendor address info to display in the Receivable Aging and Payable Aging reports so can be copied and pasted into a spreadsheet for use in mail merge.
2016-06-20 John Ralls
* Fix Travis test failure in gnc_iso8601_to_timespec_gmt.
2016-06-20 John Ralls
* Fix gnc_iso8601_to_timespec_gmt test failure.
2016-06-20 John Ralls
* Bug 767824 - Some UTC timezones incorrectly recognized on Windows 7
2016-06-06 Alex Aycinena
* Partially revert commit B555f495 and solve problem more simply by instead resequencing prior statements.
2016-06-04 Alex Aycinena
* The gnc_gui_refresh_all statement in gnc_book_options_dialog_apply_cb causes the 'apply' and 'OK' buttons to be set to sensitive on the open Book Options dialog in some circumstances; this commit causes them to be reset to insensitive, as they should be.
2016-05-31 Geert Janssens
* Update README file regarding pull request policy
2016-05-29 John Ralls
* Bug 766960 - gnucash-make-guids fails to run due to hardcoded paths.
2016-05-21 Geert Janssens
* Bug 765859 - The budget reports missing in Hungarian edition
2016-05-21 Geert Janssens
* Fix travis build
2016-05-21 Geert Janssens
* Bug 736352 - Expense Voucher adds tax automatically
2016-05-21 Geert Janssens
* Bug 766200 - Three-up printing does not position the third check properly
2016-05-21 Geert Janssens
* Check printing: make logic easier to follow
2016-05-20 John Ralls
* Fix adjust_sql_option_string test on Windows.
2016-05-19 John Ralls
* Move adjust_sql_options_string declaration to gnc-backend-dbi-priv.h.
2016-05-19 John Ralls
* Remove unnecessary g_strdup_printf.
2016-05-19 John Ralls
* Fix inconsistent and non-conforming whitespace and comments.
2016-05-20 Mike Evans
* Bug 766688 - Minimal fraction of BYN should be 1/100
2016-05-19 John Ralls
* Fix bad library name from c1ad6154.
2016-05-13 John Ralls
* Bug 764871 - Crash starting gnu cash
2016-05-14 John Ralls
* Don't try to compile test_adjust_sql_options on windows, it won't link.
2016-05-11 colinl
* Improved adjust_sql_options_string, added tests
2016-05-10 colinl
* Tidied up adjust_sql_options
2016-05-10 colinl
* adjust_sql_options working but needs tidy up and remove diagnostics
2016-05-03 victor811
* Update Russian translation
2016-05-03 victor811
* Update Russian translation
2016-05-10 John Ralls
* Bug 766028 - crash on manual addition of price entry in Price Editor
2016-05-05 Mechtilde
* correct some more shortcuts
2016-05-05 Mechtilde
* correct some shortcuts
2016-01-19 Mechtilde
* correct typos
2016-01-02 Mechtilde
* remove some fuzzy flags and add some translations
2016-01-20 Mechtilde
* some corrections
2016-01-02 Mechtilde
* remove some fuzzy flags
2016-01-02 Mechtilde
* add some translations
2016-04-24 Per Johansson
* FIxed remaining names.
2016-04-24 Per Johansson
* Added Finnish account plan.
2016-04-10 Per Johansson
* Added new sv_AX and sv_FI account plans.
2016-04-15 Geert Janssens
* Improve quickfill performance on huge registers
2016-03-24 John Ralls
* Mac Localization: Prefer the country to the language for fall-back locales.
2016-03-22 John Ralls
* Extract some functions to make the Mac locale setup a bit more maintainable.
2016-03-25 John Ralls
* Release 2.6.12 (tag: 2.6.12)
2016-03-25 John Ralls
* Update translations from the Translation Project.
2016-03-25 Geert Janssens
* Bug 719904 - Decide payment type only based on the account type involved
2016-03-25 Geert Janssens
* Factor out a convenience function to retrieve a (business) owner starting from a transaction
2016-03-25 Geert Janssens
* Provide option to print checks directly from the payment window
2016-03-25 Geert Janssens
* Check printing: extract address from invoice/bill for payment transactions
2016-03-25 Geert Janssens
* Move some utility functions from gui code to engine
2016-03-25 Geert Janssens
* Update POTFILES.in after previous commit
2016-03-24 Geert Janssens
* Bug 693342 - Print (bottom) prints to middle for 3-check pages (HEAD, origin/maint, maint)
* Merge reg and reg2 variant of print check dialog back into one file
2016-03-24 Geert Janssens
* Bug 693342 - Print (bottom) prints to middle for 3-check pages
2016-03-23 Geert Janssens

64
NEWS
View File

@ -1,8 +1,70 @@
Version history:
------- -------
2.6.13 - 28 June 2016
Announcement: GnuCash 2.6.13 Release 2016-06-28
GnuCash 2.6.13 released
The GnuCash development team proudly announces GnuCash 2.6.13, the
thirteenth maintenance release in the 2.6-stable series.
The following bugs are fixed:
Bug 637004 - Optionally allow customer and vendor address info to display.
Bug 736352 - Expense Voucher adds tax automatically
Bug 748983 - Crash after opening money transfer dialog twice.
Bug 760021 - File "Save As" to an existing file...overwrites without
warning.
Bug 761672 - Transfer made to placeholder account.
Bug 764248 - saved-reports-2.4-backup line endings unconventional
Bug 764871 - Crash starting gnu cash.
Bug 765859 - The budget reports missing in Hungarian edition
Bug 766028 - crash on manual addition of price entry in Price Editor.
Bug 766200 - Three-up printing does not position the third check
properly. A few bugs in the calculation of check
positions while printing checks have been
corrected. If you manually edited the check formats
to compensate for these positioning errors in
previous versions of gnucash, you may have to undo
these changes. Please check this before printing your
next check.
Bug 766688 - Minimal fraction of BYN should be 1/100
Bug 766960 - gnucash-make-guids fails to run due to hardcoded paths.
Bug 767824 - Some UTC timezones incorrectly recognized on Windows 7
Other repairs that weren't marked as bugs in git:
The gnc_gui_refresh_all statement in gnc_book_options_dialog_apply_cb
causes the 'apply' and 'OK' buttons to be set to
sensitive on the open Book Options dialog in some
circumstances; this commit causes them to be reset to
insensitive, as they should be.
Check printing: make logic easier to follow.
Fix adjust_sql_option_string test on Windows.
Don't try to compile test_adjust_sql_options on windows, it won't link.
Fix the CMake build by linking gnc-backend-dbi for test-backend-dbi.
Improved adjust_sql_options_string, added tests.
Improve quickfill performance on huge registers.
Mac Localization: Prefer the country to the language for
fall-back locales. On the theory that in countries
where multiple languages are in use similar date and
number formats will apply regardless of language, and
especially that the default currency will be the same
regardless of language. Also ensure that the specified
language is in the list passed to gettext; the net
effect of which is that the user will effectively get
the requested localization behavior.
Update README to refer to wiki Submitting_Patches and regarding pull
request policy.
Translation Updates: Dutch, Russian, Serbian
Standard Chart-of-Accounts Localizations Updates: Finnish, Sweden_Finnish, and Åland Islands Finnish.
2.6.12 - 26 March 2016
Announcement: GnuCash 2.6.12 Release 2016-03-26
GnuCash 2.6.10 released
GnuCash 2.6.12 released
The GnuCash development team proudly announces GnuCash 2.6.12, the
twelfth maintenance release in the 2.6-stable series.

14
README
View File

@ -344,18 +344,6 @@ Before you start developing GnuCash, you should do the following:
Submitting a Patch:
Patches should be created from a git clone using the appropriate
branch HEAD. For those unfamiliar with git, instructions on making a
patch may be found at http://wiki.gnucash.org/wiki/Git#Patches
Please attach patches to the appropriate bug or enhancement request
in Bugzilla (https://bugzilla.gnome.org, Project GnuCash). Create a
new bug if you don't find one that's applicable. Please don't submit
patches to either of the mailing lists, as they tend to be
forgotten.
Alternatively, you can also submit your patches in the form of a git
pull request.
Please read http://wiki.gnucash.org/wiki/Development#Submitting_Patches.
Thank you.

11932
po/nl.po

File diff suppressed because it is too large Load Diff

11991
po/sr.po

File diff suppressed because it is too large Load Diff

View File

@ -106,7 +106,7 @@ extern "C"
static QofLogModule log_module = GNC_MOD_BACKEND;
static gboolean save_may_clobber_data (QofBackend* bend);
static gboolean save_may_clobber_data (FileBackend *bend);
struct QofXmlBackendProvider : public QofBackendProvider
{
@ -294,7 +294,7 @@ xml_session_begin (QofBackend* be_start, QofSession* session,
LEAVE ("");
return;
}
if (create && !force && save_may_clobber_data (be_start))
if (create && !force && save_may_clobber_data (be))
{
qof_backend_set_error (be_start, ERR_BACKEND_STORE_EXISTS);
LEAVE ("Might clobber, no force");
@ -1200,7 +1200,7 @@ gnc_xml_be_load_from_file (QofBackend* bend, QofBook* book,
/* ---------------------------------------------------------------------- */
static gboolean
save_may_clobber_data (QofBackend* bend)
save_may_clobber_data (FileBackend *bend)
{
struct stat statbuf;
if (!bend->fullpath) return FALSE;

View File

@ -267,6 +267,7 @@ mac_set_languages(NSArray* languages, NSString *lang_str)
NSEnumerator *lang_iter = [languages objectEnumerator];
NSArray *new_languages = [NSArray array];
NSString *this_lang = NULL;
NSRange not_found = {NSNotFound, 0};
while ((this_lang = [lang_iter nextObject])) {
this_lang = [this_lang stringByTrimmingCharactersInSet:
[NSCharacterSet characterSetWithCharactersInString: @"\""]];
@ -274,7 +275,7 @@ mac_set_languages(NSArray* languages, NSString *lang_str)
new_languages = [new_languages arrayByAddingObject: this_lang];
/* If it's an English language, add the "C" locale after it so that
* any messages can default to it */
if ( [this_lang containsString: @"en"])
if (!NSEqualRanges([this_lang rangeOfString: @"en"], not_found))
new_languages = [new_languages arrayByAddingObject: @"C"];
if (![new_languages containsObject: lang_str]) {
NSArray *temp_array = [NSArray arrayWithObject: lang_str];

View File

@ -1446,7 +1446,7 @@ check_accounts (XferDialog* xferData, Account* from_account,
gnc_error_dialog(xferData->dialog, placeholder_format, name);
g_free(name);
LEAVE("placeholder");
return TRUE;
return FALSE;
}
if (!gnc_commodity_is_iso (xferData->from_commodity))
@ -1855,6 +1855,7 @@ gnc_xfer_dialog_create(GtkWidget *parent, XferDialog *xferData)
{
GtkBuilder *builder;
gboolean use_accounting_labels;
g_return_if_fail(to_info == NULL && from_info == NULL);
use_accounting_labels = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL,
GNC_PREF_ACCOUNTING_LABELS);
@ -2051,7 +2052,9 @@ close_handler (gpointer user_data)
gnc_xfer_dialog_close_cb(GTK_DIALOG(dialog), xferData);
gtk_widget_destroy (dialog);
g_free (to_info);
to_info = NULL;
g_free (from_info);
from_info = NULL;
LEAVE(" ");
}

View File

@ -95,11 +95,6 @@ void on_matcher_help_close_clicked (GtkButton *button, gpointer user_data);
/* Local prototypes */
static void
automatch_store_transactions(GNCImportMainMatcher *info,
GtkTreeModel *model,
GtkTreeIter *iter,
GNCImportTransInfo *trans_info);
static void
refresh_model_row(GNCImportMainMatcher *gui, GtkTreeModel *model,
GtkTreeIter *iter, GNCImportTransInfo *info);
@ -257,14 +252,7 @@ run_account_picker_dialog (GNCImportMainMatcher *info,
old_acc,
&ok_pressed);
if (ok_pressed)
{
gnc_import_TransInfo_set_destacc (trans_info,
new_acc,
TRUE);
/* Iterate through the transactions in a given clist to auto match them */
automatch_store_transactions(info, model, iter, trans_info);
}
gnc_import_TransInfo_set_destacc (trans_info, new_acc, TRUE);
}
static void
@ -913,20 +901,6 @@ void gnc_gen_trans_list_add_trans_with_ref_id(GNCImportMainMatcher *gui, Transac
return;
}/* end gnc_import_add_trans_with_ref_id() */
/* Iterate through the rows of the clist and try to automatch each of them */
static void
automatch_store_transactions (GNCImportMainMatcher *info,
GtkTreeModel *model,
GtkTreeIter *iter,
GNCImportTransInfo *trans_info)
{
/* returns TRUE if we changed this row, so update it */
if (gnc_import_TransInfo_refresh_destacc(trans_info, NULL))
{
refresh_model_row(info, model, iter, trans_info);
}
}
GtkWidget *gnc_gen_trans_list_widget (GNCImportMainMatcher *info)
{
g_assert(info);

View File

@ -44,7 +44,7 @@ SET (gnc_qof_noinst_HEADERS
qof/qofobject-p.h
qof/qofquery-p.h
qof/qofquerycore-p.h
qof/qofsession-p.h
qof/qofsession.hpp
)
SET (gnc_qof_SOURCES

View File

@ -159,13 +159,32 @@ GncDateTimeImpl::GncDateTimeImpl(const std::string str) :
using PTZ = boost::local_time::posix_time_zone;
TZ_Ptr tzptr;
auto tzpos = str.find_first_of("+-", str.find(":"));
int offset = 0L;
if (tzpos != str.npos)
{
string tzstr = "XXX" + str.substr(tzpos);
if (tzstr.length() > 6 && tzstr[6] != ':') //6 for XXXsHH, s is + or -
tzstr.insert(6, ":");
if (tzstr.length() > 9 && tzstr[9] != ':') //9 for XXXsHH:MM
{
tzstr.insert(9, ":");
/* Bug 767824: A GLib bug in parsing the UTC timezone on
* Windows may have created a bogus timezone of a random
* number of minutes. Since there are no fractional-hour
* timezones around the prime meridian we can safely check for
* this in files by looking for minutes-only offsets and
* making the appropriate correction.
*/
if (tzstr.compare(7,8, "00") &&
(tzstr.length() > 10 ? tzstr[10] != '0' :
!tzstr.compare(10, 11, "00")))
{
offset = stoi(tzstr.substr(10,11));
if (offset && tzpos == '-')
offset = -offset;
tzstr.replace(10, 11, "00");
}
}
tzptr.reset(new PTZ(tzstr));
if (str[tzpos - 1] == ' ') --tzpos;
}
@ -190,6 +209,8 @@ GncDateTimeImpl::GncDateTimeImpl(const std::string str) :
{
throw(std::invalid_argument("The date string was outside of the supported year range."));
}
if (offset)
m_time -= boost::posix_time::minutes(offset);
}
GncDateTimeImpl::operator time64() const

View File

@ -45,6 +45,18 @@
(define optname-show-zeros (N_ "Show zero balance items"))
(define optname-date-driver (N_ "Due or Post Date"))
;; Display tab options
(define optname-addr-source (N_ "Address Source")) ;; Billing or Shipping addresses
(define optname-disp-addr-name (N_ "Address Name"))
(define optname-disp-addr1 (N_ "Address 1"))
(define optname-disp-addr2 (N_ "Address 2"))
(define optname-disp-addr3 (N_ "Address 3"))
(define optname-disp-addr4 (N_ "Address 4"))
(define optname-disp-addr-phone (N_ "Address Phone"))
(define optname-disp-addr-fax (N_ "Address Fax"))
(define optname-disp-addr-email (N_ "Address Email"))
(define optname-disp-active (N_ "Active"))
(export optname-show-zeros)
;; The idea is: have a hash with the key being the contact name
@ -324,6 +336,7 @@ more than one currency. This report is not designed to cope with this possibilit
(lambda (new-option)
(gnc:register-option options new-option))))
(gnc:options-add-report-date!
options gnc:pagename-general
optname-to-date "a")
@ -391,7 +404,85 @@ totals to report currency.")
'duedate
(list
(vector 'duedate (N_ "Due Date") (N_ "Due date is leading.")) ;; Should be using standard label for due date?
(vector 'postdate (N_ "Post Date") (N_ "Post date is leading."))))) ;; Should be using standard label for post date?
(vector 'postdate (N_ "Post Date") (N_ "Post date is leading."))))) ;; Should be using standard label for post date?
;; display tab options
;; option optname-addr-source is added in receivables.scm
;; as cannot access the value of an option in aging-options-generator
(add-option
(gnc:make-simple-boolean-option
gnc:pagename-display
optname-disp-addr-name
"b"
(N_ "Display Address Name. This, and other fields, may be useful if \
copying this report to a spreadsheet for use in a mail merge.")
#f))
(add-option
(gnc:make-simple-boolean-option
gnc:pagename-display
optname-disp-addr1
"c"
(N_ "Display Address 1.")
#f))
(add-option
(gnc:make-simple-boolean-option
gnc:pagename-display
optname-disp-addr2
"d"
(N_ "Display Address 2.")
#f))
(add-option
(gnc:make-simple-boolean-option
gnc:pagename-display
optname-disp-addr3
"e"
(N_ "Display Address 3.")
#f))
(add-option
(gnc:make-simple-boolean-option
gnc:pagename-display
optname-disp-addr4
"f"
(N_ "Display Address 4.")
#f))
(add-option
(gnc:make-simple-boolean-option
gnc:pagename-display
optname-disp-addr-phone
"g"
(N_ "Display Phone.")
#f))
(add-option
(gnc:make-simple-boolean-option
gnc:pagename-display
optname-disp-addr-fax
"h"
(N_ "Display Fax.")
#f))
(add-option
(gnc:make-simple-boolean-option
gnc:pagename-display
optname-disp-addr-email
"i"
(N_ "Display Email.")
#f))
(add-option
(gnc:make-simple-boolean-option
gnc:pagename-display
optname-disp-active
"j"
(N_ "Display Active status.")
#f))
(gnc:options-set-default-section options "General")
options))
@ -411,6 +502,8 @@ totals to report currency.")
(define (aging-renderer report-obj reportname account reverse?)
(define receivable #t) ;; receivable=#t payable=#f
(define (get-name a)
(let* ((owner (company-get-owner-obj (cdr a))))
(gncOwnerGetName owner)))
@ -435,7 +528,6 @@ totals to report currency.")
(> (compare-buckets a b) 0))))))
(define (get-sort-pred sort-criterion sort-order)
(let ((choice (assq-ref sort-preds sort-criterion)))
(gnc:debug "sort-criterion" sort-criterion)
@ -459,15 +551,26 @@ totals to report currency.")
;; XXX: This is a hack - will be fixed when we move to a
;; more general interval scheme in this report
(define (make-heading-list)
(define make-heading-list
(list
(_ "Company")
(_ "Current")
(_ "0-30 days")
(_ "31-60 days")
(_ "61-90 days")
(_ "91+ days")
(_ "Total")))
(_ "Company")
(_ "Current")
(_ "0-30 days")
(_ "31-60 days")
(_ "61-90 days")
(_ "91+ days")
(_ "Total")))
;; following cols are optional
;; (_ "Address Name")
;; (_ "Address 1")
;; (_ "Address 2")
;; (_ "Address 3")
;; (_ "Address 4")
;; (_ "Phone")
;; (_ "Fax")
;; (_ "Email")
;; (_ "Active")
;; Make a list of commodity collectors for column totals
@ -541,7 +644,15 @@ totals to report currency.")
fmt-one-currency)))
(map fmt-function collector-list)))
;; return pointer to either billing or shipping address
;; note customers have a shipping address but not vendors
(define (get-addr owner disp-addr-source)
(if (and receivable (eq? disp-addr-source 'shipping))
(gncCustomerGetShipAddr (gncOwnerGetCustomer owner)) ;; shipping
(gncOwnerGetAddr owner))) ;; billing
(set! receivable (eq? (op-value "__hidden" "receivable-or-payable") 'R))
(gnc:report-starting reportname)
(let* ((companys (make-hash-table 23))
(report-title (op-value gnc:pagename-general gnc:optname-reportname))
@ -557,8 +668,20 @@ totals to report currency.")
(price-source (op-value gnc:pagename-general optname-price-source))
(multi-totals-p (op-value gnc:pagename-general optname-multicurrency-totals))
(show-zeros (op-value gnc:pagename-general optname-show-zeros))
(date-type (op-value gnc:pagename-general optname-date-driver))
(heading-list (make-heading-list))
(date-type (op-value gnc:pagename-general optname-date-driver))
(disp-addr-source (if receivable
(op-value gnc:pagename-display optname-addr-source)
'billing))
(disp-addr-name (op-value gnc:pagename-display optname-disp-addr-name))
(disp-addr1 (op-value gnc:pagename-display optname-disp-addr1))
(disp-addr2 (op-value gnc:pagename-display optname-disp-addr2))
(disp-addr3 (op-value gnc:pagename-display optname-disp-addr3))
(disp-addr4 (op-value gnc:pagename-display optname-disp-addr4))
(disp-addr-phone (op-value gnc:pagename-display optname-disp-addr-phone))
(disp-addr-fax (op-value gnc:pagename-display optname-disp-addr-fax))
(disp-addr-email (op-value gnc:pagename-display optname-disp-addr-email))
(disp-active (op-value gnc:pagename-display optname-disp-active))
(heading-list make-heading-list)
(exchange-fn (gnc:case-exchange-fn price-source report-currency report-date))
(total-collector-list (make-collector-list))
(table (gnc:make-html-table))
@ -569,6 +692,26 @@ totals to report currency.")
(document (gnc:make-html-document)))
; (gnc:debug "Account: " account)
;; add optional column headings
(if disp-addr-name
(set! heading-list (append heading-list (list (_ "Address Name")))))
(if disp-addr1
(set! heading-list (append heading-list (list (_ "Address 1")))))
(if disp-addr2
(set! heading-list (append heading-list (list (_ "Address 2")))))
(if disp-addr3
(set! heading-list (append heading-list (list (_ "Address 3")))))
(if disp-addr4
(set! heading-list (append heading-list (list (_ "Address 4")))))
(if disp-addr-phone
(set! heading-list (append heading-list (list (_ "Phone")))))
(if disp-addr-fax
(set! heading-list (append heading-list (list (_ "Fax")))))
(if disp-addr-email
(set! heading-list (append heading-list (list (_ "Email")))))
(if disp-active
(set! heading-list (append heading-list (list (_ "Active")))))
;; set default title
(gnc:html-document-set-title! document report-title)
;; maybe redefine better...
@ -632,8 +775,43 @@ totals to report currency.")
(cdr company-list-entry))))
(owner (company-get-owner-obj
(cdr company-list-entry)))
(company-name (gncOwnerGetName owner)))
(company-name (gncOwnerGetName owner))
(addr (get-addr owner disp-addr-source))
(addr-name (gncAddressGetName addr))
(addr-addr1 (gncAddressGetAddr1 addr))
(addr-addr2 (gncAddressGetAddr2 addr))
(addr-addr3 (gncAddressGetAddr3 addr))
(addr-addr4 (gncAddressGetAddr4 addr))
(addr-phone (gncAddressGetPhone addr))
(addr-fax (gncAddressGetFax addr))
(addr-email (gncAddressGetEmail addr))
(company-active (if (gncOwnerGetActive owner)
(_ "Y") (_ "N")))
(opt-fld-list '())
)
;; (gnc:debug "aging-renderer: disp-addr-source=" disp-addr-source
;; " owner=" owner
;; " gncOwnerGetID=" (gncOwnerGetID owner) ;; cust no
;; " gncCustomerGetShipAddr="
;; (gncCustomerGetShipAddr (gncOwnerGetCustomer owner)))
(if disp-addr-name
(set! opt-fld-list (append opt-fld-list (list addr-name))))
(if disp-addr1
(set! opt-fld-list (append opt-fld-list (list addr-addr1))))
(if disp-addr2
(set! opt-fld-list (append opt-fld-list (list addr-addr2))))
(if disp-addr3
(set! opt-fld-list (append opt-fld-list (list addr-addr3))))
(if disp-addr4
(set! opt-fld-list (append opt-fld-list (list addr-addr4))))
(if disp-addr-phone
(set! opt-fld-list (append opt-fld-list (list addr-phone))))
(if disp-addr-fax
(set! opt-fld-list (append opt-fld-list (list addr-fax))))
(if disp-addr-email
(set! opt-fld-list (append opt-fld-list (list addr-email))))
(if disp-active
(set! opt-fld-list (append opt-fld-list (list company-active))))
(add-to-column-totals total-collector-list
monetary-list)
@ -650,13 +828,15 @@ totals to report currency.")
total))
rest))))
(gnc:html-table-append-row!
table (cons
(gnc:make-html-text
(gnc:html-markup-anchor
(gnc:owner-anchor-text owner)
company-name))
monetary-list))
(gnc:html-table-append-row! table
(append
(cons
(gnc:make-html-text
(gnc:html-markup-anchor
(gnc:owner-anchor-text owner)
company-name))
monetary-list)
opt-fld-list))
(gncOwnerFree owner)))
company-list)

View File

@ -50,6 +50,15 @@
"w" (N_ "The payable account you wish to examine.")
#f #f (list ACCT-TYPE-PAYABLE)))
;; As aging.scm functions are used by both receivables.scm and payables.scm
;; add option "receivable" on hidden page "__hidden" with default value 'P
;; so aging.scm functions can tell if they are reporting on
;; accounts receivable or payable, as customers have a shipping address
;; but vendors do not. The Address Source option therefore only applies
;; to customers.
(add-option
(gnc:make-internal-option "__hidden" "receivable-or-payable" 'P))
(aging-options-generator options)))
(define (payables-renderer report-obj)

View File

@ -37,6 +37,7 @@
(define acc-page gnc:pagename-general)
(define this-acc (N_ "Receivables Account"))
(define optname-addr-source (N_ "Address Source")) ;; Billing or Shipping addresses
(define (options-generator)
(let* ((options (gnc:new-options))
@ -50,6 +51,26 @@
"w" (N_ "The receivables account you wish to examine.")
#f #f (list ACCT-TYPE-RECEIVABLE)))
;; As aging.scm functions are used by both receivables.scm and payables.scm
;; add option "receivable" on hidden page "__hidden" with default value 'R
;; so aging.scm functions can tell if they are reporting on
;; accounts receivable or payable, as customers have a shipping address
;; but vendors do not. The Address Source option therefore only applies
;; to customers.
(add-option
(gnc:make-internal-option "__hidden" "receivable-or-payable" 'R))
(add-option
(gnc:make-multichoice-option
gnc:pagename-display
optname-addr-source
"a"
(N_ "Address source.")
'billing
(list
(vector 'billing (N_ "Billing") (N_ "Address fields from billing address."))
(vector 'shipping (N_ "Shipping") (N_ "Address fields from shipping address.")))))
(aging-options-generator options)))
(define (receivables-renderer report-obj)

View File

@ -230,7 +230,14 @@ gnc_saved_reports_write_internal (const gchar *file, const gchar *contents, gboo
ssize_t written;
gint length;
gint flags = O_WRONLY | O_CREAT | (overwrite ? O_TRUNC : O_APPEND);
/* Bug 764248: Keep write from adding \r to the line endings. On
* windows the file already has them set to \r\n and if we output
* in text mode we get \r\r\n.
*/
#ifdef G_OS_WIN32
if (strstr(file, "backup"))
flags |= O_BINARY;
#endif
fd = g_open (file, flags, 0666);
if (fd == -1)
{