Set Proper Shipment Type: MM Shipment Indirect
This commit is contained in:
parent
1110811c71
commit
fd70983c8c
|
@ -218,7 +218,13 @@ public class MenuManager
|
|||
|
||||
public static MWebMenu createSubMenu(Properties ctx,String menuName, String menuLink, String moduleName, int parentId, int sequence, String category) throws OperationException
|
||||
{
|
||||
MWebMenu menu = new MWebMenu(ctx, 0, null);
|
||||
MWebMenu menu;
|
||||
try {
|
||||
menu = new MWebMenu(ctx, getMenuId(ctx, menuName), null);
|
||||
} catch (SystemException e)
|
||||
{
|
||||
menu = new MWebMenu(ctx, 0, null);
|
||||
}
|
||||
menu.setParentMenu_ID(parentId);
|
||||
|
||||
if(!menuLink.contains("javascript"))
|
||||
|
|
|
@ -260,8 +260,19 @@ public class MinOutManager extends AbstractDocumentManager
|
|||
inOut.setIsSOTrx(true);
|
||||
inOut.setDescription("Shipment");
|
||||
|
||||
inOut.setC_DocType_ID(MDocType.DOCBASETYPE_MaterialDelivery);
|
||||
|
||||
//inOut.setC_DocType_ID(MDocType.DOCBASETYPE_MaterialDelivery); // @Trifon
|
||||
int [] docTypeShipmentIndirectId = MInvoice.getAllIDs(MDocType.Table_Name,
|
||||
"AD_CLIENT_ID="+Env.getAD_Client_ID(ctx)
|
||||
+ " AND DocBaseType='"+MDocType.DOCBASETYPE_MaterialDelivery+"' "
|
||||
+ " AND IsActive='Y' "
|
||||
+ " AND IsSOTrx='Y' "
|
||||
+ " AND Name = 'MM Shipment Indirect'", trxName);
|
||||
if (docTypeShipmentIndirectId.length > 0)
|
||||
{
|
||||
inOut.setC_DocType_ID( docTypeShipmentIndirectId[0] );
|
||||
} else {
|
||||
inOut.setC_DocType_ID(MDocType.DOCBASETYPE_MaterialDelivery); // @Trifon; old behavior
|
||||
}
|
||||
|
||||
PoManager.save(inOut);
|
||||
|
||||
|
|
Loading…
Reference in New Issue