Greetings,
Invoices in our company were generated with the same items in two different business lines for the last year. We want to seperate income by business line. I created a new item with a different income account and tried changing the item on the invoices, resulting in the existing InvoiceLineItemDesc, *Qty, and *Rate defaulting to the values in the Item list. This behavior occured in both the UI and when using update queries.
I tried instead to do this:
UPDATE InvoiceLine SET InvoiceLineOverrideItemAccountRefListID = '810000-1168633178' WHERE TxnID = '15E5-1152110699' AND InvoiceLineSeqNo = 1
The result was 1 row affected, however, when I requeried the same row, the data was the same as before the update query.
UPDATE InvoiceLine SET InvoiceLineOverrideItemAccountRefFullName = 'Income: AOR Income' WHERE TxnID = '15E5-1152110699' AND InvoiceLineSeqNo = 1
Same result.
UPDATE InvoiceLine SET InvoiceLineOverrideItemAccountRefListID = '810000-1168633178', InvoiceLineOverrideItemAccountRefFullName = 'Income: AOR Income' WHERE TxnID = '15E5-1152110699' AND InvoiceLineSeqNo = 1
Same result.
sp_columns indicates that both InvoiceLineOverrideItemAccountRefListId and InvoiceLineOverrideItemAccountRefFullName are updatable. I believe these columns exist to provide an account number alternate to the one listed in the item details. This necessity arises when you change the account for an item that already has transactions against it. In the UI you are promted to "make this the account from now on" or "make this the account including all past transactions" (paraphrased). In the instance you select the first, the previous account number is placed in the Override field for existing transactions and the new account number is used by reference (lookup) from the Item table in future transactions.
What am I doing wrong? |