* make the Invoiced? cell mutable under limited conditions

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7274 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2002-10-05 23:52:42 +00:00
parent d3db2e6750
commit b9deaef522
2 changed files with 13 additions and 1 deletions

View File

@ -16,6 +16,8 @@
pretty Gnome implementation)
* use the checkbox cell in the EntryLedger
* make the Invoiced? cell mutable under limited conditions
2002-10-03 Christian Stimming <stimming@tuhh.de>

View File

@ -748,7 +748,17 @@ static CellIOFlags get_inv_io_flags (VirtualLocation virt_loc,
switch (ledger->type) {
case GNCENTRY_INVOICE_ENTRY:
return XACC_CELL_ALLOW_ALL | XACC_CELL_ALLOW_EXACT_ONLY;
{
/* This cell should be mutably IFF this entry is attached to
* a bill, order, or something else.
*/
GncEntry * entry = gnc_entry_ledger_get_entry (ledger, virt_loc.vcell_loc);
if ((gncEntryGetOrder (entry) != NULL) || (gncEntryGetBill (entry) != NULL))
return XACC_CELL_ALLOW_ALL | XACC_CELL_ALLOW_EXACT_ONLY;
}
/* FALLTHROUGH */
default:
return XACC_CELL_ALLOW_SHADOW;
}