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.74k stars 591 forks source link

Add option to automatically credit open invoice for terminated contract / subscription #3355

Closed metasnw closed 6 years ago

metasnw commented 6 years ago

Is this a bug or feature request?

What is the current behavior?

http://docs.metasfresh.org/webui_collection/EN/Contract_termination.html

What is the expected or desired behavior?

cristinamghita commented 6 years ago

Dev test

Simple contract

metas-ts commented 6 years ago

CPed into release

metas-lc commented 6 years ago

IT

. invoice - cancel contract - credit memo OK

  1. create new sales order, add product and a flatrate condition for that bpartner and product
  2. complete the order => new contract was created OK => status running (laufend) OK
  3. create invoice
  4. go to contract and cancel it (kündigen) + credit open invoices => contract status is now Quit (Gekündigt) OK => new credit memo was created for my invoice. Invoice is paid OK

. extend contract - invoices - cancel contracts - credit memos NOK?

  1. create a new sales order, add product and same flatrate condition from step 1
  2. complete the order => new contract was created OK => status running (laufend) OK
  3. extended contract => contract extended with a month in my case => new contract created, new IC created
  4. go to IC window and invoice both ICs (one by one) => 2 new invoices created
  5. go to contract window and cancel the initial contract, choosing to credit open invoices => Error: Für den Abo-Wechsel von 'TestAbo lc' zu 'Qu' zum Datum Mar 20, 2018 sind keine Wechsel-Konditionen hinterlegt. OK??? Edit: OK because i didn't have Transition Conditions in Contract Period. Retested with new data: new contract term and period, canceled the first contract and both contracts were canceled and the invoices payed OK
  6. go to extended contract and cancel it, choosing to credit open invoices => both contracts are canceled OK => 2 new credit invoices are created, all 4 invoices are paid OK

. extend contract - invoices - pay 1 invoice/ cancel contracts - credit memos OK

  1. create a new sales order, add product and same flatrate condition from step 1
  2. complete the order => new contract was created OK => status running (laufend) OK
  3. extended contract => contract extended with a month in my case => new contract created, new IC created
  4. go to IC window and invoice both ICs (one by one) => 2 new invoices created
  5. make a payment for one invoice, complete it => that invoice is now paid
  6. go to extended contract and cancel it, choosing to credit open invoices => both contracts are canceled OK => 1 new credit invoice is created, all invoices are paid OK

. invoice - pay invoice - cancel contract OK

  1. create/complete a new sales order, add product and same flatrate condition from step 1 => new contract was created OK => status running (laufend) OK
  2. create invoice, pay it
  3. cancel the contract => contract is canceled OK => no credit invoice was created OK

. invoice - partial pay invoice - cancel contract - credit memo NOK

  1. create/complete a new sales order, add product and same flatrate condition from step 1 => new contract was created OK => status running (laufend) OK
  2. create invoice, pay the invoice partially => invoice is not paid yet OK
  3. cancel the contract => contract is canceled OK => credit memo was created, invoice was paid OK

. Regression test

  1. Create a sales order with flatrate conditions
  2. create invoice
  3. Go to contract window and cancel the contract, choosing NOT to credit open invoices =>The contract was cancelled OK => Invoice wasn't created/paid OK