Losses
Endpoints
Create / update losses
/companies/{companycode}/establishments/{establishmentcode}/losses |
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
companyCode |
Current context company code |
string |
Path |
establishmentCode |
Current context establishment code |
string |
Body |
body |
Delete losses
/companies/{companycode}/establishments/{establishmentcode}/losses |
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
companyCode |
Current context company code |
string |
Path |
establishmentCode |
Current context establishment code |
string |
Body |
body |
Data structure
ScrapQuantity (Create / update losses)
Name | Description | Value | Associated rules |
---|---|---|---|
companyCode |
Company code |
string |
|
establishmentCode |
Establishment code |
string |
|
moNb |
The manufacturing order number |
string |
|
at |
The date of the scrap quantity |
string |
|
quantity |
Losses quantity |
||
lossReasonCode |
Loss reason code |
string |
|
comment |
Comment |
string |
ScrapQuantity (Delete)
Name | Description | Value | Associated rules |
---|---|---|---|
companyCode |
Company code |
string |
|
establishmentCode |
Establishment code |
string |
|
moNb |
The manufacturing order number |
string |
|
at |
The date of the scrap quantity |
string |
Quantity
Quantity data structure.
Name | Description | Value |
---|---|---|
value |
Quantity |
BigDecimal |
unitCode |
Quantity unit code |
string |
Rules
R1
moNb should refer to a resource that exists for these companyCode and establishmentCode.
If MO already exists and is awaiting, scrap quantity cannot be added.
R3
quantity should be different than 0.
If a scrap quantity exists for companyCode, establishmentCode, moNb and at, this scrap quantity will be updated.
If scrapReason is to remove from done; quantity cannot be greater than good quantities.