postnl/postnl-magento1-End-of-life

{[13804] Insurance value is invalid}

Closed this issue · 6 comments

Submitting issues trough Github

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: https://tig.nl/postnl-magento-extensies/

Issues with outdated version will be rejected.

  • [ X ] I've verified and I assure that I'm running the latest version of the TIG PostNL Magento extension.

What is the purpose of your issue?

  • [ X ] Bug report (encountered problems with the TIG PostNL Magento extension)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

We're getting the following error when clicking on the "PostNL - Print Verzendlabel" button:

Er is een fout opgetreden tijdens het verwerken van uw verzoek:Validation failed for shipment: 3STOTA646783173, Messages: 3STOTA646783173: {[13804] Insurance value is invalid}

  • We've first created an invoice for the order,
  • Then we're creating a shipment
  • We're trying to print the shipping label

Explanation of your issue in arbitrary form goes here. Please make sure the [description is worded well enough to be understood]. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

TIG supportdesk

On Github we will respond in English even when the question was asked in Dutch.

Hi @edwinknol-mediact,

I'm assuming that you are trying to confirm a shipment with insurance (extra cover).

In the database, there is a field named "extra_cover_amount" in the tig_postnl_shipment. Could you tell me what the value of this of this field in the shipment you are trying to confirm?

Hi @tig-dennisvanderhammen

I've checked the shipment in the database. The value of "extra_cover_amount" is NULL. When is set a value by hand in this field, i'm able to print the shipping label.

@edwinknol-mediact, The servers of PostNL don't allow a value of 0 or lower to be insured. We recently did change the behaviour how the extra cover amount works.

In the past we would take the shipmentBaseGrandTotal and ceiled it to the nearest 500 (for example, when the total is 1150 euro, the extra cover amount would be 1500) with the minimum being 500. A change in the PostNL service allows this to be any number above zero. Now we simply return the shipmentBaseGrandTotal.

If you're certain the shipmentBaseGrandTotal is also above 0, you can check the code based around the method getDefaultExtraCoverAmount() in TIG/PostNL/Model/Core/Shipment.php.

If you can't figure out a solution, could you send us an e-mail at servicedesk@tig.nl with access to a staging environment where you can reproduce this issue?

Hi @edwinknol-mediact ,

I'm not 100% sure, but it seems you didn't mail us about this issue. Correct?
Did you figure out a solution or do you still want us to take a look at it?

Kind regards,

Jasper
TIG

Hi @tig-jaspersmits

Sorry for not replying anymore. We've fixed the issue, so this bugreport can be set closed.

Edwin

Hi Edwin,

No problem! Good to hear that you found a solution.
Hereby i will close this bugreport.

Kind regards,

Jasper
TIG