Hi All,
I have created a field carrier charges in sales line and in sales order sub form I added this field, when I am posting the item in sales order the carrier charges should come as item charges, the new line of item charges should be post in background while posting the item and I have written the code for adding the new line of item charges automatically for example
Now I have the first Line as ->Item in sales order before ship
After ship now I have the second Line as ->Charge (item) Then I want to invoice the item with item charges but it throw me the error like U must assign item charges if u want to invoice it
But I don't want to use the item charge assignment feature ,without using that feature it should get invoice
for that I have written the code like inserting the required fields in item charge assignment(Sales) table and by not using that feature the item get invoiced with item charges
But my problem is it didn't get updated in value entries and in posted sales invoice, G/L entry, tax entry I can able to see the second line of item charges
Please help me to post the item with item charges in value entries
0
Answers
If the "Item Charge Assignment (Sales)" records are created properly, the posting code (CU 80) should handle the rest.
how to set the document no for the new line that I want to create automatically
for example in sales order subform of sales order
first line as item -> document no. is 1900
second line as charge (item) -> document no. should be 1900 but it is taking as null
my code didn't find out the first record in sales order
please suggest me the code for it.
But I want to create the new line of item charge by writing the code with required fields While we hit the post button in sales order the item with item charges should get posted ,so I have to create the function in code unit 80 and I want to call this function at the post button of On Push before the CODEUNIT.RUN line and it should be updated in all entries by post the item in sales order
Please suggest me the code for it.
It's very urgent...
If the temporary table is getting populated, then step thru the "PostItemChargePerOrder" function to see why it is failing to post the entries.
For example, you may have created the sales line with the item charge incorrectly, but there's no way for anyone to know this and tell you where you have gone wrong.