|
Test Plan 1:
Install and configure Remittance Infrastructure module. You can follow directions in link bellow:
http://wiki.openbravo.com/wiki/Projects/Remittances/Configuration_Manual [^]
http://wiki.openbravo.com/wiki/Projects/Remittances/User_Documentation [^]
Install and configure SEPA Credit Transfer and SEPA Direct Debit modules:
http://wiki.openbravo.com/wiki/SEPA_Credit_Transfer_Customer-to-Bank/User_Documentation [^]
http://wiki.openbravo.com/wiki/SEPA_Direct_Debit_Customer-to-Bank/User_Documentation [^]
Be sure to add IBAN/SWIFT code to used business partners.
Test case 1: Without installing the external module and without executing any hook
Create any payment out, purchase order or purchase invoice document, to later be included into the remittance.
Create a Remittance header.
Remittance Type: SEPA Credit Transfer Customer-to-Bank (pain.001.001.03)
Add previously created order, invoice and/or payment by Select Payments or Select Orders or Invoices buttons.
Proccess the remittance.
Create Remittance File.
Notice in the <GrpHdr>
node you will find <NbOfTxs> and <CtrlSum> tags, for example something like this:
<GrpHdr>
...
<NbOfTxs>3</NbOfTxs>
<CtrlSum>200050.00</CtrlSum>
...
</GrpHdr>
Notice inside the <PmtInf> nodes, there aren't any of <NbOfTxs> and <CtrlSum> tags, it is right because this tags are optionals inside this node.
Repeat all steps but using Remittance Type = SEPA Credit Transfer Customer-to-Bank (pain.001.001.04).
Repeat all steps but using Remittance Type = SEPA Core Direct Debit Customer-to-Bank (pain.008.001.02).
Repeat all steps but using Remittance Type = SEPA Core Direct Debit Customer-to-Bank (pain.008.001.03).
Notice for all the cases that the <PmtInf> nodes, haven't any of <NbOfTxs> and <CtrlSum> tags.
Test case 2: Installing the external module and executing hooks to modify XML file
Install SEPA-Remittance Extensions module (org.openbravo.sepa.iso20022.extensions)
Apply module dataset.
Go to Remittance Type and check there are new params (PmtInf_CtrlSum and PmtInf_NbOfTxs) defined to the remittance types:
SEPA Core Direct Debit Customer-to-Bank (pain.008.001.02)
SEPA Core Direct Debit Customer-to-Bank (pain.008.001.03)
SEPA Credit Transfer Customer-to-Bank (pain.001.001.03)
SEPA Credit Transfer Customer-to-Bank (pain.001.001.04)
Select SEPA Credit Transfer Customer-to-Bank (pain.001.001.03) remittance type.
Go to Parameters tab and change values of PmtInf_CtrlSum and PmtInf_NbOfTxs to Y, to be able to add this nodes at the generated Payment info of each record included in the XML file.
Create any payment out, purchase order or purchase invoice document, to later be included into the remittance.
Create a Remittance header.
Remittance Type: SEPA Credit Transfer Customer-to-Bank (pain.001.001.03)
Add previously created order, invoice and/or payment by Select Payments or Select Orders or Invoices buttons.
Proccess the remittance.
Create Remittance File.
Notice in the <GrpHdr>
node you will find <NbOfTxs> and <CtrlSum> tags, for example something like this:
<GrpHdr>
...
<NbOfTxs>3</NbOfTxs>
<CtrlSum>200050.00</CtrlSum>
...
</GrpHdr>
Notice inside the <PmtInf> nodes, you will find <NbOfTxs> and <CtrlSum> tags too with more precisely information of the selected payment, for example something like this:
<PmtInf>
<PmtInfId>1000000-2017-06-13</PmtInfId>
<PmtMtd>TRF</PmtMtd>
<NbOfTxs>1</NbOfTxs>
<CtrlSum>108900.00</CtrlSum>
Repeat all steps but using Remittance Type = SEPA Credit Transfer Customer-to-Bank (pain.001.001.04).
Repeat all steps but using Remittance Type = SEPA Core Direct Debit Customer-to-Bank (pain.008.001.02).
Repeat all steps but using Remittance Type = SEPA Core Direct Debit Customer-to-Bank (pain.008.001.03).
Notice for all cases that <NbOfTxs> and <CtrlSum> tags are present inside the <PmtInf>
.
Test case 3:
Repeat test case 2 but only put the PmtInf_NbOfTxs parameter's value to Y.
Notice when you generate the XML file only this tag is added to <PmtInf>, the <CtrlSum> tag it is not added.
Test case 4: Error management
When the executed hook throws exceptions, the process show a popup message explaining that to the user:
"org.openbravo.base.exception.OBException: Error while executing the SEPA hook <Error message>".
To test it you can modify the SEPA_RemittanceHook.java of SEPA-Remittance Extensions module (org.openbravo.sepa.iso20022.extensions/hook) to simulate an exception when executing the hook, for instance you can modify the exec() method with something like this:
@ApplicationScoped
public class SEPA_RemittanceHook implements SEPA_RemittanceProcessHook {
private static final String PARAM_PMTINF_CTRLSUM = "PmtInf_CtrlSum";
private static final String PARAM_PMTINF_NBOFTXS = "PmtInf_NbOfTxs";
@Override
public <T> void exec(Remittance remittance, JAXBElement<T> doc) throws Exception {
if (doc.getValue() != null){
throw new OBException("error");
}
...
Create any payment out, purchase order or purchase invoice document, to later be included into the remittance.
Create a Remittance header.
Remittance Type: SEPA Credit Transfer Customer-to-Bank (pain.001.001.03)
Add previously created order, invoice and/or payment by Select Payments or Select Orders or Invoices buttons.
Proccess the remittance.
Create Remittance File.
Notice this time the XML file it is not generated but an error message is shown:
"org.openbravo.base.exception.OBException: Error while executing the SEPA hook org.openbravo.base.exception.OBException: error" |
|