metasfresh-webui-api-legacy icon indicating copy to clipboard operation
metasfresh-webui-api-legacy copied to clipboard

Problems on invalid entries saving

Open metas-rc opened this issue 7 years ago • 2 comments

Is this a bug or feature request?

  • Bug

What is the current behavior?

There are several problems with invalid data in webui

  1. I cannot create a manual invoice line without setting ASI ( on webui)
  2. When an invalid entry is saved, I don't always see the error message in webui, even if I see it in swing

Which are the steps to reproduce?

  • Create a manual Sales Invoice, set a partner and doc type.
  • Create a line using Add New **Directly when I press add new, the line looks like saved:

image

  • Add a product and qty to the line:
  • Check the inspection: The product looks saved

image

  • The valid status for the line is false because of the mandatory attribute set instance

image

  • Check the database

  • the product is not saved there

  • The attributesetinstance has value 0 ( as in swing)

  • Do not set anything in ASI

  • Press Done

  • NOK: No error about the asi missing, no red line

  • NOK: The rows look valid now

  • Press complete;

  • NOK: Now I get an error about the line not being the mandatory value set:

{timestamp: 1506943353892, status: 500, error: "Internal Server Error",…} error : "Internal Server Error" exception : "de.metas.document.exceptions.DocumentProcessingException" message : "Not all changes could be saved↵document: Document{tableName=C_Invoice, id=1000011, windowNo=18, writable=true, valid=Invalid('M_AttributeSetInstance_ID is mandatory.'), validOnCheckout=Invalid('M_AttributeSetInstance_ID is mandatory.'), saveStatus=DocumentSaveStatus{saved=false, hasChangesToBeSaved=true, error=true, reason=M_AttributeSetInstance_ID is mandatory.}, saveStatusOnCheckout=DocumentSaveStatus{saved=false, hasChangesToBeSaved=true, error=true, reason=M_AttributeSetInstance_ID is mandatory.}}↵Belegverarbeitung: null" path : "/rest/api/window/167/1000011" status : 500 timestamp : 1506943353892

  1. Example
  • GO to product price, try to create one that is similar with another product price ( with no attributes or handling units) ** OK: On swing I get an error:

Zum Produkt [Product Value] und der Preislistenversion Testpreise Kunden (Deutschland) darf es nur einen Haupt-Preisdatensatz geben. ** NOK: On webui I see nothing. If I want to move to another window, or press back etc, I am only asked if I want to leave the faulty entry, with no other information.

What is the expected or desired behavior?

  • The ASI shall be set to 0 if I don't change it
  • The Product must be set when I set it
  • I want to know why an entry is not correct without checking the logs and the console.

metas-rc avatar Oct 02 '17 11:10 metas-rc

tried but i cannot reproduce it on w101. Is this bug gone?

teosarca avatar Oct 18 '17 14:10 teosarca

i get different error but mostly the problems are like above check: https://w101.metasfresh.com:8443/window/167/1000008 document is not saved because

hasChanges:true
reason:"M_AttributeSetInstance_ID is mandatory."

the product line is not red! and if you want to complete you get:

error:"Internal Server Error"
exception:"de.metas.document.exceptions.DocumentProcessingException"
message:"Not all changes could be saved↵document: 145819↵Belegverarbeitung: null"

metas-lc avatar Oct 20 '17 12:10 metas-lc