Hi Members,
Suggest me a solution to get the same sales order number to the purchase order number ( i.e If I am assigning a sales order number to be 19999, I need to get the same number as the purchase order number). Please help me out by providing a proper solution to this.
Thanks and Regards,
Janarthanan V
Hi,
At the time of Creating PO from SO, simply assign the SO No. to PO No. & If you want Create PO then use the default No. series functionality of system.
Regards
Amit Sharma
www.erpconsultors.com
Pls press Yes if info is useful.
Dear ZHU,
I would like to explain you that my requirement is as follows.
1. If I am creating a purchase order through the sales order, the purchase order number that is being generated must follow the customization that I had done in the no. series.
2. If I am creating a purchase order ( Directly ), then at this time, the purchase order number that is being generated must follow the default number series pattern that had been set earlier in the no. series.
The difference between my requirements is that direct purchase order number must follow the default no. that had been set in the no. series and the purchase order that had been created from the sales order must follow the customized no. that had been set in the no. series.
Please provide me an appropriate solution for solving my problem.
Thanks and Regards,
Janarthanan V
Hello recently I made a similar development, in which I used the native function, to replicate it in another function and add the relationship of the sales order to the purchase order then add this to supplier movements and accounting movements so that the relationship that is born from a sales order appears.
What I recommend is to enter the Objet designer
This is the native action of the sales order page
action(CreatePurchaseOrder)
{
ApplicationArea = Suite;
Caption = 'Create Purchase Orders';
Image = Document;
Promoted = false;
//The property 'PromotedCategory' can only be set if the property 'Promoted' is set to 'true'
//PromotedCategory = Category8;
//The property 'PromotedIsBig' can only be set if the property 'Promoted' is set to 'true'
//PromotedIsBig = true;
ToolTip = 'Create one or more new purchase orders to buy the items that are required by this sales document, minus any quantity that is already available.';
trigger OnAction()
var
PurchDocFromSalesDoc: Codeunit "Purch. Doc. From Sales Doc.";
begin
PurchDocFromSalesDoc.CreatePurchaseOrder(Rec);
end;
}
the native code unit is : codeunit 1314 "Purch. Doc. From Sales Doc."
In this codeunit you can insert in the header of your order or purchase invoice a relationship that you can choose already established in your sales order
Nice to meet you
Kind regards
Gabriel Prinz
the question reminds me of this:
as other have said this is not a good idea - and to expand on this its not good in terms of an audit trail as well. Lets say your auditor comes and asks to see posted purchase invoice no. 101103 or to see the general ledger entries for this purchase invoice. Assuming both the sales and purchase invoice are posted on the same date, you're going to go to your GL and pull up entries for both the purchase and sales invoice? There is a reason each document needs a unique number.
In a multi user environment with several people working with sales order creating a solution where you base it on number series being in sync will never work in the real world.
Then you at least would need separate number series pr. user. And even that will be hard to maintain. One sales order being deleted or on PO being deleted and you are out of sync.
I could really not recommend that approach.
Hi, If you don't want to customize, you need to ensure that the Last No. Used of the No. Series used in SO and PO is consistent.
Hope this helps as well.
Thanks.
ZHU
Dear Inge M. Bruvik,
I have attached the image in the question along with the description and please provide me an appropriate solution by reffering to that
Thanks and Regards,
Janarthanan V
[/quote]Hi,
I fully understand what your requirement is, and this can be achieved pretty simple in code. For the standard flow. In it simplest form you can manually change the purchase order number to be what ever you want it to be after the PO is created.
The thing is that i would not recommend that you implement such a function because it has some consequences for the rest of the system that can be hard to realize at first. And it might get you into a situation where you want start using new functionality in the future that this customization will prevent you from using.
The standard functionality gives you a perfectly good relation between a sales order and a purchase order that you can use for reporting and to follow up both on your customers and your vendors.
That is why i am trying to urge you to really understand the standard functionality before you decide that it does not fill your needs and you will need a customization for it.
It looks like Inge has provided the right solution for your requirement.
The standard functionality for drop shipments enables the link between a purchase and a sale.
There is no standard feature to get the same document number on two different documents. Why do you need that?
Keep in mind that in some countries, maintaining a correct numbering sequence for business transactions is required by the law.
You can change the document numbering through code. But that might breach compliance and get into trouble with a financial audit.
Dear Inge M. Bruvik,
I have attached the image in the question along with the description and please provide me an appropriate solution by reffering to that
Thanks and Regards,
Janarthanan V
Sorry, here is the link also for drop shipment.
Sohail Ahmed
2,655
Mansi Soni
1,574
YUN ZHU
1,453
Super User 2025 Season 1