mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
In a posted invoice store company name in in TransDescription and
the user memo in the SplitMemo. Change window-register and aging.scm to not reverse the meanings. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6863 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
8b34e2bc96
commit
5f8a14df32
@ -390,7 +390,7 @@ gncInvoiceAttachInvoiceToTxn (GncInvoice *invoice, Transaction *txn)
|
||||
|
||||
Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
|
||||
Timespec *post_date, Timespec *due_date,
|
||||
const char * desc, gboolean reverse)
|
||||
const char * memo, gboolean reverse)
|
||||
{
|
||||
Transaction *txn;
|
||||
GList *iter;
|
||||
@ -409,8 +409,8 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
|
||||
|
||||
name = gncOwnerGetName (gncOwnerGetEndOwner (gncInvoiceGetOwner (invoice)));
|
||||
|
||||
/* Set Transaction Description, Num (invoice ID), Currency */
|
||||
xaccTransSetDescription (txn, desc);
|
||||
/* Set Transaction Description (Owner Name) , Num (invoice ID), Currency */
|
||||
xaccTransSetDescription (txn, name);
|
||||
xaccTransSetNum (txn, gncInvoiceGetID (invoice));
|
||||
xaccTransSetCurrency (txn, invoice->common_commodity);
|
||||
|
||||
@ -472,8 +472,7 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
|
||||
split = xaccMallocSplit (invoice->book);
|
||||
/* set action and memo? */
|
||||
|
||||
/* The memo is the customer name */
|
||||
xaccSplitSetMemo (split, name);
|
||||
xaccSplitSetMemo (split, memo);
|
||||
|
||||
xaccSplitSetBaseValue (split, (reverse ? gnc_numeric_neg (acc_val->val)
|
||||
: acc_val->val),
|
||||
@ -489,8 +488,8 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
|
||||
Split *split = xaccMallocSplit (invoice->book);
|
||||
/* Set action/memo */
|
||||
|
||||
/* The memo is the customer name */
|
||||
xaccSplitSetMemo (split, name);
|
||||
xaccSplitSetMemo (split, memo);
|
||||
xaccSplitSetAction (split, reverse ? _("Invoice") : _("Bill"));
|
||||
|
||||
xaccSplitSetBaseValue (split, (reverse ? total : gnc_numeric_neg (total)),
|
||||
invoice->common_commodity);
|
||||
|
@ -1184,17 +1184,8 @@ print_check_cb(GtkWidget * widget, gpointer data)
|
||||
if(split && trans &&
|
||||
gh_procedure_p(print_check))
|
||||
{
|
||||
if (xaccTransGetTxnType (trans) != TXN_TYPE_NONE) {
|
||||
/* If this is an Invoice or Payment, reverse the meanings of
|
||||
* these fields */
|
||||
memo = xaccTransGetDescription(trans);
|
||||
payee = xaccSplitGetMemo(split);
|
||||
|
||||
} else {
|
||||
payee = xaccTransGetDescription(trans);
|
||||
memo = xaccSplitGetMemo(split);
|
||||
}
|
||||
|
||||
amount = xaccSplitGetAmount(split);
|
||||
amount = gnc_numeric_abs (amount);
|
||||
date = xaccTransGetDate(trans);
|
||||
|
@ -142,7 +142,16 @@ static const char *
|
||||
gnc_split_register_get_desc_label (VirtualLocation virt_loc,
|
||||
gpointer user_data)
|
||||
{
|
||||
SplitRegister *reg = user_data;
|
||||
|
||||
switch (reg->type) {
|
||||
case RECEIVABLE_REGISTER:
|
||||
return _("Customer");
|
||||
case PAYABLE_REGISTER:
|
||||
return _("Vendor");
|
||||
default:
|
||||
return _("Description");
|
||||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
@ -193,16 +202,7 @@ static const char *
|
||||
gnc_split_register_get_memo_label (VirtualLocation virt_loc,
|
||||
gpointer user_data)
|
||||
{
|
||||
SplitRegister *reg = user_data;
|
||||
|
||||
switch (reg->type) {
|
||||
case RECEIVABLE_REGISTER:
|
||||
return _("Customer");
|
||||
case PAYABLE_REGISTER:
|
||||
return _("Vendor");
|
||||
default:
|
||||
return _("Memo");
|
||||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
@ -853,8 +853,16 @@ gnc_split_register_get_desc_help (VirtualLocation virt_loc,
|
||||
|
||||
help = gnc_table_get_entry (reg->table, virt_loc);
|
||||
if (!help || *help == '\0')
|
||||
switch (reg->type) {
|
||||
case RECEIVABLE_REGISTER:
|
||||
help = _("Enter the name of the Customer");
|
||||
break;
|
||||
case PAYABLE_REGISTER:
|
||||
help = _("Enter the name of the Vendor");
|
||||
break;
|
||||
default:
|
||||
help = _("Enter a description of the transaction");
|
||||
|
||||
}
|
||||
return g_strdup (help);
|
||||
}
|
||||
|
||||
@ -965,16 +973,7 @@ gnc_split_register_get_memo_help (VirtualLocation virt_loc,
|
||||
|
||||
help = gnc_table_get_entry (reg->table, virt_loc);
|
||||
if (!help || *help == '\0')
|
||||
switch (reg->type) {
|
||||
case RECEIVABLE_REGISTER:
|
||||
help = _("Enter the name of the Customer");
|
||||
break;
|
||||
case PAYABLE_REGISTER:
|
||||
help = _("Enter the name of the Vendor");
|
||||
break;
|
||||
default:
|
||||
help = _("Enter a description of the split");
|
||||
}
|
||||
return g_strdup (help);
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ more than one currency. This report is not designed to cope with this possibili
|
||||
"h"
|
||||
(N_ "Use the description to identify individual companies.\
|
||||
If false, use split memo")
|
||||
#f))
|
||||
#t))
|
||||
|
||||
|
||||
(add-option
|
||||
|
Loading…
Reference in New Issue
Block a user