metasfresh / metasfresh

We do Open Source ERP - Fast, Flexible & Free Software to scale your Business.
http://metasfresh.com/en
GNU General Public License v2.0
1.8k stars 606 forks source link

New contract Type: Yearly Bonus from vendors #3999

Open metas-mk opened 6 years ago

metas-mk commented 6 years ago

Is this a bug or feature request?

Feature Request

What is the current behavior?

Currently, there is no contract type for yearly Bonus in metasfresh until now.

Which are the steps to reproduce?

Open, try and see.

What is the expected or desired behavior?

Implement a yearly bonus contract Type that meets the following criteria:

metas-ts commented 6 years ago

How to configure it

image

image

How to create a contract

image

image

image

image

this is the "normal" IC that can lead to the "refund" IC beeing created or updated

Matching with a contract is done via

image

metas-dh commented 6 years ago

Results of IT1 tested in mf15

I. Swing:

  1. created contract type Bonus (Rückvergütung) with:
    • bonus based on a specific product
    • has a percentage value (% of revenue for that product as a bonus): 1%
    • invoicing schedule (monthly, quarterly, half-yearly, yearly): quarterly
    • document type (Invoice, credit memo): credit memo
  2. created contracts of that type from bpartner window:
    • contracts were created for all bpartners, with the resp. product and the resp. start date: OK
    • ran the create contract action again, for the same bpartners, same product, same start date: more contracts were created, no info that contracts with the same parameters were already existing: NOK
    • metas-ts: fixed
  3. ICs for bonus contract:
    • have the price set correctly: % of revenue for that product, => 1% of the resp. price: OK
    • invoicing schedule: quarterly was set in contract, also set in IC, but the invoicing date is date of test: NOK
    • ICs have zu Akt. set, not changed (only until invoice is created, here: invoice for material receipt): NOK i think
    • metas-ts: fixed
  4. created invoice for material receipt, created for the purchase order (see https://github.com/metasfresh/metasfresh/issues/4001#issuecomment-391331145):
    • IC for bonus contract (purchase side):
    • price is doubled,
      • metas-ts: fixed
    • and the invoicing date is set for 1st day of next quarter (1.7.18): NOK i think?
      • metas-ts: "fixed": now it's 1.8...i.e. 3 months ("1 quarter") after the contract start; we'll see if that's OK
    • IC for bonus contract (sales side): price is the same, but the invoicing date is set for 1st day of next quarter (1.7.18): NOK i think?
  5. created invoice for the IC for bonus contract (purchase side):

II. WebUI:

  1. tried to create contract type Bonus (Rückvergütung) as described above:
    • not possible bc mandatory field missing ("behaviour when extending contract"): => not needed for contract type bonus and not displayed: NOK
    • metas-ts: fixed by @metas-mk via applicaction dictionary
  2. tried to create a contract of that type from bpartner window:
    • => bpartner had no location set, but got no error msg like in Swing, just nothing happened: NOK, https://github.com/metasfresh/metasfresh-webui-api/issues/968
    • => although i had filtered for that 1 bpartner, bonus contracts were created for all bpartners: NOK
    • metas-ts: fixed, now it won't create the contract but behave similar to the "no-location-set" case
metas-dh commented 6 years ago

Results of IT2 tested in mf15

I. Swing:

  1. created contracts of that type from bpartner window:

    • ran the create contract action again, for the same bpartners, same product, same start date:
    • msg for user that a contract with those parameters is already existing: OK
    • msg also includes info about new contract created: new contract has the same Params as the already existing one, but status: Draft: cannot be completed: NOK, no contract shall be created at all!
  2. ICs for bonus contract:

    • have the price set correctly: % of revenue for that product x qty of received product (after material receipt): OK
    • invoicing schedule: quarterly was set in contract, also set in ICs, invoicing date is start date of contract + 3 months (in my case, 01.08.2018): OK
    • ICs don't have zu Akt. set anymore: OK
  3. created invoice for material receipt, created for the purchase order (see #4001 (comment)):

    • IC for bonus contract (purchase side):
      • price is not doubled, but remains the same: OK
      • invoicing date remains set for 1st day of next quarter (= start date of contract + 3 months: OK
    • IC for bonus contract (sales side): price is the same, remains set for 1st day of next quarter (= start date of contract + 3 months: OK
  4. wanted to create invoice for the IC for bonus contract (purchase side): did not work, see #4083

II. WebUI:

  1. tried to create contract type Bonus (Rückvergütung):

    • when setting contract type "Rückvergütung", the mandatory field ("behaviour when extending contract") disappears, and you cannot save the contract type: you have to set the mandatory field first and then set the contract type: NOK imho
  2. tried to create a contract of that type from bpartner window:

    • had filtered for 1 bpartner, bonus contract was created this bpartner only, not for all bpartners: OK
metas-rc commented 6 years ago

Please, also check if the invoice candidates were created correctly ( see IT of https://github.com/metasfresh/metasfresh/issues/4444)