I created a Sales Order and made an invoice for it. Then I went back, re-activated the SO and added a line.
Now I can generate a shipment for this line, but I cannot create an invoice because the SO does not appear in the drop-down menu of the "generate invoice" box!
This problem was not in 3.4.2 but has now appeared in 3.6.0
The reason seems to be the following code after the AND NOT EXIST:
DocStatus NOT IN ('DR','IP') AND EXISTS (SELECT * FROM C_OrderLine WHERE
C_Order.C_Order_ID=C_OrderLine.C_Order_ID AND QtyOrdered <> QtyInvoiced) AND
IsSOTrx='Y' AND NOT EXISTS (SELECT * FROM C_Invoice i WHERE
i.C_Order_ID=C_Order.C_Order_ID AND i.DocStatus IN ('IP', 'CO', 'CL'))
meaning if an invoice exists for a SO, then the SO will not appear in the drop-down list.
I looked for patches by the latest patch is from 20110921. Are there now newer patches available for 3.6.0?
Thanks for any help on this!
latest version is 3.7.0. You may try if that solves your problem.
Hi Rheinländer ,
Try this code :
DocStatus NOT IN ('DR','IP') AND AD_ORG_ID = @AD_Org_ID@ AND EXISTS (SELECT * FROM C_OrderLine WHERE
C_Order.C_Order_ID=C_OrderLine.C_Order_ID AND QtyOrdered <> QtyInvoiced) AND IsSOTrx='Y' AND EXISTS (SELECT * FROM
C_DOCTYPE dt WHERE dt.C_DOCTYPE_ID=C_DOCTYPETARGET_ID AND dt.DOCSUBTYPESO IN ('SO'))
I hope it helps.
thanks for the code. Where would I put that? I just grabbed the code that I posted from the logfile after setting the tracelevel to FINE.
I suppose I would have to download the sourcecode and compile from scratch? Or is there an easier way?
Do you know why there are no more patches posted for 3.6.0 after 20110921 ?
Hi Rheinländer ,
No. This Application Dictionary Work . You can do the follwoing :
Step 1: Login as System, open Validation Rule, create a new validation rule . Put the following :
Name :C_Order SO to be invoiced (SO Only) or any name you like
Description :Ordered <> Invoiced ( or any desc, you like)
Entity Type : User Maintained.
Type : SQL
Validation Code :DocStatus NOT IN ('DR','IP') AND AD_ORG_ID = @AD_Org_ID@ AND EXISTS (SELECT * FROM C_OrderLine WHERE C_Order.C_Order_ID=C_OrderLine.C_Order_ID AND QtyOrdered <> QtyInvoiced) AND IsSOTrx='Y' AND EXISTS (SELECT * FROM C_DOCTYPE dt WHERE dt.C_DOCTYPE_ID=C_DOCTYPETARGET_ID AND dt.DOCSUBTYPESO IN ('SO'))
Step 2: Open Report & Process, select Generate Invoices -> Goto Parameter Order -> and select dynamic validation we created in step1.
I hope this helps.
it worked! 1000 thanks! That was great and so simple.
Glad to hear that the issue is sloved .
Have a Good Day :)
I had a problem to generate shipment and invoice from Sales order - I have used Binding offer as a document which was converted from Proposal, invoice rule for this partner is set to Immediate and shipment rule to Force because items that are on SO haven't been niether bought or produced. ( Those items are also inside some project but I also couldn't generate SO from project so I made it manually ). Now when I go to Generate Shipment/Inovoice from (Manual) this order isn't available. Does anybody knows the reason why this happened?
I forget to mention that I am using Adempiere 3.7.0. version with postgresql 8.4
Try changing the document to a Standard Order and completing. The system should not create a shipment if the document is only a proposal or a quote. It should (as I remember) then create the invoice automatically because of invoice rule=immediate. You will still need to generate the shipment.
thanks but as I made Binding offer from proposal, shoudn't than I have option to create shipment and invoice from Binding offer?
Proposal … just an offer to sell something at a particular price (etc)
Binding Offer … a proposal that reserves stock for a period while the customer makes up their mind
Standard Order (and POS, On Credit, Warehouse Order) … when completed will create a shipment and/or invoice or allow you to create a shipment and/or invoice.
Ok thanks, I missed that for Binding offer, I thought it's the same as Standard order.
I try several times to generate Pro Forma Invoice from different documents - for example from Standard Order and from Invoice ( Customer) . Even if I set it on Document Type that those documents have option to generate Pro Forma Invoice I couldn't find the way to do it. Probobly I missed something but I couldn't find any explenation on net nor I succeeded myself. Does anybody can help about it?
I don't believe the functionality was implemented - but if it's just to confirm pricing to a customer you might define a second print format for the Sales Order … this one titled Pro Forma Invoice and then from the print preview (of the Sales Order) select this new printformat from the PrintFormat dropdown (centre of the toolbar).
Thanks Colin, no problem with print format
I have few questions if somebody had experince with it:
1) how to change status of shipment and inovice when generate with "Generate shipments and invoices manual", I tried to change default logic in Status of document in this proces from CO to PR but no changes I saw - also this is not implemented in ZK webui?
2) Is it posible when generating shipment from SO with Invoice rule "Immediate" and Shipment rule "Force" at business partner level to happen that some items are not generated in same quantity like in SO?
What does mean in Shipment line "Movement Quantity"?