selectline-software / selectline-api

Apache License 2.0
24 stars 5 forks source link

Can't add a line item in document when quantity is defined #326

Closed ccfrusano closed 1 year ago

ccfrusano commented 1 year ago

Details

To replicate it, I use the following parameters:

  "ArticleNumber": "11535098",
    "UnitPrice": "2.99",
    "CalculatedQuantityValue": 2,
    "WarehouseId": "2",
    "StoreInformation": 
    [     {       
        "ArticleNumber": "11535098",
        "Warehouse": "2",       
        "Quantity": 2  
        }      
     ]    
}

On the other hand, when I pass quantity 0, it works:

{   "ArticleNumber": "11535098",
    "UnitPrice": "2.99",
    "CalculatedQuantityValue": 0,
    "WarehouseId": "2",
    "StoreInformation": 
    [     {       
        "ArticleNumber": "11535098",
        "Warehouse": "2",       
        "Quantity": 0
        }      
     ]    
}

image Added with no quantity: image

Of course, I've checked the stock of the item, and there is: image

I don't get why this is not working. Thanks Carlos

MatthiasGuse commented 1 year ago

Hello,

please remove Line 4 "WarehouseID" in your request body. This is not needed in this case. Also check the value for "Warehouse" in Line 8. This should be your own storagenumber. grafik

Best regards

ccfrusano commented 1 year ago

Hello,

Thanks for your answer. I've removed the line that you suggested, and also checked the value for "Warehouse" which was correct, it still didn't work. On another side, if I try with another type of document like an Order (F), or Purchase Order (B) it works without any problem. Is there anything else that I can try? image image

Best regards

MatthiasGuse commented 1 year ago

Please check the settings of the stock: grafik If the first checkbox is set, i can confirm the behavior.