initialer Upload
This commit is contained in:
52
Assmann/51_erp_dbs_invoiceworkflow.jpl
Normal file
52
Assmann/51_erp_dbs_invoiceworkflow.jpl
Normal file
@@ -0,0 +1,52 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Hook for dbs | invoice
|
||||
// => ERP-Functions (Communication with ERP)
|
||||
// File-Encoding: UTF-8 without BOM( Test: ü,ä,ö )
|
||||
//------------------------------------------------------------------------------
|
||||
// Created/Edited | Description
|
||||
//------------------------------------------------------------------------------
|
||||
// 08.2017 | dbs | invoice workflow 1.1.0
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
vars lGMF_ERP_SYSTEMS[2] = { "XML", "WCS2" } // init array for erp system types
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// general ERP Configurations
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
global gGMF_ERP_SYSTEM = lGMF_ERP_SYSTEMS[1] // XML: 1, WCS2: 2 configure the erp type
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// getMetaDataFromERP
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
proc getMetaDataFromERP()
|
||||
{
|
||||
vars lReturnValue = 0
|
||||
if( gGMF_GET_ERP_META_DATA_HOOK == "1" )
|
||||
{
|
||||
}
|
||||
|
||||
return lReturnValue
|
||||
} // end of getMetaDataFromERP
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// createRecordInERP
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
proc createRecordInERP( pDocId )
|
||||
{
|
||||
vars lReturnValue = 0
|
||||
vars lStorage
|
||||
|
||||
lReturnValue = api_function( "attribute_get_single", gDDF_STORAGE, 0, pDocId, "Master" )
|
||||
if ( lReturnValue == 0 && api_single_info != "" )
|
||||
{
|
||||
lStorage = api_single_info
|
||||
}
|
||||
|
||||
if( gGMF_ERP_SYSTEM == lGMF_ERP_SYSTEMS[2] && lStorage == gSTORAGE_WORKFLOW )
|
||||
{
|
||||
// do WCS2 function create record and start workflow
|
||||
return createRecordInWCS2( pDocId, gGMF_WEB_SERVICE_URL )
|
||||
}
|
||||
|
||||
return lReturnValue
|
||||
} // end of createRecordInERP
|
||||
Reference in New Issue
Block a user