metafresh logo and link to homepage

IT FRESH-559

#252 Fix the code for ADR Attribute Retrieval

Testcase to check if ADR Attribute Retrieval is working for organizations without sysconfig for ADR Attribute set.

  1. Log in with Org I

  2. Open Sys Config, and make sure de.metas.fresh.ADRAttribute is not set (or it has the value -1)

  3. Open G000X in bpartner, and set ADR vendor = Y, also select an ADR value

  4. Also set G000X as ADR customer

  5. Open pricelist CP, and set an attribute price for P0002:
  6. Create a purchase order, with G000X as vendor

  7. With QuickInput, add an orderline for P0001
  8. Create a sales order for G000X as customer

  9. With QuickInput, add an orderline for P0002

Regression:

  1. Make sure ADR attribute can be added manually to the orderline, wihtout causing errors when setting it / when completing the order
  2. Make sure ADR attribute is set in purchase orderline of ADR vendor after quick input if de.metas.fresh.ADRAttribute is set for the organization
  3. Make sure ADR attribute is only set in sales orderline if the selected product has an attribute ADR price, not just if the bpartner is set as ADR customer

Zur Quelldatei auf github.com