Quotation from ERP vs Quotation from Bahmni - Problem in Auto PO Generation

Login to ERP. Sales->Products-> “Aceclofenac 100mg”->Edit->Ensure “Can be purchased” is selected. Information->Sale Price- “10” Procurements->Procurement Method - “Make to order” (so that auto PO is generated), Supply Method - “Buy”, Cost Price - “7”, MRP-“7” Ensure Supplier name exists. ->Save. Register a new patient->Start OPD Visit->Save.

Quotation through ERP Route - Generates Auto PO for the supplier. Go back to ERP. Customers->Select newly created patient->Quotations->Create->Add item->“Aceclofenac 100mg” 8 units. Save->Confirm Sale->Amount Paid - enter Full amount. Save. Warehouse->Run Schedulers. Purchase->Quotation. This generates quotation (draft PO) for the supplier.

Quotation through Bahmni Route - Does not generate Auto PO for the supplier. Now From Bahmni Dashboard->Clinical->Select newly created patient->Consultation->Medications->Drug Name - “Aceclofenac 100mg”. Select appropriate dosage, quantity etc. Save. This will generate Quotation in ERP.

Go back to ERP. Sales->Quotation->Open newly created quotation for our patient->Confirm Sale->Amount Paid - enter Full amount. Save. Warehouse->Run Schedulers. Purchase->Quotation. This too should have displayed quotation (draft PO) for the supplier of “Aceclofenac 100mg” but it does not.

Is this time zone issue?

We programmatically create Sales Quotation when prescription is added via Bahmni. This use case must have been missed in the code.

I think if we understand what is different in our programmatic line item in Sales Quotation and manually added line item then it will be easier to tackle this use case.

Hi! am sorry for this but I badly need a help on this. I have created a pricelist for certain product but on creating customer quotation unfortunately the unit price of the choosen product does not change. When I select the product it pop up with the price that I have created in my pricelist then it turns back to zero. Any who can help me with this it argent plz. thank you in advance

@zainab Can you also share the screenshot the pricelist settings you have set for this product?


I have set up a test pricelist for a product ([PCM] Paracetamol 60ml (Syrup)) on erp-demo.mybahmni.org. It seems to be working fine there. Try your use case on demo environment once if you can.

My pricelist settings


Can you please try/verify the following things on the Pricelist settings:

  1. Update the minimum quantity to 1.
  2. In the field “Based on” - select the default base price on which you want the price computation to be applied
  3. In one of the fields you have mentioned 1500. This means that the 1500 INR will be added to all base prices. Are you sure you want to do that? In case you are looking to set 15%, make the value as 0.15 instead.

@sruti You are right that it works for Paracetamol 60 ml but it doesn’t work for Aceclofenac 100mg (Tablet) on demo. The only difference between these 2 products is Aceclofenac has Product Lot (Batch Serial Numbers) and Paracetamol 60 ml does not.

As @zainab pointed, for Aceclofenac it shows discounted price as set in the price list rule but immediately changes back to product sale price.

Further debugging this shows that it calculates the correct discounted price as set in the price list rule but then this gets triggered forcing the Unit Price on quotation back to Product Sale Price.

Keep monitoring Unit Price in this video to notice the quick change on selecting a product and how it reverts 1.8 (discounted) to 2.0 (Sale price) for Acceclofenac. It also changes from 1.8 (discounted) to 2.0 (sale price) but sets it back to 1.8 (discounted) for Paracetamol 60ml.

I have done that but still does not change anything. It takes the discount price then it turns back to product price

@zainab This looks like a defect. Can you please raise a Jira card for this and post the link on this thread?

Thanks @ramashish. Would you be able to raise a PR for this?