Skip to content

Commit

Permalink
- Add support to document type of web store
Browse files Browse the repository at this point in the history
  • Loading branch information
yamelsenih committed Oct 29, 2021
1 parent ad3e29c commit f0ecf8f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,10 @@ private Order.Builder createOrder(CreateOrderRequest request, String transaction
// Price List
salesOrder.setM_PriceList_ID(store.getM_PriceList_ID());
// Document Type
int documeDocTypeId = MDocType.getDocTypeBaseOnSubType(store.getAD_Org_ID(), MDocType.DOCBASETYPE_SalesOrder, MDocType.DOCSUBTYPESO_InvoiceOrder);
int documeDocTypeId = store.get_ValueAsInt("C_DocType_ID");
if(documeDocTypeId <= 0) {
documeDocTypeId = MDocType.getDocTypeBaseOnSubType(store.getAD_Org_ID(), MDocType.DOCBASETYPE_SalesOrder, MDocType.DOCSUBTYPESO_InvoiceOrder);
}
// Validate
if(documeDocTypeId <= 0) {
throw new AdempiereException("@C_DocType_ID@ @IsMandatory@");
Expand Down

0 comments on commit f0ecf8f

Please sign in to comment.