Duplicates in product templates

Donate to this project

Development Project Status: Under Discussion

Total cost estimate (ex-Tax): 
Due date for completion of this stage: 
Project funding: 

You can donate money to this project by entering the amount above and clicking the 'Add to cart' button. In the Checkout process you can either choose to pay now (via Bank Transfer, Cheque or Pay Pal) or you can pledge the amount by choosing the 'Pledge a payment for a Development Project' method. If you make a pledge, then when we have 100% funding commitments, you will be notified by email and you can then action your payment. Note that development will not commence until all funds are received.

Project description: 

When product templates in OpenVPMS are expanded, duplicate products are merged so that only a single line item appears with the cumulative quantity.

This is useful for nested templates that include common products, but means that a fixed price is only charged once. This doesn't support the case where pain relief may be administered several times, and a fixed price is charged each time.

To support duplicates in templates, a new Merge Duplicates flag will be added, to indicate how duplicates should be handled.
When selected, all duplicates included by the template will be merged. This is the current behaviour, and will be the default.
When deselected, any duplicates included by the template won't be merged.

Nested Templates

When a template includes nested templates, the Merge Duplicates flag applies to the immediate template. e.g given:

  • template A, Merge Duplicates = false
    • tempate B, Merge Duplicates = true
      • product 1, quantity = 1
      • product 1, quantity = 1
    • template C, Merge Duplicates = true
      • product 1, quantiy = 1

The invoice or estimate will contain the lines:

  • product 1, quantity = 2
  • product 1, quantity = 1

Supplier Orders

If a template is expanded in a supplier order, the Merge Duplicates flag will be ignored, and duplicates will always be merged.



Syndicate content