Exportfile for AOT version 1.0 or later
Formatversion: 1
***Element: DBE
; Microsoft Dynamics AX Enumtype : SysDimension unloaded
; --------------------------------------------------------------------------------
ENUMTYPEVERSION 1
ENUMTYPE #SysDimension
Id 326
PROPERTIES
Name #SysDimension
Label #@SYS5951
UseEnumValue #Yes
ENDPROPERTIES
TYPEELEMENTS
#Department
PROPERTIES
Name #Department
Label #@SYS850
EnumValue #0
ENDPROPERTIES
#Center
PROPERTIES
Name #Center
Label #Pagador
EnumValue #1
ENDPROPERTIES
#Purpose
PROPERTIES
Name #Purpose
Label #Programa
EnumValue #2
ENDPROPERTIES
ENDTYPEELEMENTS
ENDENUMTYPE
***Element: DBT
; Microsoft Dynamics AX Table : BOMVersion unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BOMVersion
Id 27
PROPERTIES
Name #BOMVersion
Label #@SYS22799
FormRef #BOMConsistOf
TitleField1 #ItemId
TitleField2 #Name
TableContents #Base data
ConfigurationKey #BOM
SecurityKey #InventTables
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Main
PrimaryIndex #ItemIdx
ClusterIndex #ItemIdx
ModifiedDateTime #Yes
DEL_modifiedTime #Yes
ModifiedBy #Yes
DeveloperDocumentation #@SYS124099
EntityRelationshipType #Relationship
ENDPROPERTIES
FIELDS
FIELD #ToDate
Id 1
DATE
PROPERTIES
Name #ToDate
HelpText #@SYS25042
Table #BOMVersion
ExtendedDataType
ARRAY
#ToDate
#
ENDARRAY
ENDPROPERTIES
FIELD #FromDate
Id 2
DATE
PROPERTIES
Name #FromDate
HelpText #@SYS25043
Table #BOMVersion
ExtendedDataType
ARRAY
#FromDate
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemId
Id 3
STRING
PROPERTIES
Name #ItemId
HelpText #@SYS25044
Mandatory #Yes
Table #BOMVersion
ExtendedDataType
ARRAY
#ItemIdProduction
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #BOMId
Id 4
STRING
PROPERTIES
Name #BOMId
HelpText #@SYS25045
Mandatory #Yes
Table #BOMVersion
ExtendedDataType
ARRAY
#BOMId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Name
Id 5
STRING
PROPERTIES
Name #Name
HelpText #@SYS25046
Table #BOMVersion
ExtendedDataType
ARRAY
#Name
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #Active
Id 6
ENUM
PROPERTIES
Name #Active
AllowEditOnCreate #No
AllowEdit #No
Table #BOMVersion
ExtendedDataType
ARRAY
#BOMVersionActive
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Approved
Id 7
ENUM
PROPERTIES
Name #Approved
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #BOMApprove
Table #BOMVersion
ExtendedDataType
ARRAY
#BOMVersionApproved
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ApprovedBy
Id 8
STRING
PROPERTIES
Name #ApprovedBy
HelpText #@SYS27893
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #BOMApprove
Table #BOMVersion
ExtendedDataType
ARRAY
#ApprovedBy
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Construction
Id 9
ENUM
PROPERTIES
Name #Construction
Table #BOMVersion
ExtendedDataType
ARRAY
#BOMRouteVersionConstruction
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #FromQty
Id 10
REAL
PROPERTIES
Name #FromQty
HelpText #@SYS91666
Table #BOMVersion
ExtendedDataType
ARRAY
#FromQty
#
ENDARRAY
ENDPROPERTIES
FIELD #InventDimId
Id 12
STRING
PROPERTIES
Name #InventDimId
AllowEditOnCreate #No
AllowEdit #No
Table #BOMVersion
AnalysisVisibility #Low
ExtendedDataType
ARRAY
#InventDimId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SysSignApprove
Id 20
STRING
PROPERTIES
Name #SysSignApprove
Label #@SYS103383
AllowEditOnCreate #No
AllowEdit #No
Table #BOMVersion
ExtendedDataType
ARRAY
#SysSignId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SysSignActivate
Id 21
STRING
PROPERTIES
Name #SysSignActivate
Label #@SYS103384
AllowEditOnCreate #No
AllowEdit #No
Table #BOMVersion
ExtendedDataType
ARRAY
#SysSignId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#ItemId
#Name
#FromDate
#ToDate
#FromQty
#ApprovedBy
#Approved
ENDGROUPFIELDS
ENDGROUP
GROUP #Approval
PROPERTIES
Name #Approval
Label #@SYS2453
ENDPROPERTIES
GROUPFIELDS
#ApprovedBy
#Approved
ENDGROUPFIELDS
ENDGROUP
GROUP #Description
PROPERTIES
Name #Description
Label #@SYS6303
ENDPROPERTIES
GROUPFIELDS
#Name
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#ItemId
#BOMId
#InventDimId
#Active
#FromDate
#ToDate
#FromQty
ENDGROUPFIELDS
ENDGROUP
GROUP #Signatures
PROPERTIES
Name #Signatures
Label #@SYS103389
ENDPROPERTIES
GROUPFIELDS
#SysSignActivate
#SysSignApprove
ENDGROUPFIELDS
ENDGROUP
GROUP #System
PROPERTIES
Name #System
Label #@SYS4278
ENDPROPERTIES
GROUPFIELDS
#Construction
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#ItemIdx
Id 1
PROPERTIES
Name #ItemIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#ItemId
#BOMId
#RecId
ENDINDEXFIELDS
#ItemFromToIdx
Id 2
PROPERTIES
Name #ItemFromToIdx
ENDPROPERTIES
INDEXFIELDS
#ItemId
#FromDate
#ToDate
ENDINDEXFIELDS
#BOMIdx
Id 3
PROPERTIES
Name #BOMIdx
ENDPROPERTIES
INDEXFIELDS
#BOMId
#ItemId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #allowEdit
#///
#/// Determines whether it is allowed to edit the BOMVersion record.
#///
#///
#/// A record that holds the BOM parameters.
#///
#///
#/// true if the BOM version record may be edited; otherwise, false.
#///
#public boolean allowEdit(BOMParameters _bomParameters = BOMParameters::find())
#{
# ;
#
# if (! this.Approved || ! _bomParameters.BlockEditing)
# {
# return true;
# }
#
# return false;
#}
ENDSOURCE
SOURCE #BOMTable
#BOMTable bomTable()
#{
# return BOMTable::find(this.bomId);
#}
ENDSOURCE
SOURCE #clearItemDimensions
#///
#/// Clears item inventory dimensions for the current bills of materials version record.
#///
#///
#/// An inventTable record related to the current bills of materials version record; optional.
#///
#void clearItemDimensions(InventTable _inventTable = this.inventTable())
#{
# InventDim inventDimOrig;
# InventDim inventDim;
# InventDimParm inventDimParm;
# Common inventDimJoin;
# ;
#
# inventDimOrig = this.inventDim();
# inventDim.data(inventDimOrig);
#
# inventDimParm.initItemDimensionsGeneral();
# inventDimParm.toggleAllInventDim();
# inventDim.clearNotSelectedDim(inventDimParm);
#
# if (! InventDim::isInventDimEqual(inventDim,inventDimOrig))
# {
# inventDim = InventDim::findOrCreate(inventDim);
# this.InventDimId = inventDim.InventDimId;
#
# if (this.isFormDataSource())
# {
# inventDimJoin = this.joinChildTable(tablenum(InventDim));
#
# // when called from a new (not saved) record the inventDimJoin buffer is false so the check must be on tableId.
# if (inventDimJoin.TableId == tablenum(InventDim) && inventDimJoin.isFormDataSource())
# {
# inventDimJoin.data(inventDim);
# }
# }
# }
#}
ENDSOURCE
SOURCE #configId
#///
#/// Returns the configuration ID that is related to the inventory dimension ID.
#///
#///
#/// Returns a string that holds the configuration ID.
#///
#//BP deviation documented
#display ConfigId configId()
#{
# ;
# return this.inventDim().ConfigId;
#}
ENDSOURCE
SOURCE #delete
#public void delete()
#{
# if (this.isApproved() && BOMParameters::find().BlockEditing)
# throw error("@SYS96300");
#
# super();
#}
ENDSOURCE
SOURCE #InitFromBOMTable
#void initFromBOMTable(BOMTable _bomTable)
#{
# InventDim inventDim;
# Common inventDimJoin;
# ;
#
# this.bomId = _bomTable.bomId;
# this.Name = _bomTable.Name;
#
# if (this.InventDimId)
# {
# inventDim = this.inventDim();
# }
#
# inventDim.InventSiteId = _bomTable.SiteId;
# inventDim = InventDim::findOrCreate(inventDim);
#
# this.InventDimId = inventDim.InventDimId;
#
# if (this.isFormDataSource())
# {
# inventDimJoin = this.joinChildTable(tablenum(InventDim));
#
# // when called from a new (not saved) record the inventDimJoin buffer is false so the check must be on tableId.
# if (inventDimJoin.TableId == tablenum(InventDim) && inventDimJoin.isFormDataSource())
# {
# inventDimJoin.data(inventDim);
# }
# }
#}
ENDSOURCE
SOURCE #InitFromInventTable
#void initFromInventTable(InventTable table)
#{
# this.ItemId = table.ItemId;
#}
ENDSOURCE
SOURCE #initValue
#public void initValue()
#{
# if (BOMParameters::find().MandatoryQtyAndDate)
# {
# this.FromDate = systemdateget();
# this.ToDate = systemdateget();
# }
#
# super();
#}
ENDSOURCE
SOURCE #Insert
#void insert()
#{
# if (this.bomId && ! this.Name)
# this.Name = this.bomTable().Name;
#
# super();
#
# if (!BOMParameters::find().mustCheckCircularityManual())
# BOMHierarchyCheck::newBOMcheckNotCircularity().scanUpBOM(this,'',this.FromDate, this.ToDate, false);
#}
ENDSOURCE
SOURCE #inventColorId
#///
#/// Returns the color ID that is related to the inventory dimension ID.
#///
#///
#/// Returns a string that holds the color ID.
#///
#//BP Deviation documented
#display InventColorId inventColorId()
#{
# ;
# return this.inventDim().InventColorId;
#}
ENDSOURCE
SOURCE #inventDim
#///
#/// Returns the inventDim record that is related to the inventory dimension ID.
#///
#///
#/// An inventDim record.
#///
#public InventDim inventDim()
#{
# ;
# return InventDim::find(this.InventDimId);
#}
ENDSOURCE
SOURCE #inventSiteId
#///
#/// Returns the site ID that is related to the inventory dimension ID.
#///
#///
#/// Returns a string that holds the site ID.
#///
#//BP Deviation documented
#display InventSiteId inventSiteId()
#{
# ;
# return this.inventDim().InventSiteId;
#
#}
ENDSOURCE
SOURCE #inventSizeId
#///
#/// Returns the size ID that is related to the inventory dimension ID.
#///
#///
#/// Returns a string that holds the size ID.
#///
#//BP Deviation documented
#display InventSizeId inventSizeId()
#{
# ;
# return this.inventDim().InventSizeId;
#}
ENDSOURCE
SOURCE #InventTable
#InventTable inventTable(boolean _forUpdate = false)
#{
# return InventTable::find(this.ItemId,_forUpdate);
#}
ENDSOURCE
SOURCE #IsApproved
#boolean isApproved()
#{
# return (this.Approved && this.ApprovedBy) || ! BOMTable::isBOMApproveEnabled();
#}
ENDSOURCE
SOURCE #joinChildTable
#///
#/// Returns a joined table record, if the current record is joined to the specified table.
#///
#///
#/// A string that holds the tableID.
#///
#///
#/// A record of any type or null.
#///
#public Common joinChildTable(tableId _tableId)
#{
# Common joinBuffer;
# Common emptyBuffer;
# ;
#
# joinBuffer = this.joinChild();
#
# while (joinBuffer.TableId != emptyBuffer.TableId)
# {
# if (joinBuffer.TableId == _tableId)
# {
# return joinBuffer;
# }
# joinBuffer = joinBuffer.joinChild();
# }
#
# return null;
#}
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
# ;
#
# super(_fieldId);
#
# switch (fieldExt2Id(_fieldId))
# {
# case fieldnum(BOMVersion, bomId):
# if (this.bomId)
# {
# this.initFromBOMTable(this.bomTable());
# }
# break;
# case fieldnum(BOMVersion, ItemId):
# this.clearItemDimensions();
# break;
#
# }
#}
ENDSOURCE
SOURCE #update
#public void update()
#{
# if (this.orig().isApproved() && BOMParameters::find().BlockEditing)
# throw error("@SYS95147");
#
# super();
#}
ENDSOURCE
SOURCE #validateDelete
#public boolean validateDelete()
#{
# boolean ret;
#
# ret = super();
#
# if (ret && this.dataSource() && this.isApproved() && BOMParameters::find().BlockEditing)
# ret = checkFailed("@SYS96300");
#
# return ret;
#}
ENDSOURCE
SOURCE #ValidateField
#boolean validateField(fieldId id)
#{
# boolean ret;
# ;
#
# ret = super(id);
#
# switch (fieldExt2Id(id))
# {
# case fieldnum(BOMVersion,Active):
#
# if ( this.Active
# && !this.isApproved())
# {
# ret = checkFailed("@SYS26246") && ret;
# }
#
# if ( ret
# && this.Active
# && this.bomId
# && !BOMTable::find(this.bomId).isApproved())
# {
# ret = checkFailed(strfmt("@SYS29115",this.bomId));
# }
# break;
#
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #ValidateWrite
#server boolean validateWrite(boolean _checkBlockEditing = true)
#{
# BOMVersion bomVersionActive;
# boolean ret;
# InventTable inventTable;
# BOMTable bomTable = BOMTable::find(this.bomId);
#
# ret = super();
#
# setprefix(strfmt("@SYS25826",this.ItemId,this.FromDate,this.ToDate));
#
# if (this.FromQty < 0)
# ret = checkFailed("@SYS109276");
#
# inventTable = InventTable::find(this.ItemId);
# if (ret && ! inventTable.inventItemType().canHaveBOM())
# ret = checkFailed(strfmt("@SYS78175",inventTable.ItemType))&& ret;
#
# if (ret && this.Active && !this.isApproved())
# ret = checkFailed("@SYS26246");
#
# if (ret && _checkBlockEditing && this.dataSource() && this.orig().isApproved() && BOMParameters::find().BlockEditing)
# ret = checkFailed("@SYS95147");
#
# if ((!this.FromDate || !this.ToDate) && BOMParameters::find().MandatoryQtyAndDate)
# ret = checkFailed("@SYS95151");
#
# ret = ret && BOMTable::checkExist(this.bomId);
#
# if (ret && this.ToDate && (this.ToDate < this.FromDate))
# ret = checkFailed("@SYS22806") && ret;
#
# if ( ret
# && this.bomId
# && bomTable.SiteId
# && this.inventDim().InventSiteId != bomTable.SiteId )
# {
# ret = checkFailed("@SYS109763");
# }
#
# if (ret && this.Active)
# {
# while select bomVersionActive
# index hint ItemIdx
# where bomVersionActive.ItemId == this.ItemId
# && bomVersionActive.InventDimId == this.InventDimId
# && bomVersionActive.Active == NoYes::Yes
# && bomVersionActive.RecId != this.RecId
# {
# ret = BOMVersion::checkDateOverlap(this,bomVersionActive);
# if (!ret)
# {
# break;
# }
# }
# }
#
# //Check for approved BOM if going from de-approved to approved or from de-activated to activated
# if (ret
# && BOMTable::isBOMApproveEnabled()
# && ! bomTable.Approved
# && ((this.Approved && !this.orig().Approved) || (this.Active && !this.orig().Active))
# )
# ret = checkFailed(strfmt("@SYS29115",this.bomId));
#
# if ( ret
# && inventTable.Configurable
# && this.configId())
# {
# ret = checkFailed("@SYS121360");
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #checkDateOverlap
#static boolean checkDateOverlap(BOMVersion curVersion, BOMVersion checkAgainstVersion)
#{
# ;
# if (curVersion.FromQty == checkAgainstVersion.FromQty && curVersion.InventDimId == checkAgainstVersion.InventDimId)
# {
# if ((curVersion.ToDate >= checkAgainstVersion.FromDate || !curVersion.ToDate) &&
# (curVersion.FromDate <= checkAgainstVersion.ToDate || !checkAgainstVersion.ToDate))
# return checkFailed(strfmt("@SYS67104",checkAgainstVersion.Name));
#
# if (checkAgainstVersion.ToDate >= curVersion.FromDate && checkAgainstVersion.FromDate <= curVersion.ToDate)
# return checkFailed(strfmt("@SYS67104",checkAgainstVersion.Name));
# }
# return true;
#}
#
ENDSOURCE
SOURCE #checkExist
#static boolean checkExist(ItemId _itemId,
# BOMId _bomId,
# boolean _active,
# StartDate _fromDate,
# EndDate _toDate = _fromDate,
# FromQty _fromQty
# )
#{
# if (_itemId && ! BOMVersion::exist(_itemId,_bomId,_active,_fromDate,_toDate, _fromQty))
# return checkFailed(strfmt(BOMVersion::txtNotExist(),_itemId,_fromDate,_toDate, _fromQty));
#
# return true;
#}
ENDSOURCE
SOURCE #checkExistRecId
#static boolean checkExistRecId(recId recId)
#{
# if (recId && ! BOMVersion::existRecId(recId))
# return checkFailed(strfmt("@SYS26277",recId));
#
# return true;
#}
ENDSOURCE
SOURCE #checkItemRelation
#static boolean checkItemRelation(
# BOMId _bomId,
# ItemId _itemId
# )
#{
# BOMVersion bomVersion;
#
# select firstonly RecId from bomVersion
# where bomVersion.bomId == _bomId &&
# bomVersion.ItemId == _itemId;
#
# if (! bomVersion.RecId)
# return checkFailed(strfmt("@SYS69982",_itemId,_bomId));
#
# return true;
#}
ENDSOURCE
SOURCE #deleteVersions
#server static void deleteVersions(ItemId itemId)
#{
# BOMVersion bomVersion;
# ;
# delete_from bomVersion
# index hint ItemIdx
# where bomVersion.ItemId == itemId;
#}
ENDSOURCE
SOURCE #dictConfigurationKey
#static DictConfigurationKey dictConfigurationKey ()
#{
# return new DictConfigurationKey (configurationkeynum(BOMVersion));
#}
ENDSOURCE
SOURCE #exist
#static boolean exist(ItemId _itemId,
# BOMId _bomId,
# boolean _active,
# StartDate _fromDate,
# EndDate _toDate = _fromDate,
# FromQty _fromQty
# )
#{
# BOMVersion bomVersion;
# ;
# bomVersion = BOMVersion::find(_itemId,_bomId,_active,_fromDate,_toDate,_fromQty);
#
# return bomVersion.RecId != 0;
#}
ENDSOURCE
SOURCE #existRecId
#static boolean existRecId(recId recId)
#{
# BOMVersion bomVersion;
# ;
# return (select bomVersion
# index hint RecId
# where bomVersion.RecId == recId
# ).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#static BOMVersion find(ItemId _itemId,
# BOMId _bomId,
# boolean _active,
# StartDate _fromDate,
# EndDate _toDate = _fromDate,
# FromQty _fromQty,
# boolean _forUpdate = false
# )
#{
# BOMVersion bomVersion;
# ;
#
# if (! _itemId || ! _bomId)
# return bomVersion;
#
# _fromQty = abs(_fromQty);
#
# bomVersion.selectForUpdate(_forUpdate);
#
# select firstonly bomVersion
# order by ItemId, Active, FromQty desc
# where bomVersion.ItemId == _itemId &&
# bomVersion.bomId == _bomId &&
# bomVersion.Active <= _active &&
# bomVersion.FromQty <= _fromQty &&
# bomVersion.FromDate <= _fromDate &&
# (bomVersion.ToDate >= _toDate ||
# ! bomVersion.ToDate
# );
#
# return bomVersion;
#}
ENDSOURCE
SOURCE #findActive
#///
#/// Finds an active BOM version record.
#///
#///
#/// A string that holds an item id.
#///
#///
#/// A date for which an active BOM version should be found for.
#///
#///
#/// A real that holds a quantity for which an active BOM version should be found for.
#///
#///
#/// A inventDim record buffer that holds an inventory dimension for which an active BOM version should be found for.
#/// The field inventDimId doesn't have to be specified.
#///
#///
#/// A boolean that determines whether the found BOM version record should be selected for update or not.
#///
#///
#/// A BOM version record.
#///
#static BOMVersion findActive(ItemId _itemId,
# StartDate _date,
# FromQty _fromQty,
# InventDim _inventDimCriteria,
# boolean _forUpdate = false)
#{
# BOMVersion bomVersion;
# boolean active = true;
# ;
#
# if (!_itemId)
# return bomVersion;
#
# _fromQty = abs(_fromQty);
#
# bomVersion = BOMVersion::selectBomVersion(_itemId, _date, _fromQty, _inventDimCriteria, active, _forUpdate);
#
# return bomVersion;
#}
#
ENDSOURCE
SOURCE #findRecId
#static BOMVersion findRecId(recId recId,
# boolean _forUpdate = false
# )
#{
# BOMVersion bomVersion;
# ;
#
# if (! recId)
# return bomVersion;
#
# bomVersion.selectForUpdate(_forUpdate);
#
# select bomVersion
# index hint RecId
# where bomVersion.RecId == recId;
#
# return bomVersion;
#}
ENDSOURCE
SOURCE #selectBomVersion
#///
#/// Finds a BOM version record for an item, a quantity, a date and inventory dimension set.
#///
#///
#/// A string that holds an item id.
#///
#///
#/// A date for which the BOM version should be found for.
#///
#///
#/// A real that holds a quantity for which an active BOM version should be found for.
#///
#///
#/// A inventDim record buffer that holds an inventory dimension for which an active BOM version should be found for.
#///
#///
#/// A boolean that determines whether the active field should be true or false; optional.
#///
#///
#/// A boolean that determines whether the found BOM version record should be selected for update or not.
#///
#///
#/// A BOM version record.
#///
#static BOMVersion selectBomVersion(ItemId _itemId,
# StartDate _date,
# FromQty _fromQty,
# InventDim _inventDimCriteria,
# boolean _active = true,
# boolean _forUpdate = false)
#{
# BOMVersion bomVersion;
# InventDim inventDim;
# InventDim inventDimCriteria;
# ;
# #inventDimDevelop
#
# inventDimCriteria = _inventDimCriteria.data();
#
# inventDimCriteria.clearNotActiveDim(InventTable::find(_itemId).DimGroupId);
#
# bomVersion.selectForUpdate(_forUpdate);
#
# if (InventParameters::find().MultiSiteActivated)
# {
# select firstonly bomVersion
# order by inventDim.ConfigId desc, inventDim.InventSizeId desc, inventDim.InventColorId desc, inventDim.InventSiteId desc, bomVersion.FromQty desc
# where bomVersion.ItemId == _itemId
# && bomVersion.Active == _active
# && bomVersion.FromQty <= _fromQty
# && bomVersion.FromDate <= _date
# && (bomVersion.ToDate >= _date || !bomVersion.ToDate)
# join TableId from inventDim
# where inventDim.InventDimId == bomVersion.InventDimId
# && (inventDim.InventSiteId == inventDimCriteria.InventSiteId || inventDim.InventSiteId == '')
# && (inventDim.ConfigId == inventDimCriteria.ConfigId || inventDim.ConfigId == '')
# && (inventDim.InventSizeId == inventDimCriteria.InventSizeId || inventDim.InventSizeId == '')
# && (inventDim.InventColorId == inventDimCriteria.InventColorId || inventDim.InventColorId == '');
# }
# else
# {
# // site not activated -> find siteless first -> if siteless BOMVersion doesn't exist then find BOMVersion with site on
# select firstonly bomVersion
# order by inventDim.ConfigId desc, inventDim.InventSizeId desc, inventDim.InventColorId desc, inventDim.InventSiteId, bomVersion.FromQty desc
# where bomVersion.ItemId == _itemId
# && bomVersion.Active == _active
# && bomVersion.FromQty <= _fromQty
# && bomVersion.FromDate <= _date
# && (bomVersion.ToDate >= _date || !bomVersion.ToDate)
# join TableId from inventDim
# where inventDim.InventDimId == bomVersion.InventDimId
# && (inventDim.ConfigId == inventDimCriteria.ConfigId || inventDim.ConfigId == '')
# && (inventDim.InventSizeId == inventDimCriteria.InventSizeId || inventDim.InventSizeId == '')
# && (inventDim.InventColorId == inventDimCriteria.InventColorId || inventDim.InventColorId == '');
# }
#
# return bomVersion;
#}
#
ENDSOURCE
SOURCE #txtNotExist
#static TxtNotExist txtNotExist()
#{
# return "@SYS24471";
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : BOMTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BOMTable
Id 26
PROPERTIES
Name #BOMTable
Label #@SYS3076
FormRef #BOMTable
TitleField1 #BOMId
TitleField2 #Name
TableContents #Base data
ConfigurationKey #BOM
SecurityKey #InventTables
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Main
PrimaryIndex #NumIdx
ClusterIndex #NumIdx
ModifiedDateTime #Yes
DEL_modifiedTime #Yes
ModifiedBy #Yes
DeveloperDocumentation #@SYS124098
ENDPROPERTIES
FIELDS
FIELD #BOMId
Id 1
STRING
PROPERTIES
Name #BOMId
Mandatory #Yes
AllowEdit #No
Table #BOMTable
ExtendedDataType
ARRAY
#BOMId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Name
Id 2
STRING
PROPERTIES
Name #Name
HelpText #@SYS27883
Table #BOMTable
ExtendedDataType
ARRAY
#Name
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #ItemGroupId
Id 3
STRING
PROPERTIES
Name #ItemGroupId
HelpText #@SYS25677
Table #BOMTable
ExtendedDataType
ARRAY
#ItemGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #CheckBOM
Id 4
ENUM
PROPERTIES
Name #CheckBOM
Label #@SYS24056
HelpText #@SYS27885
AllowEditOnCreate #No
AllowEdit #No
Table #BOMTable
EnumType #NoYes
ENDPROPERTIES
FIELD #ApprovedBy
Id 5
STRING
PROPERTIES
Name #ApprovedBy
HelpText #@SYS29098
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #BOMApprove
Table #BOMTable
ExtendedDataType
ARRAY
#ApprovedBy
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Approved
Id 6
ENUM
PROPERTIES
Name #Approved
Label #@SYS10158
HelpText #@SYS29103
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #BOMApprove
Table #BOMTable
EnumType #NoYes
ENDPROPERTIES
FIELD #SysSignApprove
Id 9
STRING
PROPERTIES
Name #SysSignApprove
Label #@SYS103382
AllowEditOnCreate #No
AllowEdit #No
Table #BOMTable
ExtendedDataType
ARRAY
#SysSignId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SiteId
Id 10
STRING
PROPERTIES
Name #SiteId
Table #BOMTable
ExtendedDataType
ARRAY
#InventSiteId
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#BOMId
#Name
#SiteId
#ItemGroupId
#ApprovedBy
#Approved
ENDGROUPFIELDS
ENDGROUP
GROUP #Administration
PROPERTIES
Name #Administration
Label #@SYS9853
ENDPROPERTIES
GROUPFIELDS
#ItemGroupId
#CheckBOM
#SiteId
ENDGROUPFIELDS
ENDGROUP
GROUP #Description
PROPERTIES
Name #Description
Label #@Sys6303
ENDPROPERTIES
GROUPFIELDS
#Name
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@Sys5711
ENDPROPERTIES
GROUPFIELDS
#BOMId
ENDGROUPFIELDS
ENDGROUP
GROUP #Signatures
PROPERTIES
Name #Signatures
Label #@SYS103389
ENDPROPERTIES
GROUPFIELDS
#SysSignApprove
ENDGROUPFIELDS
ENDGROUP
GROUP #System
PROPERTIES
Name #System
Label #@SYS4278
ENDPROPERTIES
GROUPFIELDS
#ApprovedBy
#Approved
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#NumIdx
Id 1
PROPERTIES
Name #NumIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#BOMId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
#BOMVersion
PROPERTIES
Table #BOMVersion
DeleteAction #Restricted
ENDPROPERTIES
#BOM
PROPERTIES
Table #BOM
DeleteAction #Cascade
ENDPROPERTIES
#BOMConfigRoute
PROPERTIES
Table #BOMConfigRoute
DeleteAction #Cascade
ENDPROPERTIES
#BOMConfigRule
PROPERTIES
Table #BOMConfigRule
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #axBOMTable
#public AxBOMTable axBOMTable()
#{
# AxBOMTable axBOMTable = AxBOMTable::newBOMTable(this);
# return axBOMTable;
#}
#
ENDSOURCE
SOURCE #CheckValid
#boolean checkValid()
#{
# boolean ok = true;
#
# if (! this.bomId)
# ok = checkFailed("@SYS26336");
#
# if (! this && this.bomId)
# ok = checkFailed(strfmt(BOMTable::txtNotExist(), this.bomId));
#
# return ok;
#
#}
ENDSOURCE
SOURCE #consistencyCheckFix
#void consistencyCheckFix(BOMconsistencyCheck_Table boMconsistencyCheck)
#{
# BOMHierarchyCheck hierarchyCheck;
#
# if (boMconsistencyCheck.parmCheckCircularity())
# {
# hierarchyCheck = BOMHierarchyCheck::newBOMcheckNotCircularity();
# hierarchyCheck.checkCircularity(this.bomId);
# }
#}
#
ENDSOURCE
SOURCE #delete
#public void delete()
#{
# if (BOMParameters::find().BlockEditing && this.orig().Approved)
# throw error("@SYS95150");
#
# super();
#}
ENDSOURCE
SOURCE #InitFromInventTable
#void initFromInventTable(InventTable table)
#{
# this.bomId = table.ItemId;
# this.ItemGroupId = table.ItemGroupId;
#}
ENDSOURCE
SOURCE #inventDimIdSite
#///
#/// Returns the inventory dimension ID for the specified site.
#///
#///
#/// Returns the inventory dimension ID for the specified site.
#///
#public InventDimId inventDimIdSite()
#{
# InventDim inventDim;
# ;
#
# inventDim.InventSiteId = this.SiteId;
#
# return InventDim::findOrCreate(inventDim).InventDimId;
#}
ENDSOURCE
SOURCE #isApproved
#boolean isApproved()
#{
# return (this.Approved && this.ApprovedBy) || ! BOMTable::isBOMApproveEnabled();
#}
#
ENDSOURCE
SOURCE #update
#public void update()
#{
# BOMTable this_orig = this.orig();
# ;
#
# if (this_orig.Approved && BOMParameters::find().BlockEditing)
# throw error("@SYS95147");
#
# ttsbegin;
#
# super();
#
# if ( this.RecId
# && this.SiteId != this_orig.SiteId)
# {
# this.updateSite();
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #updateSite
#///
#/// Updates the inventory dimensions for a BOM on all its BOM lines and BOM version with the site on the BOM.
#///
#void updateSite()
#{
# BOM bomLine;
# InventDim oldInventDim;
# InventDim newInventDim;
# InventDimId newInventDimId = '';
#
# InventTable inventTable;
# BOMVersion bomVersionUpdate;
# ;
#
# if (InventParameters::find().MultiSiteActivated)
# {
# ttsbegin;
# // Update BOM lines
# while select forupdate bomId, ItemId, InventDimId from bomLine
# where bomLine.bomId == this.bomId
# join oldInventDim
# where oldInventDim.InventDimId == bomLine.InventDimId
# {
# if (oldInventDim.InventSiteId != this.SiteId)
# {
# newInventDim.initFromInventDim(oldInventDim);
# newInventDim.InventSiteId = this.SiteId;
#
# // Only change the InventLocationId if site is different
# if (oldInventDim.InventLocationId && InventLocation::find(oldInventDim.InventLocationId).InventSiteId != this.SiteId)
# {
# inventTable = InventTable::find(bomLine.ItemId);
#
# if(!inventTable.siteActive())
# {
# newInventDim.InventLocationId = '';
# }
# else
# {
# newInventDim.InventLocationId = InventItemInventSetup::find(bomLine.ItemId, InventDim::findOrCreate(newInventDim).InventDimId, false, inventTable).inventLocationId();
# }
# }
#
# newInventDimId = InventDim::findOrCreate(newInventDim).InventDimId;
#
# bomLine.InventDimId = newInventDimId;
#
# bomLine.update();
# }
# }
#
# //If the site is specified in the BOM, all BOM versions must be updated with the new site
# //If the site is not specified(cleared) in the BOM, BOM versions should keep their respective sites
# if(this.SiteId)
# {
# // Update BOM version
# while select forupdate bomVersionUpdate
# where bomVersionUpdate.bomId == this.bomId
# join oldInventDim
# where oldInventDim.InventDimId == bomVersionUpdate.InventDimId
# && oldInventDim.InventSiteId != this.SiteId
# {
# newInventDim = oldInventDim.data();
# newInventDim.InventSiteId = this.SiteId;
# newInventDim = InventDim::findOrCreate(newInventDim);
# bomVersionUpdate.InventDimId = newInventDim.InventDimId;
# if (! bomVersionUpdate.validateWrite())
# {
# throw error("@SYS18447");
# }
# bomVersionUpdate.update();
# }
# }
#
# ttscommit;
# }
#}
ENDSOURCE
SOURCE #validateDelete
#public boolean validateDelete()
#{
# boolean ret;
#
# ret = super();
#
# if (ret && this.dataSource() && this.orig().Approved && BOMParameters::find().BlockEditing)
# throw error("@SYS95150");
#
# return ret;
#}
ENDSOURCE
SOURCE #validateField
#public boolean validateField(fieldId _fieldIdToCheck)
#{
# boolean ret;
#
# ret = super(_fieldIdToCheck);
#
#
# switch (fieldExt2Id(_fieldIdToCheck))
# {
# case fieldnum(BOMTable,SiteId):
# if ( this.isFormDataSource()
# && this.RecId)
# {
# if (Box::yesNo(strfmt("@SYS109630"),DialogButton::Yes,"@SYS109631","") == DialogButton::Yes)
# {
# // Force save of record -> BOMTable.update() -> related tables will be updated
# this.dataSource().write();
# }
# else
# {
# ret = false;
# }
# }
# break;
#
#
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #validateWrite
#public boolean validateWrite()
#{
# boolean ret;
#
# ret = super();
#
# if (ret && this.dataSource() && this.orig().Approved && BOMParameters::find().BlockEditing)
# ret = checkFailed("@SYS95147");
#
# return ret;
#}
ENDSOURCE
SOURCE #checkExist
#static boolean checkExist(BOMId bomNum)
#{
# if (bomNum && ! BOMTable::exist(bomNum))
# return checkFailed(strfmt(BOMTable::txtNotExist(),bomNum));
#
# return true;
#}
ENDSOURCE
SOURCE #exist
#static boolean exist(BOMId _bomId)
#{
# return (select bomTable
# index hint NumIdx
# where bomTable.bomId == _bomId
# ).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#static BOMTable find(
# BOMId _bomId,
# boolean _forUpdate = false
# )
#{
# BOMTable bomTable;
#
# if (! _bomId)
# return bomTable;
#
# bomTable.selectForUpdate(_forUpdate);
#
# select bomTable
# index hint NumIdx
# where bomTable.bomId == _bomId;
# return bomTable;
#}
ENDSOURCE
SOURCE #isBOMApproveEnabled
#// Is the BOM approve system approved ?
#static boolean isBOMApproveEnabled()
#{
# return isConfigurationkeyEnabled(configurationkeynum(BOMApprove));
#}
ENDSOURCE
SOURCE #jumpRefBomTable
#static void jumpRefBomTable(BOMTable _bomTable, Object _caller, str _parm = '')
#{
# Args args;
# FormRun fr;
# ;
#
# args = new Args(formstr(BomTable));
# args.caller(_caller);
# args.parm(_parm);
#
# fr = classfactory.formRunClass(args);
# fr.init();
# fr.run();
# fr.dataSource().findRecord(_bomTable);
# fr.detach();
#}
ENDSOURCE
SOURCE #lookupBOMId
#client static void lookupBOMId(
# FormStringControl ctrl,
# ItemGroupId itemGroupId,
# InventSiteId siteId)
#{
# Args args;
# Object formRun;
# ;
# args = new Args();
# args.name(formstr(BOMIdLookup));
# args.caller(ctrl);
# formRun = classfactory.formRunClass(args);
# formRun.init();
# formRun.setItemGroupId(itemGroupId);
# formRun.setSiteId(siteId);
# ctrl.performFormLookup(formRun);
#}
#
ENDSOURCE
SOURCE #numberSeq
#server static NumberSeq numberSeq(boolean _makeDecisionLater = false,
# boolean _dontThrowOnMissingRefSetUp = false
# )
#{
# return NumberSeq::newGetNum(BOMParameters::numRefBOMId(),
# _makeDecisionLater,
# _dontThrowOnMissingRefSetUp
# );
#}
ENDSOURCE
SOURCE #promptCreateBOM
#server static container promptCreateBOM(ItemId itemId, BOMId fromBOMId = '', InventSiteId fromSiteId = '')
#{
# #OCCRetryCount
# BOMTable bomTable;
#
# BOMId dialogNumber;
# Name dialogName;
# NoYes dialogCopy;
# InventSiteId dialogSiteId;
# container dialogVal;
#
# InventTable inventTable = InventTable::find(itemId);
# BOMRouteCopyJob bomCopy;
# NumberSeq numberSeq;
# NumberSequenceTable numberSequenceTable;
# boolean manual;
# boolean alreadyExists;
# ;
#
# numberSeq = BOMTable::numberSeq(false,true);
# if(numberSeq)
# {
# numberSequenceTable = NumberSequenceTable::find(numberSeq.parmNumberSequenceCode());
# }
# manual = !numberSeq || (numberSequenceTable && numberSequenceTable.numAllowEdit());
#
# if (! inventTable.inventItemType().canHaveBOM())
# throw error(strfmt("@SYS78175",inventTable.ItemType));
#
# dialogVal = BOMTable::promptCreateBOMDialog(manual,fromBOMId);
#
# if (!dialogVal)
# return ['', ''];
#
# [dialogNumber,dialogName,dialogCopy,dialogSiteId] = dialogVal;
#
# try
# {
# ttsbegin;
#
# if (manual)
# bomTable = BOMTable::find(dialogNumber);
#
# if (bomTable)
# alreadyExists = true;
# else
# {
# bomTable.bomId = dialogNumber;
# if (! bomTable.bomId)
# {
# if (! numberSeq)
# numberSeq = BOMTable::numberSeq();
# bomTable.bomId = numberSeq.num();
# }
# if (BOMTable::exist(bomTable.bomId))
# alreadyExists = true;
# else
# {
# bomTable.ItemGroupId = inventTable.ItemGroupId;
# bomTable.Name = dialogName;
# bomTable.SiteId = dialogSiteId;
# if (! bomTable.validateWrite())
# throw error("@SYS23020");
#
# bomTable.insert();
# }
# }
#
# ttscommit;
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
#
# if (alreadyExists)
# return [bomTable.bomId, ''];
#
# if (dialogNumber && numberSequenceTable && numberSequenceTable.Continuous)
# {
# // Use tts here to avoid warning
# ttsbegin;
# // Reserve number from prompt
# NumberSeq::newReserveNumFromCode(numberSequenceTable.NumberSequence,false,true).reserve(dialogNumber);
# ttscommit;
# }
#
# if (fromBOMId && dialogCopy)
# {
# bomCopy = BOMRouteCopyJob::newFromToBOMId(fromBOMId, bomTable.bomId, fromSiteId);
# bomCopy.parmFromItemId(itemId);
# bomCopy.parmToItemId(itemId);
# if (dialogSiteId != '')
# bomCopy.parmToSiteId(dialogSiteId);
# if (bomCopy.prompt())
# bomCopy.run();
#
# ttsbegin;
# bomTable.SiteId = bomCopy.parmToSiteId();
# bomTable.update();
# ttscommit;
#
# return [bomTable.bomId, bomTable.SiteId];
# }
# else
# return [bomTable.bomId, dialogSiteId];
#}
#
ENDSOURCE
SOURCE #promptCreateBOMDialog
#client static container promptCreateBOMDialog(boolean manual,
# BOMId fromBOMId = ''
# )
#{
# Dialog dialog;
# DialogField fieldNumber;
# DialogField fieldName;
# DialogField fieldCopy;
# DialogField fieldSite;
# boolean multisite;
# ;
# dialog = new Dialog("@SYS25027");
# if (manual)
# fieldNumber = dialog.addField(typeid(BOMId),"@SYS22298");
# fieldName = dialog.addField(typeid(Name),"@SYS6303","@SYS50975");
# if (fromBOMId)
# fieldCopy = dialog.addField(typeid(NoYes),"@SYS12898","@SYS50976");
# multisite = InventParameters::find().MultiSiteActivated;
# if (multisite)
# fieldSite = dialog.addField(typeid(InventSiteId),"@SYS103211","@SYS103217");
#
# if (! dialog.run())
# return connull();
#
# // when multisite is activated, validate that the site is valid or empty
# if (multisite && fieldSite.value() && !InventSite::exist(fieldSite.value()) )
# {
# checkFailed(strfmt("@SYS111931", fieldSite.value()));
# fieldSite = null;
# }
# return [manual ? fieldNumber.value() : '', fieldName.value(), fromBOMId ? fieldCopy.value() : NoYes::No, fieldSite ? fieldSite.value() : ''];
#}
ENDSOURCE
SOURCE #setCheckBOM
#server static void setCheckBOM(BOMId bomId,
# boolean ok
# )
#{
# BOMTable bomTable;
#
# ttsbegin;
#
# bomTable = BOMTable::find(bomId,true);
# bomTable.CheckBOM = ! ok;
# bomTable.doUpdate();
#
# ttscommit;
#}
ENDSOURCE
SOURCE #txtNotExist
#static TxtNotExist txtNotExist()
#{
# return "@SYS21841";
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : BOM unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BOM
Id 18
PROPERTIES
Name #BOM
Label #@SYS22174
FormRef #BOMConsistOf
TitleField1 #BOMId
TitleField2 #ItemId
TableContents #Base data
ConfigurationKey #BOM
SecurityKey #InventTables
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Main
PrimaryIndex #NumIdx
ClusterIndex #NumIdx
DeveloperDocumentation #@SYS124083
EntityRelationshipType #Relationship
ENDPROPERTIES
FIELDS
FIELD #LineNum
Id 1
REAL
PROPERTIES
Name #LineNum
Table #BOM
ExtendedDataType
ARRAY
#LineNum
#
ENDARRAY
ENDPROPERTIES
FIELD #BOMType
Id 2
ENUM
PROPERTIES
Name #BOMType
Table #BOM
EnumType #BOMType
ENDPROPERTIES
FIELD #BOMConsump
Id 3
ENUM
PROPERTIES
Name #BOMConsump
Table #BOM
EnumType #BOMConsumpType
ENDPROPERTIES
FIELD #ItemId
Id 4
STRING
PROPERTIES
Name #ItemId
Mandatory #Yes
Table #BOM
ExtendedDataType
ARRAY
#ItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #BOMQty
Id 6
REAL
PROPERTIES
Name #BOMQty
Table #BOM
ExtendedDataType
ARRAY
#BOMQty
#
ENDARRAY
ENDPROPERTIES
FIELD #Calculation
Id 7
ENUM
PROPERTIES
Name #Calculation
Table #BOM
ExtendedDataType
ARRAY
#BOMCalcBOMLine
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Dim1
Id 8
REAL
PROPERTIES
Name #Dim1
Table #BOM
ExtendedDataType
ARRAY
#BOMMeasureHeight
#
ENDARRAY
ENDPROPERTIES
FIELD #Dim2
Id 9
REAL
PROPERTIES
Name #Dim2
Table #BOM
ExtendedDataType
ARRAY
#BOMMeasureWidth
#
ENDARRAY
ENDPROPERTIES
FIELD #Dim3
Id 10
REAL
PROPERTIES
Name #Dim3
Table #BOM
ExtendedDataType
ARRAY
#BOMMeasureDepth
#
ENDARRAY
ENDPROPERTIES
FIELD #Dim4
Id 11
REAL
PROPERTIES
Name #Dim4
Table #BOM
ExtendedDataType
ARRAY
#BOMMeasureDensity
#
ENDARRAY
ENDPROPERTIES
FIELD #Dim5
Id 12
REAL
PROPERTIES
Name #Dim5
Table #BOM
ExtendedDataType
ARRAY
#BOMMeasureConstant
#
ENDARRAY
ENDPROPERTIES
FIELD #RoundUp
Id 13
ENUM
PROPERTIES
Name #RoundUp
Table #BOM
EnumType #BOMRoundUp
ENDPROPERTIES
FIELD #RoundUpQty
Id 14
REAL
PROPERTIES
Name #RoundUpQty
Table #BOM
ExtendedDataType
ARRAY
#BOMRoundUpQty
#
ENDARRAY
ENDPROPERTIES
FIELD #Position
Id 15
STRING
PROPERTIES
Name #Position
Table #BOM
ExtendedDataType
ARRAY
#BOMPosition
#
ENDARRAY
StringSize #30
ENDPROPERTIES
FIELD #OprNum
Id 16
INT
PROPERTIES
Name #OprNum
Table #BOM
ExtendedDataType
ARRAY
#OprNumBOMLine
#
ENDARRAY
ENDPROPERTIES
FIELD #FromDate
Id 17
DATE
PROPERTIES
Name #FromDate
Label #@SYS5209
HelpText #@SYS9680
GroupPrompt #@SYS4083
Table #BOM
ExtendedDataType
ARRAY
#StartDate
#
ENDARRAY
ENDPROPERTIES
FIELD #ToDate
Id 18
DATE
PROPERTIES
Name #ToDate
Label #@SYS14656
HelpText #@SYS13966
GroupPrompt #@SYS8828
Table #BOM
ExtendedDataType
ARRAY
#EndDate
#
ENDARRAY
ENDPROPERTIES
FIELD #VendId
Id 20
STRING
PROPERTIES
Name #VendId
HelpText #@SYS2813
Table #BOM
ExtendedDataType
ARRAY
#VendAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #UnitId
Id 21
STRING
PROPERTIES
Name #UnitId
HelpText #@SYS7133
Mandatory #Yes
Table #BOM
ExtendedDataType
ARRAY
#UnitID
#
ENDARRAY
ENDPROPERTIES
FIELD #BOMId
Id 23
STRING
PROPERTIES
Name #BOMId
HelpText #@sys25039
AllowEdit #No
Table #BOM
ExtendedDataType
ARRAY
#BOMId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ConfigGroupId
Id 24
STRING
PROPERTIES
Name #ConfigGroupId
HelpText #@SYS25040
Table #BOM
ExtendedDataType
ARRAY
#ConfigGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #Formula
Id 25
ENUM
PROPERTIES
Name #Formula
Table #BOM
EnumType #BOMFormula
ENDPROPERTIES
FIELD #BOMQtySerie
Id 27
REAL
PROPERTIES
Name #BOMQtySerie
Table #BOM
ExtendedDataType
ARRAY
#BOMQtySerie
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemBOMId
Id 28
STRING
PROPERTIES
Name #ItemBOMId
Table #BOM
ExtendedDataType
ARRAY
#ItemBOMId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ItemRouteId
Id 29
STRING
PROPERTIES
Name #ItemRouteId
Table #BOM
ExtendedDataType
ARRAY
#ItemRouteId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventDimId
Id 30
STRING
PROPERTIES
Name #InventDimId
Table #BOM
ExtendedDataType
ARRAY
#InventDimId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ScrapVar
Id 31
REAL
PROPERTIES
Name #ScrapVar
Table #BOM
ExtendedDataType
ARRAY
#ScrapVar
#
ENDARRAY
ENDPROPERTIES
FIELD #ScrapConst
Id 32
REAL
PROPERTIES
Name #ScrapConst
Table #BOM
ExtendedDataType
ARRAY
#ScrapConst
#
ENDARRAY
ENDPROPERTIES
FIELD #ProdFlushingPrincip
Id 33
ENUM
PROPERTIES
Name #ProdFlushingPrincip
Table #BOM
EnumType #ProdFlushingPrincipBOM
ENDPROPERTIES
FIELD #EndSchedConsump
Id 34
ENUM
PROPERTIES
Name #EndSchedConsump
Table #BOM
ExtendedDataType
ARRAY
#BOMEndSchedConsump
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ProjSetSubProdToConsumed
Id 36
ENUM
PROPERTIES
Name #ProjSetSubProdToConsumed
Table #BOM
ExtendedDataType
ARRAY
#ProjSetSubProdToConsumed
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #WrkCtrConsumption
Id 37
ENUM
PROPERTIES
Name #WrkCtrConsumption
Table #BOM
ExtendedDataType
ARRAY
#WrkCtrConsumption
#
ENDARRAY
EnumType #boolean
ENDPROPERTIES
FIELD #ItemPBAId
Id 8001
STRING
PROPERTIES
Name #ItemPBAId
Table #BOM
ExtendedDataType
ARRAY
#PBAId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CGranDueDate
Id 30001
DATE
PROPERTIES
Name #CGranDueDate
Table #BOM
ExtendedDataType
ARRAY
#DueDate
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#BOMId
#ItemId
#BOMQty
#BOMQtySerie
#UnitId
#ConfigGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #BOM
PROPERTIES
Name #BOM
Label #@SYS7916
ENDPROPERTIES
GROUPFIELDS
#BOMType
#Calculation
#ItemBOMId
#ItemRouteId
#ItemPBAId
ENDGROUPFIELDS
ENDGROUP
GROUP #Consumption
PROPERTIES
Name #Consumption
Label #@SYS853
ENDPROPERTIES
GROUPFIELDS
#WrkCtrConsumption
ENDGROUPFIELDS
ENDGROUP
GROUP #ConsumptionCalculation
PROPERTIES
Name #ConsumptionCalculation
Label #@SYS22165
ENDPROPERTIES
GROUPFIELDS
#Formula
#BOMQty
#BOMQtySerie
#UnitId
#BOMConsump
#ProdFlushingPrincip
#ScrapConst
#ScrapVar
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#BOMId
#ConfigGroupId
#ItemId
#Position
ENDGROUPFIELDS
ENDGROUP
GROUP #Measurement
PROPERTIES
Name #Measurement
Label #@SYS2021
ENDPROPERTIES
GROUPFIELDS
#Dim1
#Dim2
#Dim3
#Dim4
#Dim5
ENDGROUPFIELDS
ENDGROUP
GROUP #Operation
PROPERTIES
Name #Operation
Label #@SYS101237
ENDPROPERTIES
GROUPFIELDS
#OprNum
#EndSchedConsump
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectConsumed
PROPERTIES
Name #ProjectConsumed
Label #@SYS109052
ENDPROPERTIES
GROUPFIELDS
#ProjSetSubProdToConsumed
ENDGROUPFIELDS
ENDGROUP
GROUP #RoundingUp
PROPERTIES
Name #RoundingUp
Label #@SYS2864
ENDPROPERTIES
GROUPFIELDS
#RoundUp
#RoundUpQty
ENDGROUPFIELDS
ENDGROUP
GROUP #Subsupplier
PROPERTIES
Name #Subsupplier
Label #@SYS22167
ENDPROPERTIES
GROUPFIELDS
#VendId
ENDGROUPFIELDS
ENDGROUP
GROUP #System
PROPERTIES
Name #System
Label #@SYS4278
ENDPROPERTIES
GROUPFIELDS
#LineNum
#InventDimId
ENDGROUPFIELDS
ENDGROUP
GROUP #Valid
PROPERTIES
Name #Valid
Label #@SYS8553
ENDPROPERTIES
GROUPFIELDS
#FromDate
#ToDate
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#NumIdx
Id 1
PROPERTIES
Name #NumIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#BOMId
#LineNum
#RecId
ENDINDEXFIELDS
#ItemIdx
Id 2
PROPERTIES
Name #ItemIdx
ENDPROPERTIES
INDEXFIELDS
#ItemId
#BOMId
ENDINDEXFIELDS
#ConfigGroupIdx
Id 3
PROPERTIES
Name #ConfigGroupIdx
ENDPROPERTIES
INDEXFIELDS
#BOMId
#ConfigGroupId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #BOMVersion
PROPERTIES
Name #BOMVersion
Table #BOMVersion
EntityRelationshipRole #@SYS124084
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #BOMId
RelatedField #BOMId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
#BOMConfigRule
PROPERTIES
Table #BOMConfigRule
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #BOMName
#//BP Deviation Documented
#display BOMName bomName()
#{
# return BOMTable::find(this.bomId).Name;
#}
ENDSOURCE
SOURCE #BOMQty
#BOMQty bomQty(Qty seriesSize = 1)
#{
# return this.BOMMap::bomQty(seriesSize);
#}
ENDSOURCE
SOURCE #BOMQtyFormula
#BOMQty bomQtyFormula(Qty _seriesSize, ItemId _parentItemId)
#{
# return this.BOMMap::bomQtyFormula(_seriesSize, _parentItemId);
#}
ENDSOURCE
SOURCE #BOMTable
#BOMTable bomTable(boolean _forUpdate = false)
#{
# return BOMTable::find(this.bomId,_forUpdate);
#}
ENDSOURCE
SOURCE #calcConfigId
#/*
#This method has changed name in ver. 3.0, previously it was called configId() !
#*/
#ConfigId calcConfigId(
# ItemId itemId,
# ConfigId configId
# )
#{
# ConfigChoice configChoice;
#
# if (! this.ConfigGroupId)
# {
# return this.inventDim().ConfigId;
# }
#
# return (select configChoice
# index hint ConfigChoiceIdx
# where configChoice.ItemId == itemId &&
# configChoice.ConfigId == configId &&
# configChoice.ChosenGroupId == this.ConfigGroupId &&
# configChoice.ChosenItemId == this.ItemId).ChosenConfigId;
#}
#
#
ENDSOURCE
SOURCE #CheckBOMType
#boolean checkBOMType()
#{
# if (this.type().mustBeProduced() && !(InventTable::find(this.ItemId).inventItemType().canHaveBOM()))
# return checkFailed(strfmt("@SYS7861",this.ItemId));
#
# return true;
#}
ENDSOURCE
SOURCE #CheckConfig
#server boolean checkConfig()
#{
# if (! this.ConfigGroupId && ! InventTable::checkConfig(this.ItemId,this.inventDim().ConfigId))
# return false;
#
# return true;
#}
#
ENDSOURCE
SOURCE #CheckConfigFields
#boolean checkConfigFields()
#{
# if (this.inventDim().ConfigId && this.ConfigGroupId)
# return checkFailed("@SYS24767");
#
# return true;
#}
#
ENDSOURCE
SOURCE #checkItemDim
#server boolean checkItemDim()
#{
# boolean ok;
# ;
#
# ok = this.checkConfig();
# ok = ok && InventTable::checkSize(this.ItemId,this.inventDim().InventSizeId);
# ok = ok && InventTable::checkColor(this.ItemId,this.inventDim().InventColorId);
# ok = ok && this.inventDim().validateWriteItemDimCombination(this.ItemId);
#
# return ok;
#}
ENDSOURCE
SOURCE #checkItemSite
#boolean checkItemSite(BOMVersion bomVersion)
#{
# InventTable inventTable = this.inventTable();
# InventItemInventSetup inventItemInventSetup;
# InventSiteId inventSiteId = this.inventDim().InventSiteId;
# ;
#
# if ( inventTable.siteActive()
# && inventSiteId)
# {
# inventItemInventSetup = inventTable.inventItemInventSetup();
#
# if ( inventItemInventSetup.MandatoryInventSite
# && inventSiteId != bomVersion.inventSiteId())
# {
# return checkFailed(strfmt("@SYS113522",inventTable.ItemId));
# }
# }
#
# return true;
#}
ENDSOURCE
SOURCE #CheckNotCircularity
#server boolean checkNotCircularity()
#{
# BOMHierarchyCheck bomCheck;
# InventTable inventTableChild;
# ;
# inventTableChild = InventTable::find(this.ItemId);
#
# if (inventTableChild.inventItemType().canHaveBOM())
# {
# bomCheck = BOMHierarchyCheck::newBOMcheckNotCircularity();
#
# if (! bomCheck.checkCircularity(this.bomId,this.ItemId,this.inventDim().ConfigId,this.FromDate,this.ToDate))
# return false;
# }
# return true;
#}
#
ENDSOURCE
SOURCE #configGroup
#ConfigGroup configGroup()
#{
# return ConfigGroup::find(this.ConfigGroupId);
#}
ENDSOURCE
SOURCE #configGroupName
#//BP Deviation Documented
#display ConfigGroupName configGroupName()
#{
# return this.configGroup().Name;
#}
ENDSOURCE
SOURCE #configId
#/*
#In 2.5 a method with this name existed, but has changed name to calcConfigId() !
#*/
#//BP Deviation Documented
#display ConfigId configId()
#{
# return this.inventDim().ConfigId;
#}
ENDSOURCE
SOURCE #ConfigName
#//BP Deviation Documented
#display Name configName()
#{
# return ConfigTable::find(this.ItemId,this.inventDim().ConfigId).Name;
#}
ENDSOURCE
SOURCE #delete
#void delete()
#{
# #OCCRetryCount
# try
# {
# ttsbegin;
#
# if (this.isApproved() && BOMParameters::find().BlockEditing)
# {
# throw error("@SYS95147");
# }
#
# super();
#
# this.updateCheckFlag();
#
# ttscommit;
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
#}
ENDSOURCE
SOURCE #InitFromBOM
#void initFromBOM(BOMMap bom)
#{
# // This will also copy the inventDimId
# this.BOMMap::initFromBOMMap(bom);
#}
ENDSOURCE
SOURCE #InitFromInventTable
#///
#/// Initialize the current bills of materials record from an inventTable record.
#///
#///
#/// An inventTable record.
#///
#void initFromInventTable(InventTable _inventTable)
#{
# InventDimParm inventDimParm;
# InventDim inventDim = this.inventDim();
# Common inventDimJoin;
# boolean isBOMSiteLess;
# ;
#
# inventDimParm.initDimBOM(_inventTable.DimGroupId);
# inventDim.clearNotSelectedDim(inventDimParm);
#
# if (inventDimParm.InventSiteIdFlag && this.bomId)
# {
# inventDim.InventSiteId = this.bomTable().SiteId;
# isBOMSiteLess = inventDim.InventSiteId == '';
# }
#
# inventDim.initFromInventTable(_inventTable,InventItemOrderSetupType::Invent,inventDim);
#
# if (isBOMSiteLess)
# {
# inventDim.InventSiteId = '';
# inventDim.InventLocationId = '';
# }
#
# this.InventDimId = InventDim::findOrCreate(inventDim).InventDimId;
#
# this.ItemId = _inventTable.ItemId;
# this.ScrapConst = _inventTable.ScrapConst;
# this.ScrapVar = _inventTable.ScrapVar;
#
# if (_inventTable.Phantom)
# this.bomType = BOMType::Phantom;
# else
# this.bomType = BOMType::Item;
#
# this.UnitId = _inventTable.bomUnitId();
#
# this.ProjSetSubProdToConsumed = NoYes::No;
# this.Dim1 = _inventTable.Height;
# this.Dim2 = _inventTable.Width;
# this.Dim3 = _inventTable.Depth;
# this.Dim4 = _inventTable.Density;
#
# // update joined inventDim datasource
# if (this.isFormDataSource())
# {
# inventDimJoin = this.joinChildTable(tablenum(InventDim));
#
# // when called from a new (not saved) record the inventDimJoin buffer is false so the check must be on tableId.
# if (inventDimJoin.TableId == tablenum(InventDim) && inventDimJoin.isFormDataSource())
# {
# inventDimJoin.data(inventDim);
# }
# }
#}
ENDSOURCE
SOURCE #InitValue
#void initValue()
#{
# super();
#
# this.bomQtySerie = 1;
# this.Calculation = NoYes::Yes;
#}
ENDSOURCE
SOURCE #insert
#void insert()
#{
# #OCCRetryCount
# try
# {
# ttsbegin;
#
# if (this.isApproved() && BOMParameters::find().BlockEditing)
# {
# throw error("@SYS95147");
# }
#
# super();
#
# this.updateCheckFlag();
#
# ttscommit;
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
#}
ENDSOURCE
SOURCE #inventDim
#InventDim inventDim(boolean _forUpdate = false)
#{
#;
# return InventDim::find(this.InventDimId,_forUpdate);
#}
ENDSOURCE
SOURCE #InventTable
#InventTable inventTable(boolean _forUpdate = false)
#{
# return InventTable::find(this.ItemId,_forUpdate);
#}
ENDSOURCE
SOURCE #isApproved
#public boolean isApproved()
#{
# return BOMTable::find(this.bomId).isApproved();
#}
ENDSOURCE
SOURCE #ItemBOMId
#BOMId itemBOMId(
# TransDate _searchDate,
# FromQty _searchQty,
# ItemId _itemIdParent,
# InventDim _inventDimParent)
#{
# InventDim inventDimFinal;
# RouteId routeId;
# ;
#
# routeId = this.ItemRouteId ? this.ItemRouteId : InventTable::find(_itemIdParent).routeId(_searchDate,_searchQty,_inventDimParent);
# inventDimFinal = this.BOMMap::inventDimFinal(_itemIdParent,_inventDimParent,routeId);
#
# return this.BOMMap::itemBOMId(_searchDate, _searchQty,inventDimFinal);
#}
#
ENDSOURCE
SOURCE #itemBOMIdConstruction
#BOMId itemBOMIdConstruction(
# BOMRouteVersionSelect _bomRouteVersionSelect,
# TransDate _searchDate,
# FromQty _searchQty,
# InventDim _searchInventDim)
#{
# if (this.ItemBOMId)
# {
# return this.ItemBOMId;
# }
#
# return this.inventTable().bomIdConstruction(_bomRouteVersionSelect,_searchDate, _searchQty, _searchInventDim);
#}
#
ENDSOURCE
SOURCE #itemName
#//BP Deviation Documented
#display ItemNameDisplay itemName()
#{
# return InventTable::find(this.ItemId).itemName(this.inventDim());
#}
#
ENDSOURCE
SOURCE #itemNameGrid
#//BP Deviation Documented
#display ItemNameDisplayGrid itemNameGrid()
#{
# return this.itemName();
#}
ENDSOURCE
SOURCE #itemRouteIdConstruction
#RouteId itemRouteIdConstruction(BOMRouteVersionSelect bomRouteVersionSelect,
# TransDate searchDate,
# FromQty searchQty,
# InventDim searchInventDim
# )
#{
# if (this.ItemRouteId)
# {
# return this.ItemRouteId;
# }
#
# return this.inventTable().routeIdConstruction(bomRouteVersionSelect,searchDate, searchQty, searchInventDim);
#}
#
ENDSOURCE
SOURCE #ItemType
#//BP Deviation Documented
#display ItemType itemType()
#{
# return this.inventTable().ItemType;
#}
ENDSOURCE
SOURCE #joinChildTable
#///
#/// Returns a joined table record, if the current record is joined to the specified table.
#///
#///
#/// A string that holds the tableID.
#///
#///
#/// A record of any type or null.
#///
#public Common joinChildTable(tableId _tableId)
#{
# Common joinBuffer;
# Common emptyBuffer;
# ;
#
# joinBuffer = this.joinChild();
#
# while (joinBuffer.TableId != emptyBuffer.TableId)
# {
# if (joinBuffer.TableId == _tableId)
# {
# return joinBuffer;
# }
# joinBuffer = joinBuffer.joinChild();
# }
#
# return null;
#}
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
# ;
# super(_fieldId);
#
# switch (_fieldId)
# {
# case fieldnum(BOM, ItemId) :
#
# this.initFromInventTable(this.inventTable());
# break;
# case fieldnum(BOM, bomType):
# if (this.bomType == BOMType::Production)
# this.ProjSetSubProdToConsumed = ProjParameters::find().ProjSetSubProdToConsumed;
# else
# this.ProjSetSubProdToConsumed = NoYes::No;
# break;
# }
#}
ENDSOURCE
SOURCE #route
#Route route(ItemRouteId itemRouteId)
#{
# Route route;
#
# if (! this.OprNum)
# return route;
#
# select firstonly route
# index hint NumOprNumIdx
# where route.RouteId == itemRouteId&&
# route.OprNum == this.OprNum &&
# route.OprPriority == RouteOprPriority::Primary;
#
# return route;
#}
ENDSOURCE
SOURCE #ScrapConst
#//BP Deviation Documented
#display ScrapConst scrapConst()
#{
# return this.BOMMap::scrapConst();
#}
ENDSOURCE
SOURCE #ScrapVar
#//BP Deviation Documented
#display ScrapVar scrapVar()
#{
# return this.BOMMap::scrapVar();
#}
ENDSOURCE
SOURCE #SetConfigId
#///
#/// Sets the configId field in the related inventDim record.
#///
#///
#/// The identifier of the parent item element.
#///
#///
#/// The identifier of the parent configuration element.
#///
#void setConfigId(
# ItemId parentItemNum,
# ConfigId parentConfigId
# )
#{
# InventDim inventDim;
#;
# inventDim = this.inventDim();
# inventDim.ConfigId = this.calcConfigId(parentItemNum,parentConfigId);
#
# if (inventDim.ConfigId)
# {
# this.InventDimId = InventDim::findOrCreate(inventDim).InventDimId;
# }
#}
#
ENDSOURCE
SOURCE #setLineNumAfter
#server boolean setLineNumAfter(BOM boMbefore = null)
#{
# BOM bomAfter;
# boolean linesBefore;
# ;
# if (this.bomId && this.bomId != boMbefore.bomId)
# throw error(strfmt("@SYS63093",funcname()));
#
# if (!boMbefore)
# this.LineNum = BOM::nextLineNum(this.bomId);
#
# while select bomAfter
# index NumIdx
# where bomAfter.bomId == boMbefore.bomId &&
# bomAfter.LineNum > boMbefore.LineNum
# {
# if (bomAfter.RecId == this.RecId)
# continue;
#
# linesBefore = true;
# this.LineNum = decround(((bomAfter.LineNum - boMbefore.LineNum)/2) + boMbefore.LineNum,8);
# break;
# }
# if (!linesBefore)
# {
# this.LineNum = boMbefore.LineNum + 1;
# return true;
# }
# else if (this.LineNum == boMbefore.LineNum || this.LineNum == bomAfter.LineNum)
# return false;
# return true;
#}
ENDSOURCE
SOURCE #Type
#BOMTypeBase type()
#{
# ;
# return BOMTypeBase::construct(this.bomType);
#}
ENDSOURCE
SOURCE #Update
#public void update()
#{
# #OCCRetryCount
# try
# {
# ttsbegin;
#
# if (this.isApproved() && BOMParameters::find().BlockEditing)
# {
# throw error("@SYS95147");
# }
#
# super();
#
# this.updateCheckFlag();
#
# ttscommit;
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
#}
ENDSOURCE
SOURCE #UpdateCheckFlag
#server void updateCheckFlag()
#{
# BOMTable bomTable = this.bomTable(true);
# ;
# if (bomTable)
# {
# bomTable.CheckBOM = true;
# bomTable.update();
# }
#}
ENDSOURCE
SOURCE #validateDelete
#public boolean validateDelete()
#{
# boolean ret;
#
# ret = super();
#
# if (this.dataSource() && this.isApproved() && BOMParameters::find().BlockEditing)
# ret = checkFailed("@SYS95147");
#
# return ret;
#}
ENDSOURCE
SOURCE #ValidateWrite
#server boolean validateWrite(boolean checkCircularity = true)
#{
# boolean isSiteActive = this.inventTable().siteActive();
# ;
# if (! super())
# return false;
#
# if (this.dataSource() && this.isApproved() && BOMParameters::find().BlockEditing)
# return checkFailed("@SYS95147");
#
# if (!this.bomQty() && BOMParameters::find().MandatoryQtyAndDate)
# return checkFailed("@SYS95148");
#
# if ((this.FromDate || this.ToDate) && BOMParameters::find().MandatoryQtyAndDate)
# return checkFailed("@SYS95149");
#
# if (! this.checkBOMType())
# return false;
#
# if (! this.checkConfigFields())
# return false;
#
# if (! this.checkItemDim())
# return false;
#
# if (checkCircularity && BOMParameters::find().mustCheckPerLine() && ! this.checkNotCircularity())
# return false;
#
# if (this.ToDate && (this.ToDate < this.FromDate))
# return checkFailed("@SYS22806");
#
# if((isSiteActive && this.bomTable().SiteId != this.inventDim().InventSiteId) ||
# (!isSiteActive && this.inventDim().InventSiteId))
# {
# return checkFailed("@SYS117930");
# }
#
# return true;
#}
ENDSOURCE
SOURCE #vendId
#VendAccount vendId(
# ItemId parentItemId,
# ConfigId parentConfigId,
# ItemRouteId itemRouteId,
# InventSiteId siteId
# )
#{
# Route route = this.route(itemRouteId);
# RouteOpr routeOpr;
#
# if (route)
# routeOpr = route.routeOpr(parentItemId, parentConfigId, null, siteId);
#
# return this.BOMMap::calcVendId(routeOpr);
#}
#
ENDSOURCE
SOURCE #checkExistConfigValue
#static boolean checkExistConfigValue(BOMId bomNum,
# ConfigGroupId configGroupId,
# ItemId itemId
# )
#{
# if (bomNum && configGroupId && itemId &&
# ! BOM::existConfigValue(bomNum,configGroupId,itemId))
# return checkFailed(strfmt("@SYS24849",configGroupId,itemId,bomNum));
#
# return true;
#}
ENDSOURCE
SOURCE #createBomChangeItem
#server static container createBomChangeItem(container packedQueryRun,
# ItemId toItemId,
# TransDate fromDate,
# TransDate toDate,
# OverwriteAppend updateMethod
# )
#{
# BOM queryBOM;
# BOM tmpBOM;
# QueryRun queryRun;
# InventDim inventDim;
# Map mapTmpBom;
# Map mapBOMRecId;
# Map mapInventDim;
# recId origRecId;
# ;
# //BP Deviation Documented
# tmpBOM.setTmp();
#
# queryRun = new QueryRun(packedQueryRun);
#
# queryRun.recordLevelSecurity(true);
#
# if (!mapTmpBom)
# mapTmpBom = new Map(typeId2Type(typeid(recId)), Types::Record);
#
# if (!mapBOMRecId)
# mapBOMRecId = new Map(typeId2Type(typeid(recId)), typeId2Type(typeid(recId)));
#
# if (!mapInventDim)
# mapInventDim = new Map(Types::String, Types::Record);
#
# while (queryRun.next())
# {
# queryBOM = queryRun.get(tablenum(BOM));
#
# tmpBOM.data(queryBOM);
#
# origRecId = tmpBOM.RecId;
#
# if (updateMethod == OverwriteAppend::Append)
# {
# tmpBOM.ToDate = toDate;
# if (tmpBOM.ToDate && (tmpBOM.ToDate < tmpBOM.FromDate))
# throw error(strfmt("@SYS86314", tmpBOM.bomId));
# tmpBOM.insert();
# mapTmpBom.insert(tmpBOM.RecId, tmpBOM);
# mapBOMRecId.insert(tmpBOM.RecId, origRecId);
#
# tmpBOM.ItemId = toItemId;
# tmpBOM.ToDate = dateNull();
# tmpBOM.FromDate = fromDate;
# tmpBOM.initFromInventTable(InventTable::find(toItemId));
# tmpBOM.LineNum = BOM::nextLineNum(tmpBOM.bomId);
# tmpBOM.insert();
# mapTmpBom.insert(tmpBOM.RecId, tmpBOM);
# mapBOMRecId.insert(tmpBOM.RecId, tmpBOM.RecId);
# }
# else
# {
# tmpBOM.ItemId = toItemId;
# tmpBOM.initFromInventTable(InventTable::find(toItemId));
# tmpBOM.insert();
# mapTmpBom.insert(tmpBOM.RecId, tmpBOM);
# mapBOMRecId.insert(tmpBOM.RecId, origRecId);
# }
#
#
# }
#
# while select tmpBOM
# {
# inventDim = InventDim::find(tmpBOM.InventDimId);
# if (!mapInventDim.exists(inventDim.InventDimId))
# {
# mapInventDim.insert(inventDim.InventDimId, inventDim);
# }
# }
#
# return [mapTmpBom.pack(), mapBOMRecId.pack(), mapInventDim.pack()];
#}
#
ENDSOURCE
SOURCE #existConfigValue
#static boolean existConfigValue(BOMId bomNum,
# ConfigGroupId configGroupId,
# ItemId itemId
# )
#{
# return (select bom
# where bom.bomId == bomNum &&
# bom.ConfigGroupId == configGroupId &&
# bom.ItemId == itemId
# ).RecId != 0;
#}
ENDSOURCE
SOURCE #findRecId
#static BOM findRecId(recId recId,
# boolean update = false
# )
#{
# BOM bom;
# ;
# if (! recId)
# return bom;
#
# bom.selectForUpdate(update);
#
# select bom
# index hint RecId
# where bom.RecId == recId;
#
# return bom;
#}
ENDSOURCE
SOURCE #lastLineNum
#static LineNum lastLineNum(BOMId bomNum)
#{
# return (select maxof(LineNum) from bom
# where bom.bomId == bomNum).LineNum;
#}
ENDSOURCE
SOURCE #lookupConfigGroupId
#client static void lookupConfigGroupId(FormStringControl ctrl,
# BOMId bomId,
# ConfigRuleMethod method = ConfigRuleMethod::Exclude
# )
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(ConfigGroup), ctrl);
# Query query;
# ;
# if (! bomId)
# throw error(strfmt("@SYS19306", funcname()));
# sysTableLookup.addLookupfield(fieldnum(ConfigGroup, ConfigGroupId));
# sysTableLookup.addLookupfield(fieldnum(ConfigGroup, Name));
# if (! prmisdefault(method))
# query = ConfigExcludeInclude::construct(method).configGroupIdLookupQuery(bomId);
# else
# query = new ConfigExclIncl_1Level().configGroupIdLookupQuery(bomId);
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#}
ENDSOURCE
SOURCE #lookupConfigGroupIdAdv
#client static void lookupConfigGroupIdAdv(
# FormStringControl ctrl,
# BOMId bomId,
# boolean showInvent
# )
#{
# Args args;
# Object formRun;
# ;
# args = new Args();
# args.name(formstr(ConfigGroupIdLookup));
# args.caller(ctrl);
# formRun = classfactory.formRunClass(args);
# formRun.setBOMId(bomId);
# formRun.setShowInvent(showInvent);
# formRun.init();
# ctrl.performFormLookup(formRun);
#}
ENDSOURCE
SOURCE #lookupItemId
#client static void lookupItemId(
# FormStringControl ctrl,
# BOMId bomId,
# ConfigGroupId groupId,
# ConfigRuleMethod method = ConfigRuleMethod::Exclude
# )
#{
#;
# BOM::lookupItemIdAdv(ctrl,bomId,groupId,false,method);
#}
ENDSOURCE
SOURCE #lookupItemIdAdv
#client static void lookupItemIdAdv(
# FormStringControl ctrl,
# BOMId bomId,
# ConfigGroupId groupId,
# boolean showInvent,
# ConfigRuleMethod method = ConfigRuleMethod::Exclude
# )
#{
# Args args;
# Object formRun;
# ;
# args = new Args();
# args.name(formstr(ConfigItemIdLookup));
# args.caller(ctrl);
# formRun = classfactory.formRunClass(args);
# formRun.setBOMId(bomId);
# formRun.setConfigGroupId(groupId);
# formRun.setShowInvent(showInvent);
# if (! prmisdefault(method))
# formRun.setMethod(method);
# formRun.init();
# ctrl.performFormLookup(formRun);
#}
ENDSOURCE
SOURCE #nextLineNum
#static LineNum nextLineNum(BOMId bomNum)
#{
# return BOM::lastLineNum(bomNum) + 1;
#}
ENDSOURCE
SOURCE #reNumber
#server static container reNumber(BOMId bomId, boolean packInContainer = false)
#{
# Map lines = new Map(typeId2Type(typeid(recId)), Types::Integer);
# container packedBOM;
# int counter;
# BOM bom;
# ;
# if (!bomId)
# return connull();
#
# ttsbegin;
#
# while select bom index NumIdx
# where bom.bomId == bomId
# {
# lines.insert(bom.RecId,counter);
# counter++;
# }
# while select forupdate bom
# index hint NumIdx
# where bom.bomId == bomId
# {
# counter = lines.lookup(bom.RecId);
# bom.LineNum = counter;
# bom.doUpdate();
# if (packInContainer)
# packedBOM += [bom.data()];
# }
# ttscommit;
#
# return packedBOM;
#}
ENDSOURCE
SOURCE #sorting
#server static void sorting(BOMId bomNum,
# BOMSort sortChoice
# )
#{
# BOM bom;
# InventDim inventDim;
# Counter counter;
# ;
#
# if (! BOMTable::find(bomNum))
# {
# checkFailed(strfmt("@SYS21841",bomNum));
# throw error("@SYS22271");
# }
#
# ttsbegin;
#
# switch (sortChoice)
# {
# case BOMSort::LineType :
# while select forupdate bom
# order by bomType,ItemId
# where bom.bomId == bomNum
# join inventDim
# order ConfigId
# where inventDim.InventDimId == bom.InventDimId
# {
# counter++;
# bom.LineNum = counter;
# bom.update();
# }
# break;
# case BOMSort::ItemId:
# while select forupdate bom
# order by ItemId
# where bom.bomId == bomNum
# join inventDim
# order ConfigId
# where inventDim.InventDimId == bom.InventDimId
# {
# counter++;
# bom.LineNum = counter;
# bom.update();
# }
# break;
# case BOMSort::ConfigGroup:
# while select forupdate bom
# order by ConfigGroupId,ItemId
# where bom.bomId == bomNum
# {
# counter++;
# bom.LineNum = counter;
# bom.update();
# }
# break;
# case BOMSort::Position:
# while select forupdate bom
# order by Position,ItemId
# where bom.bomId == bomNum
# join inventDim
# order ConfigId
# where inventDim.InventDimId == bom.InventDimId
# {
# counter++;
# bom.LineNum = counter;
# bom.update();
# }
# break;
# case BOMSort::OprNum:
# while select forupdate bom
# order by OprNum,ItemId
# where bom.bomId == bomNum
# join inventDim
# order ConfigId
# where inventDim.InventDimId == bom.InventDimId
# {
# counter++;
# bom.LineNum = counter;
# bom.update();
# }
# break;
# default:
# throw error("@SYS19327");
# }
# ttscommit;
#}
#
#
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : PriceDiscTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #PriceDiscTable
Id 315
PROPERTIES
Name #PriceDiscTable
Label #@SYS5926
FormRef #PriceDiscTable_PriceSales
TitleField1 #relation
TitleField2 #ItemRelation
ConfigurationKey #PriceDisc
SecurityKey #BasicTables
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Group
PrimaryIndex #RecId
ClusterIndex #PriceDiscIdx
DeveloperDocumentation #@SYS124474
ENDPROPERTIES
FIELDS
FIELD #Agreement
Id 1
STRING
PROPERTIES
Name #Agreement
Table #PriceDiscTable
ExtendedDataType
ARRAY
#PriceAgreement
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemCode
Id 2
ENUM
PROPERTIES
Name #ItemCode
Table #PriceDiscTable
ExtendedDataType
ARRAY
#PriceDiscItemCode
#
ENDARRAY
EnumType #TableGroupAll
ENDPROPERTIES
FIELD #AccountCode
Id 3
ENUM
PROPERTIES
Name #AccountCode
Table #PriceDiscTable
ExtendedDataType
ARRAY
#PriceDiscAccountCode
#
ENDARRAY
EnumType #TableGroupAll
ENDPROPERTIES
FIELD #ItemRelation
Id 4
STRING
PROPERTIES
Name #ItemRelation
Table #PriceDiscTable
ExtendedDataType
ARRAY
#PriceDiscItemRelation
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #AccountRelation
Id 5
STRING
PROPERTIES
Name #AccountRelation
Table #PriceDiscTable
ExtendedDataType
ARRAY
#PriceDiscAccountRelation
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #QuantityAmount
Id 6
REAL
PROPERTIES
Name #QuantityAmount
Label #@SYS3065
HelpText #@SYS3573
Table #PriceDiscTable
ExtendedDataType
ARRAY
#AmountQty
#
ENDARRAY
ENDPROPERTIES
FIELD #FromDate
Id 7
DATE
PROPERTIES
Name #FromDate
HelpText #@SYS13946
Table #PriceDiscTable
ExtendedDataType
ARRAY
#FromDate
#
ENDARRAY
ENDPROPERTIES
FIELD #ToDate
Id 8
DATE
PROPERTIES
Name #ToDate
HelpText #@SYS13526
Table #PriceDiscTable
ExtendedDataType
ARRAY
#ToDate
#
ENDARRAY
ENDPROPERTIES
FIELD #Amount
Id 9
REAL
PROPERTIES
Name #Amount
HelpText #@SYS10332
Table #PriceDiscTable
ExtendedDataType
ARRAY
#AmountCur
#
ENDARRAY
ENDPROPERTIES
FIELD #Currency
Id 10
STRING
PROPERTIES
Name #Currency
HelpText #@SYS20780
Mandatory #Yes
Table #PriceDiscTable
ExtendedDataType
ARRAY
#CurrencyCode
#
ENDARRAY
StringSize #3
ENDPROPERTIES
FIELD #Percent1
Id 11
REAL
PROPERTIES
Name #Percent1
Label #@SYS901
HelpText #@SYS69418
Table #PriceDiscTable
ExtendedDataType
ARRAY
#DiscPct
#
ENDARRAY
ENDPROPERTIES
FIELD #Percent2
Id 12
REAL
PROPERTIES
Name #Percent2
Label #@SYS902
HelpText #@SYS69418
Table #PriceDiscTable
ExtendedDataType
ARRAY
#DiscPct
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryTime
Id 14
INT
PROPERTIES
Name #DeliveryTime
Table #PriceDiscTable
ExtendedDataType
ARRAY
#LeadTimeDelivery
#
ENDARRAY
ENDPROPERTIES
FIELD #SearchAgain
Id 15
ENUM
PROPERTIES
Name #SearchAgain
HelpText #@SYS6533
Table #PriceDiscTable
ExtendedDataType
ARRAY
#SearchAgain
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #PriceUnit
Id 16
REAL
PROPERTIES
Name #PriceUnit
HelpText #@SYS8593
Table #PriceDiscTable
ExtendedDataType
ARRAY
#PriceUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #relation
Id 17
ENUM
PROPERTIES
Name #relation
Label #@SYS9114
HelpText #@SYS4404
AllowEditOnCreate #No
AllowEdit #No
Table #PriceDiscTable
EnumType #PriceType
ENDPROPERTIES
FIELD #UnitId
Id 19
STRING
PROPERTIES
Name #UnitId
HelpText #@SYS13900
Table #PriceDiscTable
ExtendedDataType
ARRAY
#UnitID
#
ENDARRAY
ENDPROPERTIES
FIELD #Markup
Id 20
REAL
PROPERTIES
Name #Markup
Table #PriceDiscTable
ExtendedDataType
ARRAY
#PriceMarkup
#
ENDARRAY
ENDPROPERTIES
FIELD #AllocateMarkup
Id 21
ENUM
PROPERTIES
Name #AllocateMarkup
Label #@SYS6613
HelpText #@SYS10210
Table #PriceDiscTable
EnumType #NoYes
ENDPROPERTIES
FIELD #Module
Id 22
ENUM
PROPERTIES
Name #Module
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PriceDiscTable
ExtendedDataType
ARRAY
#PriceDiscModule
#
ENDARRAY
EnumType #ModuleInventCustVend
ENDPROPERTIES
FIELD #InventDimId
Id 24
STRING
PROPERTIES
Name #InventDimId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PriceDiscTable
ExtendedDataType
ARRAY
#InventDimId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CalendarDays
Id 25
ENUM
PROPERTIES
Name #CalendarDays
Table #PriceDiscTable
ExtendedDataType
ARRAY
#CalendarDays
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#Module
#relation
#AccountCode
#AccountRelation
#ItemCode
#ItemRelation
#FromDate
#ToDate
#QuantityAmount
#Amount
#Currency
#Percent1
#Percent2
ENDGROUPFIELDS
ENDGROUP
GROUP #Administration
PROPERTIES
Name #Administration
Label #@SYS9853
ENDPROPERTIES
GROUPFIELDS
#Agreement
#SearchAgain
ENDGROUPFIELDS
ENDGROUP
GROUP #Amount
PROPERTIES
Name #Amount
Label #@SYS12227
ENDPROPERTIES
GROUPFIELDS
#Amount
#Currency
#PriceUnit
ENDGROUPFIELDS
ENDGROUP
GROUP #Delivery
PROPERTIES
Name #Delivery
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#DeliveryTime
#CalendarDays
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#AccountCode
#AccountRelation
#ItemCode
#ItemRelation
#QuantityAmount
#UnitId
#FromDate
#ToDate
#Currency
#relation
ENDGROUPFIELDS
ENDGROUP
GROUP #MiscCharges
PROPERTIES
Name #MiscCharges
Label #@SYS8371
ENDPROPERTIES
GROUPFIELDS
#Markup
#AllocateMarkup
ENDGROUPFIELDS
ENDGROUP
GROUP #Percent
PROPERTIES
Name #Percent
Label #@SYS15774
ENDPROPERTIES
GROUPFIELDS
#Percent1
#Percent2
ENDGROUPFIELDS
ENDGROUP
GROUP #Prices
PROPERTIES
Name #Prices
Label #@SYS12983
ENDPROPERTIES
GROUPFIELDS
#PriceUnit
#Markup
ENDGROUPFIELDS
ENDGROUP
GROUP #WebCategoryBrowsing
PROPERTIES
Name #WebCategoryBrowsing
Label #@SYS74258
ENDPROPERTIES
GROUPFIELDS
#relation
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#PriceDiscIdx
Id 1
PROPERTIES
Name #PriceDiscIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#relation
#ItemCode
#ItemRelation
#AccountCode
#AccountRelation
#Currency
#InventDimId
#UnitId
#QuantityAmount
#RecId
#FromDate
ENDINDEXFIELDS
#AccountIdx
Id 2
PROPERTIES
Name #AccountIdx
ENDPROPERTIES
INDEXFIELDS
#relation
#AccountCode
#AccountRelation
#Currency
#ItemCode
#ItemRelation
#UnitId
#QuantityAmount
#FromDate
ENDINDEXFIELDS
#ItemIdx
Id 3
PROPERTIES
Name #ItemIdx
ENDPROPERTIES
INDEXFIELDS
#relation
#ItemCode
#ItemRelation
#Currency
#AccountCode
#AccountRelation
#UnitId
#QuantityAmount
#FromDate
ENDINDEXFIELDS
#ItemDimIdx
Id 4
PROPERTIES
Name #ItemDimIdx
ENDPROPERTIES
INDEXFIELDS
#ItemRelation
#ItemCode
#InventDimId
#AccountCode
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #CustEndGroup
PROPERTIES
Name #CustEndGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #3
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #1
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #7
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #AccountCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CustLineGroup
PROPERTIES
Name #CustLineGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #1
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #1
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #5
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #AccountCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CustMultiGroup
PROPERTIES
Name #CustMultiGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #2
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #1
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #6
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #AccountCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CustPriceGroup
PROPERTIES
Name #CustPriceGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #1
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #4
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #AccountCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CustTable
PROPERTIES
Name #CustTable
Table #CustTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #Module
Value #1
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #AccountCode
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountRelation
RelatedField #AccountNum
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #InventTable
PROPERTIES
Name #InventTable
Table #InventTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #ItemCode
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemRelation
RelatedField #ItemId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchEndGroup
PROPERTIES
Name #PurchEndGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #3
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #3
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #ItemCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchLineGroup
PROPERTIES
Name #PurchLineGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #1
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #1
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #ItemCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchMultiGroup
PROPERTIES
Name #PurchMultiGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #2
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #2
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #ItemCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchPriceGroup
PROPERTIES
Name #PurchPriceGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #ItemCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesEndGroup
PROPERTIES
Name #SalesEndGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #3
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #7
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #ItemCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesLineGroup
PROPERTIES
Name #SalesLineGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #1
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #5
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #ItemCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesMultiGroup
PROPERTIES
Name #SalesMultiGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #2
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #6
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #ItemCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesPriceGroup
PROPERTIES
Name #SalesPriceGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #4
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #ItemCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendEndGroup
PROPERTIES
Name #VendEndGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #3
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #2
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #3
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #AccountCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendLineGroup
PROPERTIES
Name #VendLineGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #1
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #2
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #1
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #AccountCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendMultiGroup
PROPERTIES
Name #VendMultiGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #2
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #2
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
Value #2
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #AccountCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendPriceGroup
PROPERTIES
Name #VendPriceGroup
Table #PriceDiscGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Table #PriceDiscGroup
RelatedField #Type
ENDPROPERTIES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #2
Table #PriceDiscGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #relation
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #AccountCode
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountRelation
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendTable
PROPERTIES
Name #VendTable
Table #VendTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #Module
Value #2
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PriceDiscTable
Field #AccountCode
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountRelation
RelatedField #AccountNum
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #CalcPriceAmount
#AmountCur calcPriceAmount(Qty qty)
#{
# return Currency::amount(qty * this.price() / this.priceUnit() + this.markup(), this.Currency);
#}
ENDSOURCE
SOURCE #CheckAccountCode
#boolean checkAccountCode()
#{
# if (!PriceDiscTable::activationPossible(this.Relation, this.AccountCode, this.ItemCode))
# return checkFailed("@SYS14785");
#
# return true;
#}
ENDSOURCE
SOURCE #CheckAccountRelation
#boolean checkAccountRelation()
#{
# boolean ok = true;
# ;
#
# switch(this.AccountCode)
# {
# case TableGroupAll::Table : if (! (this.module() == ModuleInventCustVend::Cust ? (CustTable::exist(this.AccountRelation))
# : (VendTable::exist(this.AccountRelation))))
# ok = checkFailed("@SYS17074");
# break;
#
# case TableGroupAll::GroupId : if (! PriceDiscGroup::exist(this.module(),
# this.priceGroupType(),
# this.AccountRelation))
# {
# ok = checkFailed("@SYS17074");
# }
# break;
#
# case TableGroupAll::All : if (this.AccountRelation)
# ok = checkFailed("@SYS17074");
# break;
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckDate
#boolean checkDate()
#{
# boolean ok = true;
# ;
#
# if (this.ToDate < this.FromDate)
# if (this.ToDate)
# ok = checkFailed("@SYS16982");
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckItemCode
#boolean checkItemCode()
#{
# if (!PriceDiscTable::activationPossible(this.Relation, this.AccountCode, this.ItemCode))
# return checkFailed("@SYS14785");
#
# return true;
#}
ENDSOURCE
SOURCE #checkItemDimension
#boolean checkItemDimension()
#{
# if (this.ItemCode != TableGroupAll::Table || !this.ItemRelation)
# return true;
#
# return this.inventDim().validateWriteItemDim(this.ItemRelation,false);
#}
ENDSOURCE
SOURCE #CheckItemRelation
#boolean checkItemRelation()
#{
# boolean ok = true;
# ;
#
# switch(this.priceGroupType())
# {
# case PriceGroupType::MultiLineDiscGroup : if (this.ItemCode == 0)
# ok = checkFailed("@SYS14785");
# break;
#
# case PriceGroupType::EndDiscGroup : if (this.ItemCode < 2)
# ok = checkFailed("@SYS14785");
# break;
# }
#
#
# switch(this.ItemCode)
# {
# case TableGroupAll::Table : if (! InventTable::exist(this.ItemRelation))
# ok = checkFailed("@SYS17075");
# ok = ok && this.checkItemDimension();
# break;
#
# case TableGroupAll::GroupId : if (! PriceDiscGroup::exist(ModuleInventCustVend::Invent,
# this.priceGroupType(),
# this.ItemRelation))
# {
# ok = checkFailed("@SYS17075");
# }
# break;
#
# case TableGroupAll::All : if (this.ItemRelation)
# ok = checkFailed("@SYS17075");
# break;
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkUnitDecimals
#boolean checkUnitDecimals()
#{
# boolean ok = true;
# ;
#
# if (this.UnitId)
# {
# if (numOfDec(this.QuantityAmount) > Unit::decimals(this.UnitId))
# ok = checkFailed(strfmt("@SYS83631", Unit::decimals(this.UnitId)));
# }
# return ok;
#}
ENDSOURCE
SOURCE #custVendName
#//BP Deviation documented
#server display CustVendName custVendName()
#{
# CustVendName name;
# ;
# switch (this.AccountCode)
# {
# case TableGroupAll::Table:
# switch (this.Module)
# {
# case ModuleInventCustVend::Cust:
# name = CustTable::find(this.AccountRelation).Name;
# break;
# case ModuleInventCustVend::Vend:
# name = VendTable::find(this.AccountRelation).Name;
# break;
# }
# break;
# case TableGroupAll::GroupId:
# name = PriceDiscGroup::find(this.Module,this.priceGroupType(),this.AccountRelation).Name;
# }
# return name;
#}
ENDSOURCE
SOURCE #initFromPriceDiscAdm
#void initFromPriceDiscAdm(PriceDiscAdmTrans tmpPriceDiscAdm)
#{
# this.Agreement = tmpPriceDiscAdm.Agreement;
# this.ItemCode = tmpPriceDiscAdm.ItemCode;
# this.AccountCode = tmpPriceDiscAdm.AccountCode;
# this.ItemRelation = tmpPriceDiscAdm.ItemRelation;
# this.AccountRelation = tmpPriceDiscAdm.AccountRelation;
# this.UnitId = tmpPriceDiscAdm.UnitId;
# this.QuantityAmount = tmpPriceDiscAdm.QuantityAmount;
# this.FromDate = tmpPriceDiscAdm.FromDate;
# this.ToDate = tmpPriceDiscAdm.ToDate;
# this.Amount = tmpPriceDiscAdm.Amount;
# this.Currency = tmpPriceDiscAdm.Currency;
# this.Percent1 = tmpPriceDiscAdm.Percent1;
# this.Percent2 = tmpPriceDiscAdm.Percent2;
# this.DeliveryTime = tmpPriceDiscAdm.DeliveryTime;
# this.SearchAgain = tmpPriceDiscAdm.SearchAgain;
# this.PriceUnit = tmpPriceDiscAdm.PriceUnit;
# this.Relation = tmpPriceDiscAdm.Relation;
# this.Markup = tmpPriceDiscAdm.Markup;
# this.AllocateMarkup = tmpPriceDiscAdm.AllocateMarkup;
# this.Module = tmpPriceDiscAdm.Module;
# this.DeliveryTime = tmpPriceDiscAdm.DeliveryTime;
# this.InventDimId = tmpPriceDiscAdm.InventDimId;
#}
#
#
ENDSOURCE
SOURCE #initFromPriceDiscTable
#void initFromPriceDiscTable(PriceDiscTable _priceDiscTable)
#{
# this.Agreement = _priceDiscTable.Agreement;
# this.ItemCode = _priceDiscTable.ItemCode;
# this.AccountCode = _priceDiscTable.AccountCode;
# this.ItemRelation = _priceDiscTable.ItemRelation;
# this.AccountRelation= _priceDiscTable.AccountRelation;
# this.QuantityAmount = _priceDiscTable.QuantityAmount;
# this.FromDate = _priceDiscTable.FromDate;
# this.ToDate = _priceDiscTable.ToDate;
# this.Amount = _priceDiscTable.Amount;
# this.Currency = _priceDiscTable.Currency;
# this.Percent1 = _priceDiscTable.Percent1;
# this.Percent2 = _priceDiscTable.Percent2;
# this.DeliveryTime = _priceDiscTable.DeliveryTime;
# this.SearchAgain = _priceDiscTable.SearchAgain;
# this.PriceUnit = _priceDiscTable.PriceUnit;
# this.Relation = _priceDiscTable.Relation;
# this.UnitId = _priceDiscTable.UnitId;
# this.Markup = _priceDiscTable.Markup;
# this.AllocateMarkup = _priceDiscTable.AllocateMarkup;
# this.Module = _priceDiscTable.Module;
# this.InventDimId = _priceDiscTable.InventDimId;
# this.CalendarDays = _priceDiscTable.CalendarDays;
#}
ENDSOURCE
SOURCE #InitValue
#void initValue()
#{
# super();
#
# this.Module = ModuleInventCustVend::Vend;
# this.Relation = PriceType::PricePurch;
# this.SearchAgain = NoYes::Yes;
#}
ENDSOURCE
SOURCE #Insert
#/*
# AOSRunMode::Server
#*/
#void insert()
#{
# if (this.AccountCode == TableGroupAll::All)
# {
# this.AccountRelation = '';
# }
#
# if (this.ItemCode == TableGroupAll::All)
# {
# this.ItemRelation = '';
# this.UnitId = '';
# this.InventDimId = InventDim::inventDimIdBlank();
# }
#
# if (this.ItemCode != TableGroupAll::Table)
# {
# this.UnitId = '';
# this.InventDimId = InventDim::inventDimIdBlank();
# }
#
# super();
#}
#
ENDSOURCE
SOURCE #inventDim
#InventDim inventDim(boolean _forUpdate = false)
#{
# return InventDim::find(this.InventDimId,_forUpdate);
#}
ENDSOURCE
SOURCE #itemId
#ItemId itemId()
#{
# if (this.ItemCode == TableGroupAll::Table)
# return this.ItemRelation;
#
# return '';
#}
ENDSOURCE
SOURCE #Markup
#PriceMarkup markup()
#{
# if (this.AllocateMarkup)
# {
# return 0;
# }
#
# return this.Markup;
#}
ENDSOURCE
SOURCE #Module
#ModuleInventCustVend module()
#{
# return this.Relation < PriceType::PriceSales ? ModuleInventCustVend::Vend
# : ModuleInventCustVend::Cust;
#}
ENDSOURCE
SOURCE #pcsPrice
#//BP Deviation documented
#display Price pcsPrice()
#{;
# return (this.priceQty() * this.Amount / this.priceUnit() + this.Markup) / this.priceQty();
#}
#
ENDSOURCE
SOURCE #pcsPriceMST
#//BP Deviation documented
#display Price pcsPriceMST()
#{
# Price price = this.pcsPrice();
#
# if (this.Currency == CompanyInfo::standardCurrency())
# return price;
#
# return Currency::amountCur2MST(price,this.Currency);
#}
#
ENDSOURCE
SOURCE #Price
#AmountCur price()
#{
# if (this.AllocateMarkup)
# {
# return Currency::amount((this.priceQty() * this.Amount + this.Markup * this.priceUnit()) / this.priceQty(),this.Currency);
# }
#
# return this.Amount;
#}
ENDSOURCE
SOURCE #PriceGroupType
#PriceGroupType priceGroupType()
#{
# return (this.Relation mod 4);
#}
ENDSOURCE
SOURCE #PriceQty
#AmountQty priceQty()
#{
# return this.QuantityAmount ? this.QuantityAmount : 1;
#}
ENDSOURCE
SOURCE #PriceUnit
#PriceUnit priceUnit()
#{
# return this.PriceUnit ? this.PriceUnit : 1;
#}
ENDSOURCE
SOURCE #Update
#/*
# AOSRunMode::Server
#*/
#void update()
#{
# if (this.AccountCode == TableGroupAll::All)
# {
# this.AccountRelation = '';
# }
#
# if (this.ItemCode == TableGroupAll::All)
# {
# this.ItemRelation = '';
# this.UnitId = '';
# this.InventDimId = InventDim::inventDimIdBlank();
# }
#
# if (this.ItemCode != TableGroupAll::Table)
# {
# this.UnitId = '';
# this.InventDimId = InventDim::inventDimIdBlank();
# }
#
# super();
#}
#
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId fieldId)
#{
# boolean ok = true;
# ;
#
# ok = super(fieldId);
#
# switch(fieldId)
# {
# case(fieldnum(PriceDiscTable, FromDate)) : ok = this.checkDate();
# break;
# case(fieldnum(PriceDiscTable, ToDate)) : ok = this.checkDate();
# break;
# case(fieldnum(PriceDiscTable, ItemRelation)) : ok = this.checkItemRelation();
# break;
# case(fieldnum(PriceDiscTable, AccountRelation)) : ok = this.checkAccountRelation();
# break;
# case(fieldnum(PriceDiscTable, ItemCode)) : ok = this.checkItemCode();
# break;
# case(fieldnum(PriceDiscTable, AccountCode)) : ok = this.checkAccountCode();
# break;
#
# case fieldnum(PriceDiscTable,DeliveryTime):
# if (this.DeliveryTime < 0)
# return checkFailed("@SYS53966");
#
# break;
#
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #ValidateWrite
#boolean validateWrite()
#{
# boolean ok = true;
# ;
#
# ok = super();
#
# if (! this.checkUnitDecimals())
# ok = false;
#
# if (! this.checkDate())
# ok = false;
#
# if (! this.checkItemRelation())
# ok = false;
#
# if (! this.checkAccountRelation())
# ok = false;
#
# return ok;
#}
ENDSOURCE
SOURCE #activation
#static NoYes activation(PriceType relation,
# TableGroupAll accountCode,
# TableGroupAll itemCode,
# PriceParameters priceParameters = PriceParameters::find())
#{
# switch(accountCode)
# {
# case TableGroupAll::Table :
# switch(itemCode)
# {
# case TableGroupAll::Table :
# switch(relation)
# {
# case PriceType::PricePurch : return priceParameters.PurchPriceAccountItem;
# case PriceType::LineDiscPurch : return priceParameters.PurchLineAccountItem;
# case PriceType::MultiLineDiscPurch : return NoYes::No;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::PriceSales : return priceParameters.SalesPriceAccountItem;
# case PriceType::LineDiscSales : return priceParameters.SalesLineAccountItem;
# case PriceType::MultiLineDiscSales : return NoYes::No;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::GroupId:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::LineDiscPurch : return priceParameters.PurchLineAccountGroup;
# case PriceType::MultiLineDiscPurch : return priceParameters.PurchMultiLnAccountGroup;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::PriceSales : return NoYes::No;
# case PriceType::LineDiscSales : return priceParameters.SalesLineAccountGroup;
# case PriceType::MultiLineDiscSales : return priceParameters.SalesMultiLnAccountGroup;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::All:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::LineDiscPurch : return priceParameters.PurchLineAccountAll;
# case PriceType::MultiLineDiscPurch : return priceParameters.PurchMultiLnAccountAll;
# case PriceType::EndDiscPurch : return priceParameters.PurchEndAccountAll;
# case PriceType::PriceSales : return NoYes::No;
# case PriceType::LineDiscSales : return priceParameters.SalesLineAccountAll;
# case PriceType::MultiLineDiscSales : return priceParameters.SalesMultiLnAccountAll;
# case PriceType::EndDiscSales : return priceParameters.SalesEndAccountAll;
# }
# break;
# }
#
# case TableGroupAll::GroupId:
# switch(itemCode)
# {
# case TableGroupAll::Table:
# switch(relation)
# {
# case PriceType::PricePurch : return priceParameters.PurchPriceGroupItem;
# case PriceType::LineDiscPurch : return priceParameters.PurchLineGroupItem;
# case PriceType::MultiLineDiscPurch : return NoYes::No;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::PriceSales : return priceParameters.SalesPriceGroupItem;
# case PriceType::LineDiscSales : return priceParameters.SalesLineGroupItem;
# case PriceType::MultiLineDiscSales : return NoYes::No;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::GroupId:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::LineDiscPurch : return priceParameters.PurchLineGroupGroup;
# case PriceType::MultiLineDiscPurch : return priceParameters.PurchMultiLnGroupGroup;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::PriceSales : return NoYes::No;
# case PriceType::LineDiscSales : return priceParameters.SalesLineGroupGroup;
# case PriceType::MultiLineDiscSales : return priceParameters.SalesMultiLnGroupGroup;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::All:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::LineDiscPurch : return priceParameters.PurchLineGroupAll;
# case PriceType::MultiLineDiscPurch : return priceParameters.PurchMultiLnGroupAll;
# case PriceType::EndDiscPurch : return priceParameters.PurchEndGroupAll;
# case PriceType::PriceSales : return NoYes::No;
# case PriceType::LineDiscSales : return priceParameters.SalesLineGroupAll;
# case PriceType::MultiLineDiscSales : return priceParameters.SalesMultiLnGroupAll;
# case PriceType::EndDiscSales : return priceParameters.SalesEndGroupAll;
# }
# break;
# }
#
# case TableGroupAll::All:
# switch(itemCode)
# {
# case TableGroupAll::Table:
# switch(relation)
# {
# case PriceType::PricePurch : return priceParameters.PurchPriceAllItem;
# case PriceType::LineDiscPurch : return priceParameters.PurchLineAllItem;
# case PriceType::MultiLineDiscPurch : return NoYes::No;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::PriceSales : return priceParameters.SalesPriceAllItem;
# case PriceType::LineDiscSales : return priceParameters.SalesLineAllItem;
# case PriceType::MultiLineDiscSales : return NoYes::No;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::GroupId:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::LineDiscPurch : return priceParameters.PurchLineAllGroup;
# case PriceType::MultiLineDiscPurch : return priceParameters.PurchMultiLnAllGroup;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::PriceSales : return NoYes::No;
# case PriceType::LineDiscSales : return priceParameters.SalesLineAllGroup;
# case PriceType::MultiLineDiscSales : return priceParameters.SalesMultiLnAllGroup;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::All:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::LineDiscPurch : return priceParameters.PurchLineAllAll;
# case PriceType::MultiLineDiscPurch : return priceParameters.PurchMultiLnAllAll;
# case PriceType::EndDiscPurch : return priceParameters.PurchEndAllAll;
# case PriceType::PriceSales : return NoYes::No;
# case PriceType::LineDiscSales : return priceParameters.SalesLineAllAll;
# case PriceType::MultiLineDiscSales : return priceParameters.SalesMultiLnAllAll;
# case PriceType::EndDiscSales : return priceParameters.SalesEndAllAll;
# }
# break;
# }
# }
#
# return NoYes::No;
#}
ENDSOURCE
SOURCE #activationPossible
#static NoYes activationPossible(PriceType relation,
# TableGroupAll accountCode,
# TableGroupAll itemCode)
#{
# switch(accountCode)
# {
# case TableGroupAll::Table:
# switch(itemCode)
# {
# case TableGroupAll::Table:
# switch(relation)
# {
# case PriceType::MultiLineDiscPurch : return NoYes::No;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::MultiLineDiscSales : return NoYes::No;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::GroupId:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::PriceSales : return NoYes::No;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::All:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::PriceSales : return NoYes::No;
# }
# break;
# }
#
# case TableGroupAll::GroupId:
# switch(itemCode)
# {
# case TableGroupAll::Table:
# switch(relation)
# {
# case PriceType::MultiLineDiscPurch : return NoYes::No;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::MultiLineDiscSales : return NoYes::No;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::GroupId:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::PriceSales : return NoYes::No;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::All:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::PriceSales : return NoYes::No;
# }
# break;
# }
#
# case TableGroupAll::All:
# switch(itemCode)
# {
# case TableGroupAll::Table:
# switch(relation)
# {
# case PriceType::MultiLineDiscPurch : return NoYes::No;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::MultiLineDiscSales : return NoYes::No;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::GroupId:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::EndDiscPurch : return NoYes::No;
# case PriceType::PriceSales : return NoYes::No;
# case PriceType::EndDiscSales : return NoYes::No;
# }
# break;
#
# case TableGroupAll::All:
# switch(relation)
# {
# case PriceType::PricePurch : return NoYes::No;
# case PriceType::PriceSales : return NoYes::No;
# }
# break;
# }
# }
#
# return NoYes::Yes;
#}
ENDSOURCE
SOURCE #existAccountItemDateRelation
#server static boolean existAccountItemDateRelation(PriceType _relation,
# PriceDiscAccountRelation _accountNum,
# PriceDiscAccountRelation _accountGroupId,
# PriceDiscItemRelation _itemId,
# PriceDiscItemRelation _itemGroupId,
# date _date = systemdateget(),
# AmountQty _amountQty = -1,
# InventDim _inventDimCriteria = null)
#{
# InventDim inventDim;
# InventDimParm inventDimParm;
# PriceDiscTable priceDiscTable;
#;
#
# inventDimParm.initFromInventDim(_inventDimCriteria);
#
# select firstonly priceDiscTable
# where priceDiscTable.Relation == _relation &&
# (_date >= priceDiscTable.FromDate || ! priceDiscTable.FromDate) &&
# (_date <= priceDiscTable.ToDate || ! priceDiscTable.ToDate) &&
# priceDiscTable.QuantityAmount > _amountQty &&
# ((priceDiscTable.ItemCode == TableGroupAll::Table &&
# priceDiscTable.ItemRelation == _itemId) ||
# (priceDiscTable.ItemCode == TableGroupAll::GroupId &&
# priceDiscTable.ItemRelation == _itemGroupId) ||
# (priceDiscTable.ItemCode == TableGroupAll::All)) &&
# ((priceDiscTable.AccountCode == TableGroupAll::Table &&
# priceDiscTable.AccountRelation == _accountNum) ||
# (priceDiscTable.AccountCode == TableGroupAll::GroupId &&
# priceDiscTable.AccountRelation == _accountGroupId) ||
# (priceDiscTable.AccountCode == TableGroupAll::All))
# #InventDimExistsJoin(priceDiscTable.InventDimId,InventDim,_InventDimCriteria,InventDimParm);
#
# return priceDiscTable.RecId;
#}
ENDSOURCE
SOURCE #existAccountRelation
#static boolean existAccountRelation(PriceType relation,
# CustVendAC accountRelation)
#{
# return (select firstonly RecId from priceDiscTable
# where priceDiscTable.Relation == relation &&
# priceDiscTable.AccountCode == TableGroupAll::GroupId &&
# priceDiscTable.AccountRelation == accountRelation
# ).RecId != 0;
#}
ENDSOURCE
SOURCE #existItemRelation
#static boolean existItemRelation(PriceType relation,
# ItemId itemRelation)
#{
# return (select firstonly RecId from priceDiscTable
# where priceDiscTable.Relation == relation &&
# priceDiscTable.ItemCode == TableGroupAll::GroupId &&
# priceDiscTable.ItemRelation == itemRelation
# ).RecId != 0;
#}
ENDSOURCE
SOURCE #existPriceDiscAccountItemDateRelation
#server static boolean existPriceDiscAccountItemDateRelation(PriceDiscAccountRelation _accountNum,
# PriceDiscItemRelation _itemId,
# AmountQty _amountQty = -1,
# PriceDiscAccountRelation _accountPriceGroupId = CustTable::find(_accountNum).PriceGroup,
# PriceDiscAccountRelation _accountLineDiscGroupId = CustTable::find(_accountNum).LineDisc,
# PriceDiscItemRelation _itemLineDiscGroupId = InventTable::find(_itemId).salesLineDisc(),
# date _date = systemdateget(),
# InventDim _inventDimCriteria = null
#)
#{
# if (PriceDiscTable::existAccountItemDateRelation(PriceType::PriceSales,
# _accountNum,
# _accountPriceGroupId,
# _itemId,
# '',
# _date,
# _amountQty,
# _inventDimCriteria) ||
# PriceDiscTable::existAccountItemDateRelation(PriceType::LineDiscSales,
# _accountNum,
# _accountLineDiscGroupId,
# _itemId,
# _itemLineDiscGroupId,
# _date,
# _amountQty,
# _inventDimCriteria))
# {
# return true;
# }
#
# return false;
#}
ENDSOURCE
SOURCE #find
#static PriceDiscTable find(PriceType relation,
# TableGroupAll itemCode,
# ItemRelation itemRelation,
# TableGroupAll accountCode,
# CustVendRel accountRelation,
# InventDim inventDimCriteria,
# UnitID unitID,
# CurrencyCode currency,
# AmountQty amountQty,
# boolean update = false)
#{
# PriceDiscTable priceDiscTable;
# InventDim inventDim;
# InventDimParm inventDimParm;
# ;
#
# inventDimParm.initFromInventDim(inventDimCriteria);
# priceDiscTable.selectForUpdate (update);
# priceDiscTable.selectLocked (update);
#
# select firstonly priceDiscTable
# index hint PriceDiscIdx
# where priceDiscTable.Relation == relation &&
# priceDiscTable.ItemCode == itemCode &&
# priceDiscTable.ItemRelation == itemRelation &&
# priceDiscTable.AccountCode == accountCode &&
# priceDiscTable.AccountRelation == accountRelation &&
# priceDiscTable.Currency == currency &&
# priceDiscTable.UnitId == unitID &&
# priceDiscTable.QuantityAmount == amountQty
# #InventDimExistsJoin(priceDiscTable.inventDimId,InventDim,InventDimCriteria,InventDimParm);
#
# return priceDiscTable;
#}
#
#
ENDSOURCE
SOURCE #findRecId
#static PriceDiscTable findRecId(recId recId,
# boolean update = false)
#{
# PriceDiscTable priceDiscTable;
# ;
#
# priceDiscTable.selectForUpdate(update);
#
# select firstonly priceDiscTable
# where priceDiscTable.RecId == recId;
#
# return priceDiscTable;
#}
ENDSOURCE
SOURCE #resolveModuleFromPriceType
#static ModuleInventCustVend resolveModuleFromPriceType(PriceType _priceType)
#{
# return _priceType < PriceType::PriceSales ? ModuleInventCustVend::Vend : ModuleInventCustVend::Cust;
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : InventTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #InventTable
Id 175
PROPERTIES
Name #InventTable
Label #@SYS15649
FormRef #InventTable
SearchLinkRefType #Action
SearchLinkRefName #EPInventTableSearchItem
TitleField1 #ItemId
TitleField2 #ItemName
ConfigurationKey #LogisticsBasic
SecurityKey #InventTables
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Main
PrimaryIndex #ItemIdx
ClusterIndex #ItemIdx
AnalysisVisibility #High
DeveloperDocumentation #@SYS123844
ENDPROPERTIES
FIELDS
FIELD #ItemGroupId
Id 1
STRING
PROPERTIES
Name #ItemGroupId
HelpText #@SYS27685
Mandatory #Yes
Table #InventTable
ExtendedDataType
ARRAY
#ItemGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemId
Id 2
STRING
PROPERTIES
Name #ItemId
Mandatory #Yes
AllowEdit #No
Table #InventTable
ExtendedDataType
ARRAY
#ItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ItemName
Id 3
STRING
PROPERTIES
Name #ItemName
Table #InventTable
ExtendedDataType
ARRAY
#ItemName
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #ItemType
Id 4
ENUM
PROPERTIES
Name #ItemType
AllowEdit #No
Table #InventTable
EnumType #ItemType
ENDPROPERTIES
FIELD #PurchModel
Id 5
ENUM
PROPERTIES
Name #PurchModel
Table #InventTable
ExtendedDataType
ARRAY
#ItemPurchModel
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Height
Id 6
REAL
PROPERTIES
Name #Height
Table #InventTable
ExtendedDataType
ARRAY
#BOMMeasureHeight
#
ENDARRAY
ENDPROPERTIES
FIELD #Width
Id 7
REAL
PROPERTIES
Name #Width
Table #InventTable
ExtendedDataType
ARRAY
#BOMMeasureWidth
#
ENDARRAY
ENDPROPERTIES
FIELD #SalesModel
Id 8
ENUM
PROPERTIES
Name #SalesModel
Table #InventTable
ExtendedDataType
ARRAY
#ItemSalesModel
#
ENDARRAY
EnumType #SalesPriceModel
ENDPROPERTIES
FIELD #CostGroupId
Id 9
STRING
PROPERTIES
Name #CostGroupId
HelpText #@SYS25616
Table #InventTable
ExtendedDataType
ARRAY
#CostGroupIdDirectMaterial
#
ENDARRAY
ENDPROPERTIES
FIELD #ReqGroupId
Id 10
STRING
PROPERTIES
Name #ReqGroupId
HelpText #@SYS6456
Table #InventTable
ExtendedDataType
ARRAY
#ReqGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #EPCManager
Id 11
REAL
PROPERTIES
Name #EPCManager
Table #InventTable
ExtendedDataType
ARRAY
#EPCManager
#
ENDARRAY
ENDPROPERTIES
FIELD #PrimaryVendorId
Id 12
STRING
PROPERTIES
Name #PrimaryVendorId
Table #InventTable
ExtendedDataType
ARRAY
#ItemPrimaryVendId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #NetWeight
Id 13
REAL
PROPERTIES
Name #NetWeight
Table #InventTable
ExtendedDataType
ARRAY
#ItemNetWeight
#
ENDARRAY
ENDPROPERTIES
FIELD #Depth
Id 14
REAL
PROPERTIES
Name #Depth
Table #InventTable
ExtendedDataType
ARRAY
#BOMMeasureDepth
#
ENDARRAY
ENDPROPERTIES
FIELD #UnitVolume
Id 15
REAL
PROPERTIES
Name #UnitVolume
Table #InventTable
ExtendedDataType
ARRAY
#ItemVolume
#
ENDARRAY
ENDPROPERTIES
FIELD #BOMUnitId
Id 16
STRING
PROPERTIES
Name #BOMUnitId
Label #@SYS3622
Table #InventTable
ExtendedDataType
ARRAY
#BOMUnitId
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemPriceToleranceGroupId
Id 17
STRING
PROPERTIES
Name #ItemPriceToleranceGroupId
Table #InventTable
ExtendedDataType
ARRAY
#ItemPriceToleranceGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #Density
Id 18
REAL
PROPERTIES
Name #Density
Table #InventTable
ExtendedDataType
ARRAY
#BOMMeasureDensity
#
ENDARRAY
ENDPROPERTIES
FIELD #Dimension
Id 21
STRING
PROPERTIES
Name #Dimension
Table #InventTable
ExtendedDataType
ARRAY
#Dimension
#
ENDARRAY
ENDPROPERTIES
FIELD #CostModel
Id 22
ENUM
PROPERTIES
Name #CostModel
Table #InventTable
ExtendedDataType
ARRAY
#ItemCostModel
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #UseAltItemId
Id 23
ENUM
PROPERTIES
Name #UseAltItemId
Label #@SYS5983
Table #InventTable
ExtendedDataType
ARRAY
#ItemUseAlternative
#
ENDARRAY
EnumType #ItemNumAlternative
ENDPROPERTIES
FIELD #AltItemId
Id 24
STRING
PROPERTIES
Name #AltItemId
Table #InventTable
ExtendedDataType
ARRAY
#ItemIdAlternative
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Intracode
Id 26
STRING
PROPERTIES
Name #Intracode
Table #InventTable
ExtendedDataType
ARRAY
#IntrastatItemCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #ProdFlushingPrincip
Id 27
ENUM
PROPERTIES
Name #ProdFlushingPrincip
Table #InventTable
EnumType #ProdFlushingPrincipItem
ENDPROPERTIES
FIELD #MinimumPalletQuantity
Id 28
REAL
PROPERTIES
Name #MinimumPalletQuantity
Table #InventTable
ExtendedDataType
ARRAY
#WMSMinimumPalletQuantity
#
ENDARRAY
ENDPROPERTIES
FIELD #PBAItemAutoGenerated
Id 29
ENUM
PROPERTIES
Name #PBAItemAutoGenerated
Table #InventTable
ExtendedDataType
ARRAY
#PBAItemAutoGenerated
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #WMSArrivalHandlingTime
Id 30
TIME
PROPERTIES
Name #WMSArrivalHandlingTime
Table #InventTable
ExtendedDataType
ARRAY
#WMSArrivalHandlingTime
#
ENDARRAY
ENDPROPERTIES
FIELD #BOMManualReceipt
Id 33
ENUM
PROPERTIES
Name #BOMManualReceipt
Table #InventTable
ExtendedDataType
ARRAY
#ItemBOMManualReceipt
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #StopExplode
Id 34
ENUM
PROPERTIES
Name #StopExplode
Table #InventTable
ExtendedDataType
ARRAY
#ItemStopExplode
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Phantom
Id 36
ENUM
PROPERTIES
Name #Phantom
Table #InventTable
ExtendedDataType
ARRAY
#ItemPhantom
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #IntraUnit
Id 37
REAL
PROPERTIES
Name #IntraUnit
Table #InventTable
ExtendedDataType
ARRAY
#IntrastatConvert
#
ENDARRAY
ENDPROPERTIES
FIELD #BOMLevel
Id 38
INT
PROPERTIES
Name #BOMLevel
AllowEditOnCreate #No
AllowEdit #No
Table #InventTable
ExtendedDataType
ARRAY
#ItemBOMLevel
#
ENDARRAY
ENDPROPERTIES
FIELD #BatchNumGroupId
Id 39
STRING
PROPERTIES
Name #BatchNumGroupId
Label #@SYS53815
HelpText #@SYS1674
Table #InventTable
ExtendedDataType
ARRAY
#InventNumGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #AutoReportFinished
Id 40
ENUM
PROPERTIES
Name #AutoReportFinished
Table #InventTable
ExtendedDataType
ARRAY
#ItemAutoReportFinished
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #OrigCountryRegionId
Id 41
STRING
PROPERTIES
Name #OrigCountryRegionId
Table #InventTable
ExtendedDataType
ARRAY
#ItemOrigCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #StatisticsFactor
Id 43
REAL
PROPERTIES
Name #StatisticsFactor
Table #InventTable
ExtendedDataType
ARRAY
#IntrastatMarkupPct
#
ENDARRAY
ENDPROPERTIES
FIELD #AltConfigId
Id 44
STRING
PROPERTIES
Name #AltConfigId
Table #InventTable
ExtendedDataType
ARRAY
#ConfigIdAlternative
#
ENDARRAY
ENDPROPERTIES
FIELD #StandardConfigId
Id 45
STRING
PROPERTIES
Name #StandardConfigId
Table #InventTable
ExtendedDataType
ARRAY
#ConfigIdStandard
#
ENDARRAY
ENDPROPERTIES
FIELD #ProdPoolId
Id 47
STRING
PROPERTIES
Name #ProdPoolId
Table #InventTable
ExtendedDataType
ARRAY
#ItemProdPoolId
#
ENDARRAY
ENDPROPERTIES
FIELD #PropertyId
Id 48
STRING
PROPERTIES
Name #PropertyId
Table #InventTable
ExtendedDataType
ARRAY
#PropertyIdItem
#
ENDARRAY
ENDPROPERTIES
FIELD #ABCTieUp
Id 49
ENUM
PROPERTIES
Name #ABCTieUp
Label #@SYS7296
HelpText #@SYS12390
GroupPrompt #@SYS14545
ConfigurationKey #LogisticsAdvanced
Table #InventTable
EnumType #ABC
ENDPROPERTIES
FIELD #ABCRevenue
Id 50
ENUM
PROPERTIES
Name #ABCRevenue
Label #@SYS7295
HelpText #@SYS6299
GroupPrompt #@SYS10074
ConfigurationKey #LogisticsAdvanced
Table #InventTable
EnumType #ABC
ENDPROPERTIES
FIELD #ABCValue
Id 51
ENUM
PROPERTIES
Name #ABCValue
Label #@SYS10478
HelpText #@SYS1560
GroupPrompt #@SYS11762
ConfigurationKey #LogisticsAdvanced
Table #InventTable
EnumType #ABC
ENDPROPERTIES
FIELD #ABCContributionMargin
Id 52
ENUM
PROPERTIES
Name #ABCContributionMargin
Label #@SYS11930
HelpText #@SYS1505
GroupPrompt #@SYS5446
ConfigurationKey #LogisticsAdvanced
Table #InventTable
EnumType #ABC
ENDPROPERTIES
FIELD #CommissionGroupId
Id 53
STRING
PROPERTIES
Name #CommissionGroupId
Label #@SYS23785
HelpText #@SYS25617
Table #InventTable
ExtendedDataType
ARRAY
#CommissItemGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #Configurable
Id 56
ENUM
PROPERTIES
Name #Configurable
Table #InventTable
ExtendedDataType
ARRAY
#ItemConfigurable
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #SalesPercentMarkup
Id 60
REAL
PROPERTIES
Name #SalesPercentMarkup
Table #InventTable
ExtendedDataType
ARRAY
#ItemSalesPercentMarkup
#
ENDARRAY
ENDPROPERTIES
FIELD #SalesContributionRatio
Id 61
REAL
PROPERTIES
Name #SalesContributionRatio
Table #InventTable
ExtendedDataType
ARRAY
#ItemSalesContributionRatio
#
ENDARRAY
ENDPROPERTIES
FIELD #SalesPriceModelBasic
Id 62
ENUM
PROPERTIES
Name #SalesPriceModelBasic
Table #InventTable
EnumType #SalesPriceModelBasic
ENDPROPERTIES
FIELD #DEL_MinAverageSettle
Id 63
REAL
PROPERTIES
Name #DEL_MinAverageSettle
ConfigurationKey #SysDeletedObjects41
Table #InventTable
ENDPROPERTIES
FIELD #NameAlias
Id 64
STRING
PROPERTIES
Name #NameAlias
Table #InventTable
AliasFor #ItemId
ExtendedDataType
ARRAY
#ItemNameAlias
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ProdGroupId
Id 65
STRING
PROPERTIES
Name #ProdGroupId
Table #InventTable
ExtendedDataType
ARRAY
#ItemProdGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #projCategoryId
Id 66
STRING
PROPERTIES
Name #projCategoryId
Table #InventTable
ExtendedDataType
ARRAY
#ProjCategoryId
#
ENDARRAY
ENDPROPERTIES
FIELD #grossDepth
Id 67
REAL
PROPERTIES
Name #grossDepth
Label #@SYS50291
HelpText #@SYS50292
Table #InventTable
ExtendedDataType
ARRAY
#InventDepth
#
ENDARRAY
ENDPROPERTIES
FIELD #grossWidth
Id 69
REAL
PROPERTIES
Name #grossWidth
Label #@SYS50289
HelpText #@SYS50290
Table #InventTable
ExtendedDataType
ARRAY
#InventWidth
#
ENDARRAY
ENDPROPERTIES
FIELD #grossHeight
Id 70
REAL
PROPERTIES
Name #grossHeight
Label #@SYS50287
HelpText #@SYS50288
Table #InventTable
ExtendedDataType
ARRAY
#InventHeight
#
ENDARRAY
ENDPROPERTIES
FIELD #standardPalletQuantity
Id 71
REAL
PROPERTIES
Name #standardPalletQuantity
Table #InventTable
ExtendedDataType
ARRAY
#WMSStandardPalletQuantity
#
ENDARRAY
ENDPROPERTIES
FIELD #qtyPerLayer
Id 72
REAL
PROPERTIES
Name #qtyPerLayer
Table #InventTable
ExtendedDataType
ARRAY
#WMSQtyPerLayer
#
ENDARRAY
ENDPROPERTIES
FIELD #sortCode
Id 73
INT
PROPERTIES
Name #sortCode
HelpText #@SYS56625
Table #InventTable
ExtendedDataType
ARRAY
#WMSSortCode
#
ENDARRAY
ENDPROPERTIES
FIELD #ConfigSimilar
Id 74
ENUM
PROPERTIES
Name #ConfigSimilar
Table #InventTable
ExtendedDataType
ARRAY
#ItemConfigSimilar
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #SerialNumGroupId
Id 75
STRING
PROPERTIES
Name #SerialNumGroupId
Label #@SYS53816
HelpText #@SYS53817
Table #InventTable
ExtendedDataType
ARRAY
#InventNumGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #DimGroupId
Id 76
STRING
PROPERTIES
Name #DimGroupId
Mandatory #Yes
Table #InventTable
ExtendedDataType
ARRAY
#InventDimGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #ModelGroupId
Id 77
STRING
PROPERTIES
Name #ModelGroupId
Mandatory #Yes
Table #InventTable
ExtendedDataType
ARRAY
#InventModelGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemBuyerGroupId
Id 78
STRING
PROPERTIES
Name #ItemBuyerGroupId
Table #InventTable
ExtendedDataType
ARRAY
#ItemBuyerGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxPackagingQty
Id 79
REAL
PROPERTIES
Name #TaxPackagingQty
Table #InventTable
ExtendedDataType
ARRAY
#TaxPackagingQty
#
ENDARRAY
ENDPROPERTIES
FIELD #WMSPalletTypeId
Id 81
STRING
PROPERTIES
Name #WMSPalletTypeId
HelpText #@SYS57866
Table #InventTable
ExtendedDataType
ARRAY
#WMSPalletTypeId
#
ENDARRAY
StringSize #15
ENDPROPERTIES
FIELD #OrigStateId
Id 82
STRING
PROPERTIES
Name #OrigStateId
Table #InventTable
ExtendedDataType
ARRAY
#ItemOrigStateId
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_StopExplodePrice
Id 84
ENUM
PROPERTIES
Name #DEL_StopExplodePrice
ConfigurationKey #SysDeletedObjects40
Table #InventTable
ExtendedDataType
ARRAY
#ItemStopExplodePrice
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #WMSPickingQtyTime
Id 85
TIME
PROPERTIES
Name #WMSPickingQtyTime
Label #@SYS51198
HelpText #@SYS51199
ConfigurationKey #WMSAdvanced
Table #InventTable
ExtendedDataType
ARRAY
#TimeHour24
#
ENDARRAY
ENDPROPERTIES
FIELD #TaraWeight
Id 86
REAL
PROPERTIES
Name #TaraWeight
Table #InventTable
ExtendedDataType
ARRAY
#ItemTaraWeight
#
ENDARRAY
ENDPROPERTIES
FIELD #PackagingGroupId
Id 87
STRING
PROPERTIES
Name #PackagingGroupId
Table #InventTable
ExtendedDataType
ARRAY
#ItemPackagingGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #ScrapVar
Id 88
REAL
PROPERTIES
Name #ScrapVar
HelpText #@SYS73407
Table #InventTable
ExtendedDataType
ARRAY
#ScrapVar
#
ENDARRAY
ENDPROPERTIES
FIELD #ScrapConst
Id 89
REAL
PROPERTIES
Name #ScrapConst
HelpText #@SYS73406
Table #InventTable
ExtendedDataType
ARRAY
#ScrapConst
#
ENDARRAY
ENDPROPERTIES
FIELD #StandardInventColorId
Id 90
STRING
PROPERTIES
Name #StandardInventColorId
Table #InventTable
ExtendedDataType
ARRAY
#InventColorId
#
ENDARRAY
ENDPROPERTIES
FIELD #StandardInventSizeId
Id 91
STRING
PROPERTIES
Name #StandardInventSizeId
Table #InventTable
ExtendedDataType
ARRAY
#InventSizeId
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemDimCombinationAutoCreate
Id 92
ENUM
PROPERTIES
Name #ItemDimCombinationAutoCreate
Table #InventTable
ExtendedDataType
ARRAY
#ItemDimCombinationAutoCreate
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ItemDimCostPrice
Id 93
ENUM
PROPERTIES
Name #ItemDimCostPrice
Table #InventTable
ExtendedDataType
ARRAY
#ItemDimCostPrice
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ItemIdCompany
Id 94
STRING
PROPERTIES
Name #ItemIdCompany
Table #InventTable
ExtendedDataType
ARRAY
#ItemIdCompany
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #AltInventSizeId
Id 95
STRING
PROPERTIES
Name #AltInventSizeId
HelpText #@SYS75748
Table #InventTable
ExtendedDataType
ARRAY
#InventSizeId
#
ENDARRAY
ENDPROPERTIES
FIELD #AltInventColorId
Id 96
STRING
PROPERTIES
Name #AltInventColorId
HelpText #@SYS75749
Table #InventTable
ExtendedDataType
ARRAY
#InventColorId
#
ENDARRAY
ENDPROPERTIES
FIELD #ForecastDMPInclude
Id 97
ENUM
PROPERTIES
Name #ForecastDMPInclude
Table #InventTable
ExtendedDataType
ARRAY
#ForecastDMPInclude
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #PalletTagging
Id 100
ENUM
PROPERTIES
Name #PalletTagging
Table #InventTable
ExtendedDataType
ARRAY
#RFIDPalletTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ItemTaggingLevel
Id 101
ENUM
PROPERTIES
Name #ItemTaggingLevel
Table #InventTable
EnumType #RFIDItemTaggingLevel
ENDPROPERTIES
FIELD #FiscalLIFOAvoidCalc
Id 108
ENUM
PROPERTIES
Name #FiscalLIFOAvoidCalc
Table #InventTable
ExtendedDataType
ARRAY
#InventFiscalLIFOAvoidCalc
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #FiscalLIFONormalValue
Id 109
REAL
PROPERTIES
Name #FiscalLIFONormalValue
Table #InventTable
ExtendedDataType
ARRAY
#InventFiscalLIFONormalValue
#
ENDARRAY
ENDPROPERTIES
FIELD #FiscalLIFOGroup
Id 110
STRING
PROPERTIES
Name #FiscalLIFOGroup
HelpText #@SYS93063
Table #InventTable
ExtendedDataType
ARRAY
#InventFiscalLIFOGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #FiscalLIFONormalValueCalc
Id 111
ENUM
PROPERTIES
Name #FiscalLIFONormalValueCalc
Table #InventTable
EnumType #InventFiscalLIFONormalValueCalc
ENDPROPERTIES
FIELD #BOMCalcGroupId
Id 112
STRING
PROPERTIES
Name #BOMCalcGroupId
Table #InventTable
ExtendedDataType
ARRAY
#BOMCalcGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #PBAItemConfigurable
Id 8001
ENUM
PROPERTIES
Name #PBAItemConfigurable
Label #@SYS40402
HelpText #@SYS40510
ConfigurationKey #PBA_ProductBuilder
Table #InventTable
EnumType #NoYes
ENDPROPERTIES
FIELD #PBAInventItemGroupId
Id 8002
STRING
PROPERTIES
Name #PBAInventItemGroupId
Table #InventTable
ExtendedDataType
ARRAY
#PBAInventItemGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #PBAHideDialog
Id 8003
ENUM
PROPERTIES
Name #PBAHideDialog
Table #InventTable
ExtendedDataType
ARRAY
#PBAHideDialog
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #PBAHideApproval
Id 8004
ENUM
PROPERTIES
Name #PBAHideApproval
Table #InventTable
ExtendedDataType
ARRAY
#PBAHideApproval
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #PBAAutoStart
Id 8005
ENUM
PROPERTIES
Name #PBAAutoStart
ConfigurationKey #PBA_ProductBuilder
Table #InventTable
ExtendedDataType
ARRAY
#PBAAutostart
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #PBAMandatoryConfig
Id 8006
ENUM
PROPERTIES
Name #PBAMandatoryConfig
ConfigurationKey #PBA_ProductBuilder
Table #InventTable
ExtendedDataType
ARRAY
#PBAMandatoryConfig
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#ItemId
#ItemName
#NameAlias
#ItemGroupId
#ItemType
#Configurable
#configActive
ENDGROUPFIELDS
ENDGROUP
GROUP #ABC
PROPERTIES
Name #ABC
Label #@SYS21669
ENDPROPERTIES
GROUPFIELDS
#ABCValue
#ABCContributionMargin
#ABCRevenue
#ABCTieUp
ENDGROUPFIELDS
ENDGROUP
GROUP #BOM
PROPERTIES
Name #BOM
Label #@SYS7916
ENDPROPERTIES
GROUPFIELDS
#BOMUnitId
#ScrapConst
#ScrapVar
#BOMLevel
#Phantom
#AutoReportFinished
ENDGROUPFIELDS
ENDGROUP
GROUP #BOMCalculation
PROPERTIES
Name #BOMCalculation
Label #@SYS5681
ENDPROPERTIES
GROUPFIELDS
#BOMCalcGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #Deleted
PROPERTIES
Name #Deleted
Label #@SYS4197
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #Dimension
PROPERTIES
Name #Dimension
Label #@SYS14926
ENDPROPERTIES
GROUPFIELDS
#Dimension
ENDGROUPFIELDS
ENDGROUP
GROUP #EPC
PROPERTIES
Name #EPC
Label #@SYS90170
ENDPROPERTIES
GROUPFIELDS
#EPCManager
ENDGROUPFIELDS
ENDGROUP
GROUP #EPItem
PROPERTIES
Name #EPItem
Label #@SYS7407
ENDPROPERTIES
GROUPFIELDS
#ItemType
#ItemGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #FiscalLIFO
PROPERTIES
Name #FiscalLIFO
Label #@SYS93008
ENDPROPERTIES
GROUPFIELDS
#FiscalLIFOGroup
#FiscalLIFOAvoidCalc
#FiscalLIFONormalValueCalc
#FiscalLIFONormalValue
ENDGROUPFIELDS
ENDGROUP
GROUP #Forecast
PROPERTIES
Name #Forecast
Label #@SYS13699
ENDPROPERTIES
GROUPFIELDS
#ForecastDMPInclude
ENDGROUPFIELDS
ENDGROUP
GROUP #ForeignTrade
PROPERTIES
Name #ForeignTrade
Label #@SYS27650
ENDPROPERTIES
GROUPFIELDS
#Intracode
#IntraUnit
#StatisticsFactor
#OrigCountryRegionId
#OrigStateId
ENDGROUPFIELDS
ENDGROUP
GROUP #Groups
PROPERTIES
Name #Groups
Label #@SYS1177
ENDPROPERTIES
GROUPFIELDS
#ItemGroupId
#CostGroupId
#ModelGroupId
#DimGroupId
#ReqGroupId
#CommissionGroupId
#BatchNumGroupId
#SerialNumGroupId
#ItemBuyerGroupId
#PackagingGroupId
#PBAInventItemGroupId
#ItemPriceToleranceGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#ItemId
ENDGROUPFIELDS
ENDGROUP
GROUP #Item
PROPERTIES
Name #Item
Label #@SYS7407
ENDPROPERTIES
GROUPFIELDS
#ItemType
ENDGROUPFIELDS
ENDGROUP
GROUP #ItemAlternative
PROPERTIES
Name #ItemAlternative
Label #@SYS21956
ENDPROPERTIES
GROUPFIELDS
#UseAltItemId
#AltItemId
#AltConfigId
#AltInventSizeId
#AltInventColorId
ENDGROUPFIELDS
ENDGROUP
GROUP #ItemCompany
PROPERTIES
Name #ItemCompany
Label #@SYS74869
ENDPROPERTIES
GROUPFIELDS
#ItemIdCompany
ENDGROUPFIELDS
ENDGROUP
GROUP #ItemCoverage
PROPERTIES
Name #ItemCoverage
Label #@SYS21672
ENDPROPERTIES
GROUPFIELDS
#StopExplode
#PrimaryVendorId
ENDGROUPFIELDS
ENDGROUP
GROUP #ItemData
PROPERTIES
Name #ItemData
Label #@SYS23860
ENDPROPERTIES
GROUPFIELDS
#UnitVolume
#TaxPackagingQty
#NetWeight
#TaraWeight
ENDGROUPFIELDS
ENDGROUP
GROUP #ItemDimensionsDefault
PROPERTIES
Name #ItemDimensionsDefault
Label #@SYS73762
ENDPROPERTIES
GROUPFIELDS
#StandardInventSizeId
#StandardInventColorId
ENDGROUPFIELDS
ENDGROUP
GROUP #ItemDimensionsSetup
PROPERTIES
Name #ItemDimensionsSetup
Label #@SYS73922
ENDPROPERTIES
GROUPFIELDS
#ItemDimCombinationAutoCreate
#ItemDimCostPrice
ENDGROUPFIELDS
ENDGROUP
GROUP #Measurement
PROPERTIES
Name #Measurement
Label #@SYS2021
ENDPROPERTIES
GROUPFIELDS
#Height
#Width
#Depth
#Density
ENDGROUPFIELDS
ENDGROUP
GROUP #Name
PROPERTIES
Name #Name
Label #@SYS7399
ENDPROPERTIES
GROUPFIELDS
#ItemName
#NameAlias
#ItemType
#txtDefault
ENDGROUPFIELDS
ENDGROUP
GROUP #PBAItemAutoGenerated
PROPERTIES
Name #PBAItemAutoGenerated
Label #@SYS99919
ENDPROPERTIES
GROUPFIELDS
#PBAItemAutoGenerated
ENDGROUPFIELDS
ENDGROUP
GROUP #PhysicalDimensions
PROPERTIES
Name #PhysicalDimensions
Label #@SYS50219
ENDPROPERTIES
GROUPFIELDS
#grossDepth
#grossWidth
#grossHeight
ENDGROUPFIELDS
ENDGROUP
GROUP #PriceUpdate
PROPERTIES
Name #PriceUpdate
Label #@SYS25118
ENDPROPERTIES
GROUPFIELDS
#PurchModel
#CostModel
#SalesModel
#SalesPriceModelBasic
#SalesContributionRatio
#SalesPercentMarkup
ENDGROUPFIELDS
ENDGROUP
GROUP #ProductBuilder
PROPERTIES
Name #ProductBuilder
Label #@SYS40122
ENDPROPERTIES
GROUPFIELDS
#PBAItemConfigurable
#PBAHideDialog
#PBAHideApproval
#PBAAutoStart
#PBAMandatoryConfig
ENDGROUPFIELDS
ENDGROUP
GROUP #ProductConfigurator
PROPERTIES
Name #ProductConfigurator
Label #@SYS26331
ENDPROPERTIES
GROUPFIELDS
#StandardConfigId
#Configurable
#ConfigSimilar
ENDGROUPFIELDS
ENDGROUP
GROUP #Production
PROPERTIES
Name #Production
Label #@SYS4398
ENDPROPERTIES
GROUPFIELDS
#ProdPoolId
#ProdGroupId
#PropertyId
#BOMManualReceipt
#ProdFlushingPrincip
ENDGROUPFIELDS
ENDGROUP
GROUP #Project
PROPERTIES
Name #Project
Label #@SYS4534
ENDPROPERTIES
GROUPFIELDS
#projCategoryId
ENDGROUPFIELDS
ENDGROUP
GROUP #RFIDTagging
PROPERTIES
Name #RFIDTagging
Label #@SYS90171
ENDPROPERTIES
GROUPFIELDS
#ItemTaggingLevel
#PalletTagging
ENDGROUPFIELDS
ENDGROUP
GROUP #WarehouseManagement
PROPERTIES
Name #WarehouseManagement
Label #@SYS50169
ENDPROPERTIES
GROUPFIELDS
#WMSPalletTypeId
#standardPalletQuantity
#MinimumPalletQuantity
#qtyPerLayer
#sortCode
#WMSPickingQtyTime
#WMSArrivalHandlingTime
ENDGROUPFIELDS
ENDGROUP
GROUP #WebCategoryBrowsing
PROPERTIES
Name #WebCategoryBrowsing
Label #@SYS74258
ENDPROPERTIES
GROUPFIELDS
#ItemGroupId
#ItemType
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#ItemIdx
Id 1
PROPERTIES
Name #ItemIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#ItemId
ENDINDEXFIELDS
#GroupItemIdx
Id 2
PROPERTIES
Name #GroupItemIdx
ENDPROPERTIES
INDEXFIELDS
#ItemGroupId
#ItemId
ENDINDEXFIELDS
#NameAliasIdx
Id 3
PROPERTIES
Name #NameAliasIdx
ENDPROPERTIES
INDEXFIELDS
#NameAlias
ENDINDEXFIELDS
#TypeIdx
Id 4
PROPERTIES
Name #TypeIdx
ENDPROPERTIES
INDEXFIELDS
#ItemType
#ItemId
ENDINDEXFIELDS
#DimGroupItemIdx
Id 7
PROPERTIES
Name #DimGroupItemIdx
ENDPROPERTIES
INDEXFIELDS
#DimGroupId
#ItemId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #AddressState
PROPERTIES
Name #AddressState
Table #AddressState
EntityRelationshipRole #@SYS123582
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigCountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigStateId
RelatedField #StateId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #AltItemConfig
PROPERTIES
Name #AltItemConfig
Table #ConfigTable
EntityRelationshipRole #@SYS123845
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #AltConfigId
RelatedField #ConfigId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AltItemId
RelatedField #ItemId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #ItemColor
PROPERTIES
Name #ItemColor
Table #InventColor
EntityRelationshipRole #@SYS123846
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #StandardInventColorId
RelatedField #InventColorId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemId
RelatedField #ItemId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #ItemConfig
PROPERTIES
Name #ItemConfig
Table #ConfigTable
EntityRelationshipRole #@SYS123810
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #StandardConfigId
RelatedField #ConfigId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemId
RelatedField #ItemId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #ItemSize
PROPERTIES
Name #ItemSize
Table #InventSize
EntityRelationshipRole #@SYS123847
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #StandardInventSizeId
RelatedField #InventSizeId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemId
RelatedField #ItemId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
#InventItemGTIN
PROPERTIES
Table #InventItemGTIN
DeleteAction #Cascade
ENDPROPERTIES
#InventItemBarcode
PROPERTIES
Table #InventItemBarcode
DeleteAction #Cascade
ENDPROPERTIES
#InventTestItemQualityGroup
PROPERTIES
Table #InventTestItemQualityGroup
DeleteAction #Cascade
ENDPROPERTIES
#InventTestAssociationTable
PROPERTIES
Table #InventTestAssociationTable
DeleteAction #Restricted
ENDPROPERTIES
#InventItemSalesSetup
PROPERTIES
Table #InventItemSalesSetup
DeleteAction #Cascade
ENDPROPERTIES
#InventItemInventSetup
PROPERTIES
Table #InventItemInventSetup
DeleteAction #Cascade
ENDPROPERTIES
#InventItemPurchSetup
PROPERTIES
Table #InventItemPurchSetup
DeleteAction #Cascade
ENDPROPERTIES
#InventColor
PROPERTIES
Table #InventColor
DeleteAction #Cascade
ENDPROPERTIES
#InventSize
PROPERTIES
Table #InventSize
DeleteAction #Cascade
ENDPROPERTIES
#InventItemPrice
PROPERTIES
Table #InventItemPrice
DeleteAction #Cascade
ENDPROPERTIES
#InventItemPriceSim
PROPERTIES
Table #InventItemPriceSim
DeleteAction #Cascade
ENDPROPERTIES
#InventProdcomSetup
PROPERTIES
Table #InventProdcomSetup
DeleteAction #Cascade
ENDPROPERTIES
#RouteOpr
PROPERTIES
Table #RouteOpr
DeleteAction #Cascade
ENDPROPERTIES
#ReqItemTable
PROPERTIES
Table #ReqItemTable
DeleteAction #Cascade
ENDPROPERTIES
#CustVendExternalItem
PROPERTIES
Table #CustVendExternalItem
DeleteAction #Cascade
ENDPROPERTIES
#InventPosting
PROPERTIES
Table #InventPosting
DeleteAction #Cascade
ENDPROPERTIES
#DocuRef
PROPERTIES
Table #DocuRef
DeleteAction #Cascade
ENDPROPERTIES
#InventItemLocation
PROPERTIES
Table #InventItemLocation
DeleteAction #Cascade
ENDPROPERTIES
#ReqTrans
PROPERTIES
Table #ReqTrans
DeleteAction #Cascade
ENDPROPERTIES
#BOM
PROPERTIES
Table #BOM
DeleteAction #Restricted
ENDPROPERTIES
#InventJournalTrans
PROPERTIES
Table #InventJournalTrans
DeleteAction #Restricted
ENDPROPERTIES
#ProdTable
PROPERTIES
Table #ProdTable
DeleteAction #Restricted
ENDPROPERTIES
#PurchLine
PROPERTIES
Table #PurchLine
DeleteAction #Restricted
ENDPROPERTIES
#SalesLine
PROPERTIES
Table #SalesLine
DeleteAction #Restricted
ENDPROPERTIES
#ProdBOM
PROPERTIES
Table #ProdBOM
DeleteAction #Restricted
ENDPROPERTIES
#InventTxt
PROPERTIES
Table #InventTxt
DeleteAction #Cascade
ENDPROPERTIES
#PriceDiscTable
PROPERTIES
Table #PriceDiscTable
DeleteAction #Cascade
ENDPROPERTIES
#SuppItemTable
PROPERTIES
Table #SuppItemTable
DeleteAction #Cascade
ENDPROPERTIES
#InventTrans
PROPERTIES
Table #InventTrans
DeleteAction #Restricted
ENDPROPERTIES
#InventTableModule
PROPERTIES
Table #InventTableModule
DeleteAction #Cascade
ENDPROPERTIES
#CommissionCalc
PROPERTIES
Table #CommissionCalc
DeleteAction #Cascade
ENDPROPERTIES
#ConfigTable
PROPERTIES
Table #ConfigTable
DeleteAction #Cascade
ENDPROPERTIES
#InventSum
PROPERTIES
Table #InventSum
DeleteAction #Cascade
ENDPROPERTIES
#ForecastPurch
PROPERTIES
Table #ForecastPurch
DeleteAction #Cascade
ENDPROPERTIES
#ForecastSales
PROPERTIES
Table #ForecastSales
DeleteAction #Cascade
ENDPROPERTIES
#UnitConvert
PROPERTIES
Table #UnitConvert
DeleteAction #Cascade
ENDPROPERTIES
#RouteVersion
PROPERTIES
Table #RouteVersion
DeleteAction #Cascade
ENDPROPERTIES
#BOMVersion
PROPERTIES
Table #BOMVersion
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #AxInventTable
#public AxInventTable axInventTable()
#{
# AxInventTable axInventTable = AxInventTable::newInventTable(this);
# return axInventTable;
#}
#
ENDSOURCE
SOURCE #BOMCalcGroup
#BOMCalcGroup bomCalcGroup()
#{
# BOMCalcGroup bomCalcGroup;
# ;
#
# if(this.bomCalcGroupId)
# {
# bomCalcGroup = BOMCalcGroup::find(this.bomCalcGroupId);
#
# if(!bomCalcGroup)
# {
# warning(strfmt("@SYS94157", this.bomCalcGroupId, this.ItemId), '', InventTable::infoActionBOMCalcGroup(this.ItemId, this));
# }
# }
#
# // fallback to inventory parameters if not found on items
# if(!bomCalcGroup)
# {
# bomCalcGroup = BOMParameters::bomCalcGroup();
# }
#
# return bomCalcGroup;
#}
ENDSOURCE
SOURCE #BOMId
#BOMId bomId(
# TransDate _searchDate,
# FromQty _searchQty,
# InventDim _searchInventDim)
#{
# return BOMVersion::findActive(this.ItemId,_searchDate, _searchQty, _searchInventDim).bomId;
#}
#
ENDSOURCE
SOURCE #BOMIdConstruction
#BOMId bomIdConstruction(BOMRouteVersionSelect _bomRouteVersionSelect,
# TransDate _searchDate,
# FromQty _searchQty,
# InventDim _searchInventDim
# )
#{
#
# BOMVersion bomVersion;
#
# if (!this.RecId || !this.inventItemType().canHaveBOM())
# return '';
#
# if (_bomRouteVersionSelect == BOMRouteVersionSelect::Active || ! isConfigurationkeyEnabled(configurationkeynum(BOMVersion)))
# return this.bomId(_searchDate, _searchQty, _searchInventDim);
# else
# {
# select firstonly bomVersion
# where bomVersion.ItemId == this.ItemId &&
# bomVersion.Construction == NoYes::Yes;
#
# if (_bomRouteVersionSelect == BOMRouteVersionSelect::Selected)
# return bomVersion.bomId;
# else
# return bomVersion.RecId ? bomVersion.bomId : this.bomId(_searchDate, _searchQty, _searchInventDim);
# }
#}
#
ENDSOURCE
SOURCE #BOMUnitId
#BOMUnitId bomUnitId()
#{
# if (this.bomUnitId)
# return this.bomUnitId;
#
# return this.inventUnitId();
#}
ENDSOURCE
SOURCE #checkAltItemDimCombination
#boolean checkAltItemDimCombination()
#{
# InventDim inventDim;
# ;
#
# setprefix("@SYS21956");
#
# inventDim.ConfigId = this.AltConfigId;
# inventDim.InventSizeId = this.AltInventSizeId;
# inventDim.InventColorId = this.AltInventColorId;
#
# return inventDim.validateWriteItemDim(this.AltItemId,true);
#
#}
ENDSOURCE
SOURCE #checkColorId
#boolean checkColorId(InventColorId colorId)
#{
# if (!this.colorActive())
# return true;
#
# return InventColor::checkExist(this.ItemId,colorId);
#}
ENDSOURCE
SOURCE #CheckConfigId
#boolean checkConfigId(ConfigId configId)
#{
# ;
# if (! this.configActive())
# return true;
#
# if (! ConfigTable::exist(this.ItemId,configId))
# return checkFailed(strfmt("@SYS21853",configId,this.ItemId));
#
# return true;
#
#}
#
#
ENDSOURCE
SOURCE #checkConfigurable
#///
#/// Checks if the value of the field Configurable contradicts other settings.
#///
#///
#/// true if no contradiction; otherwise, false.
#///
#public boolean checkConfigurable()
#{
# BOMVersion bomVersion;
# InventDim inventDim;
# boolean ret = true;
# ;
#
# if (this.Configurable)
# {
# select firstonly RecId from bomVersion
# where bomVersion.ItemId == this.ItemId
# exists join inventDim
# where inventDim.InventDimId == bomVersion.InventDimId
# && inventDim.ConfigId;
#
# if (bomVersion.RecId)
# {
# ret = checkFailed("@SYS121358");
# }
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #checkFiscalLIFOValuePrevYear
#boolean checkFiscalLIFOValuePrevYear()
#{
# InventFiscalLIFOJournalTable inventFiscalLIFOJournalTable;
# InventFiscalLIFOJournalTrans inventFiscalLIFOJournalTrans;
# ;
# if (!this.ItemId)
# return false;
#
# select sum(QtyReceipt), sum(QtyIssue) from inventFiscalLIFOJournalTrans
# group by ItemId
# where inventFiscalLIFOJournalTrans.ItemId == this.ItemId
# && inventFiscalLIFOJournalTrans.ItemGroup == ItemGroup::Item
# exists join inventFiscalLIFOJournalTable
# where inventFiscalLIFOJournalTable.JournalId == inventFiscalLIFOJournalTrans.JournalId
# && inventFiscalLIFOJournalTable.JournalType == InventFiscalLIFOJournalType::FinalReport
# && inventFiscalLIFOJournalTable.FinalReportClosed == NoYes::Yes;
#
# return (inventFiscalLIFOJournalTrans.QtyReceipt - inventFiscalLIFOJournalTrans.QtyIssue) != 0;
#}
ENDSOURCE
SOURCE #checkItemDimCombination
#boolean checkItemDimCombination()
#{
# return this.checkStandardItemDimCombination() && this.checkAltItemDimCombination();
#}
ENDSOURCE
SOURCE #checkProjCategoryId
#public boolean checkProjCategoryId()
#{
# boolean ret = true;
# ProjCategory projCategory;
# ;
#
# if (this.ProjCategoryId)
# {
# projCategory = ProjCategory::find(this.ProjCategoryId);
#
# if (projCategory.CategoryType != ProjCategoryType::Item)
# ret = checkFailed(strfmt("@SYS54897",this.ProjCategoryId));
#
# ret = ret && projCategory.validateIfInactiveAllowed();
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #CheckRefInventTrans
#boolean checkRefInventTrans(InventTrans inventTrans)
#{
# if (this.ItemId != inventTrans.ItemId)
# return checkFailed(strfmt("@SYS7549"));
#
# return true;
#}
#
#
#
ENDSOURCE
SOURCE #checkSizeId
#boolean checkSizeId(InventSizeId sizeId)
#{
# if (!this.sizeActive())
# return true;
#
# return InventSize::checkExist(this.ItemId,sizeId);
#}
ENDSOURCE
SOURCE #checkStandardItemDimCombination
#boolean checkStandardItemDimCombination()
#{
# InventDim inventDim;
# ;
#
# setprefix("@SYS73762");
#
# inventDim.ConfigId = this.StandardConfigId;
# inventDim.InventSizeId = this.StandardInventSizeId;
# inventDim.InventColorId = this.StandardInventColorId;
#
# return inventDim.validateWriteItemDimCombination(this.ItemId,false);
#}
ENDSOURCE
SOURCE #CheckValid
#boolean checkValid(ItemId itemId)
#{
# boolean ok = true;
#
# if (! itemId)
# ok = checkFailed("@SYS16661");
#
# if (! this && itemId)
# ok = checkFailed(strfmt(InventTable::txtNotExist(), itemId) );
#
# return ok;
#}
ENDSOURCE
SOURCE #colorActive
#//BP Deviation documented
#display boolean colorActive()
#{
# InventDimSearch dimSearch = new InventDimSearch();
# ;
# if (dimSearch.find(this.DimGroupId,fieldnum(InventDim,InventColorId)))
# return dimSearch.dimActive();
# return false;
#}
ENDSOURCE
SOURCE #configActive
#//BP Deviation documented
#display boolean configActive()
#{
# InventDimSearch dimSearch = new InventDimSearch();
# ;
# if (dimSearch.find(this.DimGroupId,fieldnum(InventDim,ConfigId)))
# return dimSearch.dimActive();
# return false;
#}
ENDSOURCE
SOURCE #CostGroup
#///
#/// Return cost group.
#///
#///
#/// A cost group.
#///
#///
#/// If the cost group on the item is blank the default cost group is returned.
#///
#public CostGroupId costGroup()
#{
# ;
# if (this.CostGroupId)
# {
# return this.CostGroupId;
# }
# else
# {
# return BOMCostGroup::defaultCostGroupId(CostGroupType::DirectMaterials);
# }
#}
ENDSOURCE
SOURCE #CostPcsPrice
#//BP Deviation documented
#display CostPrice costPcsPrice(
# InventDimId _inventDimId = '', // can be = '' if setting the _inventDim buffer
# InventDim _inventDim = null, // set this parameter for better performance if avail
# InventTableModule _inventTableModuleInvent = null, // set this parameter for better performance if avail
# PriceDate _priceDate = systemdateget(),
# boolean _throwError = false
# )
#{
# return this.inventCostPriceMap(_inventDimId,_inventDim,_inventTableModuleInvent, _priceDate, '', _throwError).pcsPrice();
#}
#
ENDSOURCE
SOURCE #defaultLoadHeight
#WMSHeight defaultLoadHeight(InventQty qty)
#{
# Integer layers;
# ;
#
# if (this.QtyPerLayer <= 0)
# this.QtyPerLayer = 1;
#
# layers = real2int(trunc(qty / this.QtyPerLayer));
# if (layers * this.QtyPerLayer < qty)
# layers++;
#
# return layers * this.GrossHeight;
#}
ENDSOURCE
SOURCE #delete
#public void delete()
#{
# BOMTable bomTable;
# BOMVersion bomVersion;
# BOMVersion bomVersion2;
# ;
#
# ttsbegin;
#
# if( !isConfigurationkeyEnabled(configurationkeynum(BOMVersion)) && this.inventItemType().canHaveBOM())
# {
# while select bomVersion
# group by bomId
# where bomVersion.ItemId == this.ItemId
# notexists join bomVersion2
# where bomVersion2.bomId == bomVersion.bomId &&
# bomVersion2.ItemId != this.ItemId
# {
# delete_from bomTable
# where bomTable.bomId == bomVersion.bomId;
# }
# }
#
# super();
#
# ttscommit;
#}
ENDSOURCE
SOURCE #description
#//BP Deviation documented
#display ItemFreeTxt description()
#{;
# return this.txt() ? this.txt() : this.ItemName;
#}
ENDSOURCE
SOURCE #descriptionDimension
#//BP Deviation documented
#display ItemFreeTxt descriptionDimension()
#{
# return this.ItemId + '\n' + (this.txt() ? this.txt() : this.ItemName);
#}
ENDSOURCE
SOURCE #externalItemId
#ExternalItemId externalItemId(ModuleInventCustVend _moduleInventCustVend,
# CustVendAC _custVendAccount)
#{
# CustVendExternalItem custVendExternalItem;
# ModuleInventPurchSalesVendCustGroup moduleInventPurchSalesVendCustGroup;
# CustVendItemGroupId custVendItemGroupId;
# ;
# if (_custVendAccount)
# {
# if (_moduleInventCustVend == ModuleInventCustVend::Cust)
# {
# moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::Cust;
# }
# else
# {
# moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::Vend;
# }
#
# custVendExternalItem = CustVendExternalItem::find(moduleInventPurchSalesVendCustGroup, this.ItemId, InventDim::inventDimIdBlank(), _custVendAccount);
#
# if (!custVendExternalItem)
# {
# if (_moduleInventCustVend == ModuleInventCustVend::Cust)
# {
# moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::CustGroup;
# custVendItemGroupId = CustTable::find(_custVendAccount).CustItemGroupId;
# }
# else
# {
# moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::VendGroup;
# custVendItemGroupId = VendTable::find(_custVendAccount).VendItemGroupId;
# }
#
# custVendExternalItem = CustVendExternalItem::find(moduleInventPurchSalesVendCustGroup, this.ItemId, InventDim::inventDimIdBlank(), custVendItemGroupId);
# }
# }
#
# return custVendExternalItem.ExternalItemId;
#}
ENDSOURCE
SOURCE #getSalesPriceAgreement
#container getSalesPriceAgreement(InventDim inventDim,
# Qty qty,
# UnitID unit,
# CustAccount accountNum,
# CurrencyCode currencyCode)
#{;
#
# return this.salesPriceAgreement(systemdateget(), inventDim, qty, unit, accountNum, currencyCode);
#}
ENDSOURCE
SOURCE #grossVolume
#Volume grossVolume()
#{
# return this.GrossDepth * this.GrossHeight * this.GrossWidth;
#}
ENDSOURCE
SOURCE #grossWeight
#//BP Deviation documented
#display ItemGrossWeight grossWeight()
#{
# return this.NetWeight + this.TaraWeight;
#}
#
ENDSOURCE
SOURCE #hasBOMversions
#boolean hasBomVersions()
#{
# return (select bomVersion
# where bomVersion.ItemId == this.ItemId).RecId != 0;
#}
ENDSOURCE
SOURCE #HasConfigs
#boolean hasConfigs()
#{
# return (select configTable
# where configTable.ItemId == this.ItemId).RecId != 0;
#}
ENDSOURCE
SOURCE #HasForecastPurch
#//BP Deviation documented
#display ForecastHasPurch hasForecastPurch()
#{
# return (select forecastPurch
# index hint ItemIdx
# where forecastPurch.ItemId == this.ItemId).RecId != 0;
#}
ENDSOURCE
SOURCE #HasForecastSales
#//BP Deviation documented
#display ForecastHasSales hasForecastSales()
#{
# return (select forecastSales
# index hint ItemIdx
# where forecastSales.ItemId == this.ItemId).RecId != 0;
#}
ENDSOURCE
SOURCE #hasInventTrans
#///
#/// Specifies whether any inventory transactions exist for this item.
#///
#///
#/// true if InventTrans table records exist for this item; otherwise, false.
#///
#public boolean hasInventTrans()
#{
# return (select firstonly RecId from inventTrans where inventTrans.ItemId == this.ItemId).RecId != 0;
#}
ENDSOURCE
SOURCE #hasItemDimensions
#client server boolean hasItemDimensions()
#{
# InventDimParm inventDimParm;
# InventDimParm inventDimParmBlank;
# ;
#
# inventDimParm.initItemDimension(this.DimGroupId);
#
# return !InventDimParm::isInventDimParmEqual(inventDimParm,inventDimParmBlank);
#}
ENDSOURCE
SOURCE #hasRouteVersions
#boolean hasRouteVersions()
#{
# return (select routeVersion
# where routeVersion.ItemId == this.ItemId).RecId != 0;
#}
ENDSOURCE
SOURCE #initStandardItemDim
#InventDim initStandardItemDim(InventDim inventDim)
#{
# ;
# inventDim.ConfigId = this.StandardConfigId;
# inventDim.InventSizeId = this.StandardInventSizeId;
# inventDim.InventColorId = this.StandardInventColorId;
#
# return inventDim;
#}
ENDSOURCE
SOURCE #initValue
#void initValue()
#{
# this.bomUnitId = InventParameters::find().DefaultUnitId;
# this.QtyPerLayer = 1;
#
# super();
#
# this.NameAlias = '';
#}
ENDSOURCE
SOURCE #insert
#void insert()
#{
# #OCCRetryCount
# ;
# try
# {
# ttsbegin;
#
# this.insertInventItemOrderSetup();
#
# this.insertBOMTable();
# this.setNameAlias();
#
# super();
#
# if (this.SalesModel != SalesPriceModel::None)
# {
# InventTable::updateAutoSalesPrice(this.ItemId);
# }
#
# ttscommit;
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
#}
#
ENDSOURCE
SOURCE #InsertBOMTable
#server void insertBOMTable()
#{
# BOMTable bomTable;
# BOMVersion bomVersion;
#
# if (! this.inventItemType().canHaveBOM())
# return;
#
# if (isConfigurationkeyEnabled(configurationkeynum(BOMVersion)))
# return;
#
# bomTable.initFromInventTable(this);
#
# // Do not create if already exist
# if (BOMTable::find(bomTable.bomId))
# return;
#
# bomTable.initFromInventTable(this);
# bomTable.insert();
# bomVersion.initFromInventTable(this);
# bomVersion.initFromBOMTable(bomTable);
# bomVersion.Active = true;
# bomVersion.insert();
#
#}
ENDSOURCE
SOURCE #insertInventItemOrderSetup
#server void insertInventItemOrderSetup()
#{
# ;
# if(!InventItemPurchSetup::findDefault(this.ItemId))
# {
# InventItemPurchSetup::insertDefault(this.ItemId);
# }
#
# if(!InventItemInventSetup::findDefault(this.ItemId))
# {
# InventItemInventSetup::insertDefault(this.ItemId);
# }
#
# if(!InventItemSalesSetup::findDefault(this.ItemId))
# {
# InventItemSalesSetup::insertDefault(this.ItemId);
# }
#}
ENDSOURCE
SOURCE #InterCompanyBlockedPurch
#boolean interCompanyBlockedPurch()
#{
# return this.inventTableModulePurch().InterCompanyBlocked;
#}
ENDSOURCE
SOURCE #InterCompanyBlockedSales
#boolean interCompanyBlockedSales()
#{
# return this.inventTableModuleSales().InterCompanyBlocked;
#}
ENDSOURCE
SOURCE #inventCostPriceMap
#InventPriceMap inventCostPriceMap(
# InventDimId _inventDimId = '', // can be = '' if setting the _inventDim buffer
# InventDim _inventDim = null, // set this parameter for better performance if avail
# InventTableModule _inventTableModuleInvent = null, // set this parameter for better performance if avail
# TransDate _transDate = systemdateget(),
# InventSiteId _newSiteId = '',
# boolean _throwError = false
# )
#{
# InventPriceMap inventPriceMap;
# InventDimId inventDimId;
#
# void initInventDimId()
# {
# ;
#
# if( !_inventDimId && _inventDim)
# {
# inventDimId = _inventDim.InventDimId;
# }
# else
# {
# inventDimId =_inventDimId;
# }
#
# if ((! inventDimId) && (this.siteActive() || this.ItemDimCostPrice))
# {
# inventDimId = InventDim::findDim(_inventDim).InventDimId;
# }
# }
# ;
#
# if (this.inventModelGroup().inventModelType().stdCostBased())
# {
# inventPriceMap = InventItemPrice::stdCostFindDate(this, _transDate, _inventDimId, _inventDim, _newSiteId, _throwError);
# }
# else
# {
# initInventDimId();
# inventPriceMap = InventItemPrice::findCurrent(this.ItemId, CostingVersionPriceType::Cost, inventDimId, _transDate, _newSiteId);
#
# if (! inventPriceMap.RecId)
# {
# inventPriceMap =_inventTableModuleInvent.RecId ? _inventTableModuleInvent : InventTableModule::find(this.ItemId,ModuleInventPurchSales::Invent);
# }
# }
# return inventPriceMap;
#}
#
ENDSOURCE
SOURCE #inventDimItemDimensions
#server InventDim inventDimItemDimensions(InventDim inventDim)
#{
# InventDimParm inventDimParmItem = this.inventDimParmItemDimensions();
# ;
# inventDim.clearNotSelectedDim(inventDimParmItem);
# return InventDim::findOrCreate(inventDim);
#}
#
ENDSOURCE
SOURCE #inventDimLinkedDimension
#///
#/// Retrieves the dimension from the InventSiteDimensionLink class.
#///
#///
#/// The inventory dimension for which the dimension should be found.
#///
#///
#/// The dimension combination for this item and the given inventory dimension.
#///
#
#public Dimension inventDimLinkedDimension(InventDim _inventDim)
#{
# Dimension dimension = this.Dimension;
# InventSiteDimensionLink inventSiteDimensionLink;
# ;
# inventSiteDimensionLink = InventSiteDimensionLink::newDimensionTables(this, _inventDim);
# dimension = inventSiteDimensionLink.changeDimension(dimension);
# return dimension;
#}
ENDSOURCE
SOURCE #inventDimParmCovDimensions
#server InventDimParm inventDimParmCovDimensions()
#{
# InventDimParm inventDimParmItem;
# ;
# inventDimParmItem.initCovPrDimension(this.DimGroupId);
# return inventDimParmItem;
#}
ENDSOURCE
SOURCE #inventDimParmItemDimensions
#server InventDimParm inventDimParmItemDimensions()
#{
# InventDimParm inventDimParmItem;
# ;
# inventDimParmItem.initItemDimension(this.DimGroupId);
# return inventDimParmItem;
#}
ENDSOURCE
SOURCE #inventInventSiteId
#//BP Deviation documented
#display InventInventSiteId inventInventSiteId(InventSiteId _inventSiteId = '')
#{
# return this.inventItemInventSetup().inventSiteId(_inventSiteId, this);
#}
#
ENDSOURCE
SOURCE #inventItemInventSetup
#InventItemInventSetup inventItemInventSetup(InventDimId _inventDimId = InventDim::inventDimIdBlank(),
# boolean _forUpdate = false)
#{
# return InventItemInventSetup::find(this.ItemId,
# _inventDimId,
# _forUpdate,
# this);
#}
#
ENDSOURCE
SOURCE #inventItemOrderSetupMap
#InventItemOrderSetupMap inventItemOrderSetupMap(InventItemOrderSetupType _setupType,
# InventDimId _inventDimId = InventDim::inventDimIdBlank(),
# boolean _forUpdate = false)
#{
# return InventItemOrderSetupMap::find(this.ItemId,
# _setupType,
# _inventDimId,
# _forUpdate,
# this);
#}
#
ENDSOURCE
SOURCE #inventItemPurchSetup
#InventItemPurchSetup inventItemPurchSetup(InventDimId _inventDimId = InventDim::inventDimIdBlank(),
# boolean _forUpdate = false)
#{
# return InventItemPurchSetup::find(this.ItemId,
# _inventDimId,
# _forUpdate,
# this);
#}
#
ENDSOURCE
SOURCE #inventItemSalesSetup
#InventItemSalesSetup inventItemSalesSetup(InventDimId _inventDimId = InventDim::inventDimIdBlank(),
# boolean _forUpdate = false)
#{
# return InventItemSalesSetup::find(this.ItemId,
# _inventDimId,
# _forUpdate,
# this);
#}
#
ENDSOURCE
SOURCE #InventItemType
#InventItemType inventItemType()
#{
# return InventItemType::newItemType(this.ItemType);
#}
#
ENDSOURCE
SOURCE #InventLocationId
#///
#/// Returns an inventory warehouse ID.
#///
#///
#/// The current inventory warehouse ID.
#/// This value will be returned back if it is not empty and the mandatory warehouse parameter is not set on the item's inventory order settings.
#///
#///
#/// The inventory dimension ID that are settings to be found for; optional.
#/// If not specified, the default settings are used.
#///
#///
#/// An inventory site ID that the _inventLocationId parameter should belong to; optional.
#/// This parameter applies only when _inventLocationId parameter is specified.
#/// If both _inventSiteIdParent and _inventLocationId parameters are passed and no site specific settings are found,
#/// then the check whether the passed _inventLocationId belongs to the site specified by _inventSiteIdParent will be performed,
#/// and if it does not, then an empty string will be returned back, but if it does, then the passed _inventLocationId parameter is returned.
#///
#///
#/// An inventory warehouse ID.
#///
#
#//BP Deviation documented
#display InventLocationId inventLocationId(InventLocationId _inventLocationId = '',
# InventDimId _inventDimId = InventDim::inventDimIdBlank(),
# InventSiteId _inventSiteIdParent = '')
#{
# return this.inventItemInventSetup(_inventDimId).inventLocationId(_inventLocationId,
# this,
# _inventSiteIdParent);
#}
ENDSOURCE
SOURCE #InventLocationIdBOM
#//BP Deviation documented
#display InventLocationId inventLocationIdBOM(InventLocationId _inventLocationId = '',
# InventDimId _inventDimId = InventDim::inventDimIdBlank(),
# InventSiteId _inventSiteIdParent = '')
#{
# return this.inventItemInventSetup(_inventDimId).inventLocationId(_inventLocationId,
# this,
# _inventSiteIdParent);
#}
ENDSOURCE
SOURCE #inventLowestQty
#///
#/// Returns a minimum allowed inventory order quantity.
#///
#///
#/// The inventory dimension ID that are settings to be found for; optional.
#/// If not specified, the default settings are used.
#///
#///
#/// A minimum allowed inventory order quantity.
#///
#
#//BP Deviation documented
#display QtyLowest inventLowestQty(InventDimId _inventDimId = InventDim::inventDimIdBlank())
#{
# return this.inventItemInventSetup(_inventDimId).lowestQty();
#}
#
ENDSOURCE
SOURCE #InventModelGroup
#InventModelGroup inventModelGroup()
#{
# return InventModelGroup::find(this.ModelGroupId);
#}
ENDSOURCE
SOURCE #InventStandardQty
#///
#/// Returns a standard inventory order quantity.
#///
#///
#/// The inventory dimension ID that are settings to be found for; optional.
#/// If not specified, the default settings are used.
#///
#///
#/// A standard inventory order quantity.
#///
#
#//BP Deviation documented
#display QtyStandard inventStandardQty(InventDimId _inventDimId = InventDim::inventDimIdBlank())
#{
# return this.inventItemInventSetup(_inventDimId).standardQty();
#}
#
ENDSOURCE
SOURCE #InventTableModuleInvent
#InventTableModule inventTableModuleInvent(boolean _forUpdate = false)
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Invent, _forUpdate);
#}
ENDSOURCE
SOURCE #InventTableModulePurch
#InventTableModule inventTableModulePurch(boolean _forUpdate = false)
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch, _forUpdate);
#}
ENDSOURCE
SOURCE #InventTableModuleSales
#InventTableModule inventTableModuleSales(boolean _forUpdate = false)
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Sales, _forUpdate);
#}
ENDSOURCE
SOURCE #InventUnitId
#//BP Deviation documented
#display UnitID inventUnitId()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Invent).UnitId;
#}
ENDSOURCE
SOURCE #isConfigurable
#boolean isConfigurable()
#{
# return this.Configurable && this.inventItemType().canHaveBOM();
#}
ENDSOURCE
SOURCE #itemDescription
#//BP Deviation documented
#display ItemFreeTxt itemDescription(Common _common = null)
#{
# ItemFreeTxt itemText = this.txtDefault(false,'');
# ;
#
# if (!itemText)
# {
# itemText = this.itemName(_common);
# }
#
# return itemText;
#}
ENDSOURCE
SOURCE #itemDescriptionCombination
#//BP Deviation documented
#display ItemFreeTxt itemDescriptionCombination(Common _common = null)
#{
# InventDim inventDim;
# InventDimCombination inventDimCombination;
# ItemFreeTxt itemText = this.txtDefault(false,'');
# ;
#
# if (_common.TableId == tablenum(InventDim))
# {
# inventDim = _common;
# inventDimCombination = InventDimCombination::find(this.ItemId,inventDim);
# }
#
# if (!itemText)
# {
# itemText = this.itemName();
# }
#
# if (inventDimCombination && inventDimCombination.itemDescription())
# {
# itemText += '\n\n' + inventDimCombination.itemDescription();
# }
#
# return itemText;
#}
ENDSOURCE
SOURCE #ItemName
#//BP Deviation documented
#display ItemNameDisplay itemName(Common _common = null)
#{
# InventDim inventDimEmpty;
# InventDimCombination inventDimCombination;
# InventDim inventDim;
#
# ItemNameDisplay itemName()
# {
# if (this.ItemName)
# return this.ItemName;
# return this.ItemId;
# }
#
# ;
#
# if (_common.TableId == tablenum(InventDim))
# {
# inventDim = _common;
# }
#
# if (InventDim::isInventDimEqual(inventDimEmpty,inventDim))
# return itemName();
#
# inventDimCombination = InventDimCombination::find(this.ItemId,inventDim);
#
# return (inventDimCombination && inventDimCombination.name()) ?
# itemName() + ' / ' + inventDimCombination.name() :
# itemName();
#}
#
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
# super(_fieldId);
#
# switch (fieldExt2Id(_fieldId))
# {
# case fieldnum(InventTable, ItemId):
# this.ItemName = this.ItemName ? this.ItemName : this.ItemId;
# this.setNameAlias();
# break;
#
# case fieldnum(InventTable, ItemName):
# this.NameAlias = '';
# this.setNameAlias();
# break;
#
# case fieldnum(InventTable, AltItemId):
# this.AltConfigId = '';
# this.AltInventColorId = '';
# this.AltInventSizeId = '';
# break;
#
# case fieldnum(InventTable, Phantom):
# if (this.Phantom)
# this.AutoReportFinished = NoYes::No;
# break;
#
# case fieldnum(InventTable, OrigCountryRegionId):
# this.OrigStateId = '';
# break;
#
# case fieldnum(InventTable, pbaAutoStart):
# if (this.pbaAutoStart)
# this.pbaMandatoryConfig = NoYes::No;
# break;
#
# case fieldnum(InventTable, pbaMandatoryConfig):
# if (this.pbaMandatoryConfig)
# this.pbaAutoStart = NoYes::No;
# break;
#
# case fieldnum(InventTable, ItemType):
# if (this.ItemType == ItemType::Service)
# {
# this.FiscalLIFOAvoidCalc = NoYes::Yes;
# this.PalletTagging = NoYes::No;
# this.ItemTaggingLevel = RFIDItemTaggingLevel::None;
# }
# break;
# }
#}
#
ENDSOURCE
SOURCE #primaryVendorId
#public VendAccount primaryVendorId(
# InventDimId _inventDimId = '', // can be = '' if setting the _inventDim buffer
# InventDim _inventDim = null) // set this parameter for better performance if avail
#{
# ReqSetupDim reqSetupDim;
# ;
#
# if (! _inventDimId && prmisdefault(_inventDim))
# return this.PrimaryVendorId;
#
# reqSetupDim = ReqSetupDim::newInventTable(this,_inventDimId,_inventDim);
#
# if (reqSetupDim)
# return reqSetupDim.primaryVendId();
#
# return this.PrimaryVendorId;
#}
#
ENDSOURCE
SOURCE #PurchInventLocationId
#///
#/// Returns a purchase warehouse ID.
#///
#///
#/// The current purchase warehouse ID.
#/// This value will be returned back if it is not empty and the mandatory warehouse parameter is not set on the item's purchase order settings.
#///
#///
#/// The inventory dimension ID that are settings to be found for; optional.
#/// If not specified, the default settings are used.
#///
#///
#/// A purchase site ID that the _inventLocationId parameter should belong to; optional.
#/// This parameter applies only when _inventLocationId parameter is specified.
#/// If both _inventSiteIdParent and _inventLocationId parameters are passed and no site specific settings are found,
#/// then the check whether the passed _inventLocationId belongs to the site specified by _inventSiteIdParent will be performed,
#/// and if it does not, then an empty string will be returned back, but if it does, then the passed _inventLocationId parameter is returned.
#///
#///
#/// A purchase warehouse ID.
#///
#
#//BP Deviation documented
#display InventLocationId purchInventLocationId(InventLocationId _inventLocationId = '',
# InventDimId _inventDimId = InventDim::inventDimIdBlank(),
# InventSiteId _inventSiteIdParent = '')
#{
# return this.inventItemPurchSetup(_inventDimId).inventLocationId(_inventLocationId,
# this,
# _inventSiteIdParent);
#}
ENDSOURCE
SOURCE #purchInventSiteId
#//BP Deviation documented
#display PurchInventSiteId purchInventSiteId(InventSiteId _inventSiteId = '')
# {
# return this.inventItemPurchSetup().inventSiteId(_inventSiteId, this);
#}
#
ENDSOURCE
SOURCE #PurchLineDisc
#//BP Deviation documented
#display LineDiscCode purchLineDisc()
#{
# return InventTableModule::find(this.ItemId, ModuleInventPurchSales::Purch).LineDisc;
#}
ENDSOURCE
SOURCE #PurchLowestQty
#///
#/// Returns a minimum allowed inventory order quantity.
#///
#///
#/// The inventory dimension ID that are settings to be found for; optional.
#/// If not specified, the default settings are used.
#///
#///
#/// A minimum allowed inventory order quantity.
#///
#
#//BP Deviation documented
#display QtyLowest purchLowestQty(InventDimId _inventDimId = InventDim::inventDimIdBlank())
#{
# return this.inventItemPurchSetup(_inventDimId).lowestQty();
#}
ENDSOURCE
SOURCE #PurchMarkupGroup
#//BP Deviation documented
#display MarkupGroupId purchMarkupGroup()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch).MarkupGroupId;
#}
ENDSOURCE
SOURCE #PurchMultiLineDisc
#//BP Deviation documented
#display PriceGroupId purchMultiLineDisc()
#{
# return InventTableModule::find(this.ItemId, ModuleInventPurchSales::Purch).MultiLineDisc;
#}
ENDSOURCE
SOURCE #PurchOverDeliveryPct
#//BP Deviation documented
#display PurchOverDeliveryPct purchOverDeliveryPct()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch).OverDeliveryPct;
#}
ENDSOURCE
SOURCE #PurchPcsPrice
#//BP Deviation documented
#display Price purchPcsPrice()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch).pcsPrice();
#}
ENDSOURCE
SOURCE #PurchPriceAgreement
#server container purchPriceAgreement(TransDate _priceDate,
# InventDim _inventDim,
# Qty _qty,
# UnitID _unit,
# VendAccount _accountNum = this.primaryVendorId(_inventDim.InventDimId,_inventDim),
# CurrencyCode _currencyCode = VendTable::find(_accountNum).Currency,
# boolean _includeLineDisc = true)
#{
# VendTable vendTable;
# InventTableModule inventTableModule;
#
# PriceDisc priceDisc;
#
# DiscAmount lineDiscAmount;
# DiscPct lineDiscPct;
#
# Price price;
# PriceMarkup priceMarkup;
# PriceUnit priceUnit;
# ;
#
# if (!_currencyCode)
# _currencyCode = CompanyInfo::standardCurrency();
#
# inventTableModule= InventTableModule::find(this.ItemId, ModuleInventPurchSales::Purch);
#
# if (_unit != inventTableModule.UnitId)
# {
# _qty = UnitConvert::qty(_qty,
# _unit,
# inventTableModule.UnitId,
# this.ItemId);
# }
#
# vendTable= VendTable::find(_accountNum);
#
# priceDisc = new PriceDisc(ModuleInventPurchSales::Purch,
# this.ItemId,
# _inventDim,
# inventTableModule.UnitId,
# _priceDate,
# _qty,
# vendTable.AccountNum,
# _currencyCode);
#
# if(!priceDisc.findPrice(vendTable.PriceGroup, false))
# {
# // Price agreement is not found
# return [0, 1, 0, dateNull(), dateNull()];
# }
#
# price = priceDisc.price();
# priceMarkup = priceDisc.markup();
# priceUnit = priceDisc.priceUnit();
#
# if(_includeLineDisc && priceDisc.findLineDisc(this.purchLineDisc(), vendTable.LineDisc))
# {
# lineDiscAmount = priceDisc.lineDiscAmount();
# lineDiscPct = priceDisc.lineDiscPct();
#
# price = ((price - lineDiscAmount) / (priceUnit ? priceUnit : 1)) * ((100 - lineDiscPct) / 100);
# price = price * (priceUnit ? priceUnit : 1);
# priceMarkup = priceMarkup * ((100 - lineDiscPct) / 100);
# }
#
# return [Currency::mstPrice(price, _currencyCode),
# priceUnit,
# Currency::mstPrice(priceMarkup, _currencyCode),
# priceDisc.priceTable().FromDate,
# priceDisc.priceTable().ToDate];
#}
ENDSOURCE
SOURCE #purchPriceUnit
#//BP Deviation documented
#display PriceUnit purchPriceUnit()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch).priceUnit();
#}
ENDSOURCE
SOURCE #PurchStandardQty
#///
#/// Returns a standard purchase order quantity.
#///
#///
#/// The inventory dimension ID that are settings to be found for; optional.
#/// If not specified, the default settings are used.
#///
#///
#/// A standard purchase order quantity.
#///
#
#//BP Deviation documented
#display QtyStandard purchStandardQty(InventDimId _inventDimId = InventDim::inventDimIdBlank())
#{
# return this.inventItemPurchSetup(_inventDimId).standardQty();
#}
ENDSOURCE
SOURCE #purchSuppItemGroupId
#//BP Deviation documented
#display InventSuppItemGroupId purchSuppItemGroupId()
#{
# return InventTableModule::find(this.ItemId, ModuleInventPurchSales::Purch).SuppItemGroupId;
#}
ENDSOURCE
SOURCE #PurchTaxItemGroupId
#//BP Deviation documented
#display TaxItemGroup purchTaxItemGroupId()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch).TaxItemGroupId;
#}
ENDSOURCE
SOURCE #PurchUnderDeliveryPct
#//BP Deviation documented
#display PurchUnderDeliveryPct purchUnderDeliveryPct()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch).UnderDeliveryPct;
#}
ENDSOURCE
SOURCE #PurchUnitId
#//BP Deviation documented
#display PurchUnit purchUnitId()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch).UnitId;
#}
ENDSOURCE
SOURCE #renamePrimaryKey
#public void renamePrimaryKey()
#{
# BOMTable bomTable;
# ItemId oldItemId = this.orig().ItemId;
# InventTable inventTable;
# ;
#
# ttsbegin;
#
# inventTable = this.orig().data(); // remember selected record
#
# super();
#
# if (! BOMVersion::dictConfigurationKey().enabled())
# {
# bomTable = BOMTable::find(oldItemId);
# if (bomTable)
# {
# bomTable.bomId = this.ItemId;
# bomTable.renamePrimaryKey();
# }
# }
#
# if (this.dataSource())
# {
# this.dataSource().research();
# if (inventTable) // restore selected record
# {
# this.dataSource().findRecord(inventTable);
# }
# }
# ttscommit;
#}
ENDSOURCE
SOURCE #RouteId
#RouteId routeId(
# TransDate _searchDate,
# FromQty _searchQty,
# InventDim _searchInventDim)
#{
# return RouteVersion::findActive(this.ItemId, _searchDate, _searchQty, _searchInventDim).RouteId;
#}
#
ENDSOURCE
SOURCE #RouteIdConstruction
#RouteId routeIdConstruction(
# BOMRouteVersionSelect _bomRouteVersionSelect,
# TransDate _searchDate,
# FromQty _searchQty,
# InventDim _searchInventDim)
#{
# RouteVersion routeVersion;
# ;
#
# if (!this.RecId || !this.inventItemType().canHaveRoutes())
# return '';
#
# if (_bomRouteVersionSelect == BOMRouteVersionSelect::Active)
# {
# return this.routeId(_searchDate, _searchQty, _searchInventDim);
# }
# else
# {
# select firstonly routeVersion
# where routeVersion.ItemId == this.ItemId &&
# routeVersion.Construction == NoYes::Yes;
#
# if (_bomRouteVersionSelect == BOMRouteVersionSelect::Selected)
# {
# return routeVersion.RouteId;
# }
# else
# {
# return routeVersion.RecId ? routeVersion.RouteId : this.routeId(_searchDate, _searchQty, _searchInventDim);
# }
# }
#}
#
ENDSOURCE
SOURCE #SalesInventLocationId
#///
#/// Returns a sales warehouse ID.
#///
#///
#/// The current sales warehouse ID.
#/// This value will be returned back if it is not empty and the mandatory warehouse parameter is not set on the item's sales order settings.
#///
#///
#/// The inventory dimension ID that are settings to be found for; optional.
#/// If not specified, the default settings are used.
#///
#///
#/// A sales site ID that the _inventLocationId parameter should belong to; optional.
#/// This parameter applies only when _inventLocationId parameter is specified.
#/// If both _inventSiteIdParent and _inventLocationId parameters are passed and no site specific settings are found,
#/// then the check whether the passed _inventLocationId belongs to the site specified by _inventSiteIdParent will be performed,
#/// and if it does not, then an empty string will be returned back, but if it does, then the passed _inventLocationId parameter is returned.
#///
#///
#/// A sales warehouse ID.
#///
#
#//BP Deviation documented
#display InventLocationId salesInventLocationId(InventLocationId _inventLocationId = '',
# InventDimId _inventDimId = InventDim::inventDimIdBlank(),
# InventSiteId _inventSiteIdParent = '')
#{
# return this.inventItemSalesSetup(_inventDimId).inventLocationId(_inventLocationId,
# this,
# _inventSiteIdParent);
#}
ENDSOURCE
SOURCE #salesInventSiteId
#//BP Deviation documented
#display SalesInventSiteId salesInventSiteId(InventSiteId _inventSiteId = '')
# {
# return this.inventItemSalesSetup().inventSiteId(_inventSiteId, this);
#}
#
ENDSOURCE
SOURCE #SalesLineDisc
#//BP Deviation documented
#display LineDiscCode salesLineDisc()
#{
# return InventTableModule::find(this.ItemId, ModuleInventPurchSales::Sales).LineDisc;
#}
ENDSOURCE
SOURCE #SalesMarkupGroup
#//BP Deviation documented
#display MarkupGroupId salesMarkupGroup()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Sales).MarkupGroupId;
#}
ENDSOURCE
SOURCE #SalesMultiLineDisc
#//BP Deviation documented
#display PriceGroupId salesMultiLineDisc()
#{
# return InventTableModule::find(this.ItemId, ModuleInventPurchSales::Sales).MultiLineDisc;
#}
ENDSOURCE
SOURCE #SalesOverDeliveryPct
#//BP Deviation documented
#display SalesOverDeliveryPct salesOverDeliveryPct()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Sales).OverDeliveryPct;
#}
ENDSOURCE
SOURCE #SalesPcsPrice
#//BP Deviation documented
#display Price salesPcsPrice()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Sales).pcsPrice();
#}
ENDSOURCE
SOURCE #SalesPriceAgreement
#server container salesPriceAgreement(TransDate searchDate,
# InventDim inventDim,
# Qty qty,
# UnitID unit,
# CustAccount accountNum,
# CurrencyCode currencyCode)
#{
# PriceDisc priceDisc;
#
# InventTableModule inventTableModule;
# CustTable custTable;
# ;
#
# inventTableModule = InventTableModule::find(this.ItemId, ModuleInventPurchSales::Sales);
#
# if (unit != inventTableModule.UnitId)
# {
# qty = UnitConvert::qty(qty,
# unit,
# inventTableModule.UnitId,
# this.ItemId);
# }
#
# custTable = CustTable::find(accountNum);
#
# priceDisc = new PriceDisc(ModuleInventPurchSales::Sales,
# this.ItemId,
# inventDim,
# inventTableModule.UnitId,
# searchDate,
# qty,
# custTable.AccountNum,
# currencyCode);
#
#
# if (! priceDisc.findPrice(custTable.PriceGroup))
# {
# priceDisc.findItemPrice();
# }
#
#
# return [priceDisc.price(),
# priceDisc.priceUnit(),
# priceDisc.markup()];
#}
#
#
ENDSOURCE
SOURCE #SalesPriceUnit
#//BP Deviation documented
#display PriceUnit salesPriceUnit()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Sales).priceUnit();
#}
ENDSOURCE
SOURCE #SalesStandardQty
#///
#/// Returns a standard sales order quantity.
#///
#///
#/// The inventory dimension ID that are settings to be found for; optional.
#/// If not specified, the default settings are used.
#///
#///
#/// A standard sales order quantity.
#///
#
#//BP Deviation documented
#display QtyStandard salesStandardQty(InventDimId _inventDimId = InventDim::inventDimIdBlank())
#{
# return this.inventItemSalesSetup(_inventDimId).standardQty();
#}
ENDSOURCE
SOURCE #salesSuppItemGroupId
#//BP Deviation documented
#display InventSuppItemGroupId salesSuppItemGroupId()
#{
# return InventTableModule::find(this.ItemId, ModuleInventPurchSales::Sales).SuppItemGroupId;
#}
ENDSOURCE
SOURCE #SalesTaxItemGroupId
#//BP Deviation documented
#display TaxItemGroup salesTaxItemGroupId()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Sales).TaxItemGroupId;
#}
ENDSOURCE
SOURCE #SalesUnderDeliveryPct
#//BP Deviation documented
#display SalesUnderDeliveryPct salesUnderDeliveryPct()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Sales).UnderDeliveryPct;
#}
ENDSOURCE
SOURCE #SalesUnitId
#//BP Deviation documented
#display SalesUnit salesUnitId()
#{
# return InventTableModule::find(this.ItemId,ModuleInventPurchSales::Sales).UnitId;
#}
ENDSOURCE
SOURCE #SetNameAlias
#void setNameAlias()
#{
# if (! this.NameAlias)
# this.NameAlias = name2Alias(this.ItemName);
#}
ENDSOURCE
SOURCE #siteActive
#boolean siteActive()
#{
# InventDimSearch dimSearch = new InventDimSearch();
# ;
# if (dimSearch.find(this.DimGroupId, fieldnum(InventDim,InventSiteId)))
# return dimSearch.dimActive();
# return false;
#}
ENDSOURCE
SOURCE #sizeActive
#//BP Deviation documented
#display boolean sizeActive()
#{
# InventDimSearch dimSearch = new InventDimSearch();
# ;
# if (dimSearch.find(this.DimGroupId,fieldnum(InventDim,InventSizeId)))
# return dimSearch.dimActive();
# return false;
#}
ENDSOURCE
SOURCE #stopExplodeBOMPrice
#boolean stopExplodeBOMPrice()
#{
# return this.bomCalcGroup().StopExplodePrice;
#}
ENDSOURCE
SOURCE #Txt
#//BP Deviation documented
#display ItemFreeTxt txt(LanguageId languageId = CompanyInfo::languageId(),
# InventDim inventDim = null,
# CustAccount custAccount = ''
# )
#{
# CustExternalItemDescription custExternalItemDescription;
# ItemFreeTxt itemFreeTxt;
# ;
# if (custAccount)
# {
# custExternalItemDescription = new CustExternalItemDescription(this.ItemId, inventDim, custAccount);
# if (custExternalItemDescription.findExternalDescription())
# itemFreeTxt = custExternalItemDescription.externalItemFreeTxt();
# }
#
# if (! itemFreeTxt)
# itemFreeTxt = InventTxt::findDim(this.ItemId,inventDim.InventDimId,languageId).Txt;
#
# if (! itemFreeTxt)
# itemFreeTxt = InventTxt::find(this.ItemId,languageId).Txt;
#
# return itemFreeTxt;
#}
ENDSOURCE
SOURCE #TxtDefault
#//BP Deviation documented
#edit ItemFreeTxt txtDefault(
# boolean set,
# ItemFreeTxt txt
# )
#{
# LanguageId languageId = CompanyInfo::languageId();
# InventTxt inventTxt = InventTxt::find(this.ItemId,languageId);
#
# if (set)
# {
# ttsbegin;
#
# inventTxt = InventTxt::find(this.ItemId,languageId,true);
# inventTxt.ItemId = this.ItemId;
# inventTxt.LanguageId = languageId;
# inventTxt.Txt = txt;
# inventTxt.write();
#
# ttscommit;
# }
#
# return inventTxt.Txt;
#}
ENDSOURCE
SOURCE #Update
#void update()
#{
# InventTable this_Orig = this.orig();
# ItemGroupId itemGroup_Orig = this_Orig.ItemGroupId;
#
# ForecastSales forecastSales;
# ForecastPurch forecastPurch;
# ;
#
# ttsbegin;
#
# this.setNameAlias();
# this.inventModelGroup().inventModelType().preUpdateInventTable(this);
#
# super();
#
# if (itemGroup_Orig != this.ItemGroupId)
# {
#
# while select forupdate forecastSales
# where forecastSales.ItemId == this.ItemId &&
# forecastSales.ItemGroupId == itemGroup_Orig &&
# forecastSales.ExpandId == 0
# {
#
# forecastSales.ItemGroupId = this.ItemGroupId;
# forecastSales.update();
# }
#
# while select forupdate forecastPurch
# where forecastPurch.ItemId == this.ItemId &&
# forecastPurch.ItemGroupId == itemGroup_Orig &&
# forecastPurch.ExpandId == 0
# {
#
# forecastPurch.ItemGroupId = this.ItemGroupId;
# forecastPurch.update();
# }
#
# }
#
# if (this_Orig.SalesModel != this.SalesModel ||
# this_Orig.SalesPriceModelBasic != this.SalesPriceModelBasic ||
# this_Orig.SalesContributionRatio != this.SalesContributionRatio ||
# this_Orig.SalesPercentMarkup != this.SalesPercentMarkup)
# {
# InventTable::updateAutoSalesPrice(this.ItemId);
# }
#
# this.insertBOMTable();
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #updateAutoSalesPercent
#server boolean updateAutoSalesPercent()
#{
# InventTableModule inventTableSales;
# InventTableModule inventTableBasic;
# ;
# if (this.SalesModel == SalesPriceModel::None)
# return false;
#
# inventTableSales = InventTableModule::find(this.ItemId,ModuleInventPurchSales::Sales,true);
#
# if (this.SalesPriceModelBasic == SalesPriceModelBasic::PurchPrice)
# inventTableBasic = InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch);
# else
# inventTableBasic = InventTableModule::find(this.ItemId,ModuleInventPurchSales::Invent);
#
# if (! inventTableSales || ! inventTableBasic)
# return false;
#
# switch(this.SalesModel)
# {
# case SalesPriceModel::Contributionratio:
#
# if (inventTableSales.pcsPrice())
# {
# this.SalesContributionRatio = (inventTableSales.pcsPrice() - inventTableBasic.pcsPrice()) * 100 / inventTableSales.pcsPrice();
# }
#
# break;
#
# case SalesPriceModel::PercentMarkup:
#
# if (inventTableBasic.pcsPrice())
# {
# this.SalesPercentMarkup = (inventTableSales.pcsPrice() - inventTableBasic.pcsPrice()) * 100 / inventTableBasic.pcsPrice();
# }
#
# break;
#
# default:
# }
#
# this.update();
# return true;
#
#}
ENDSOURCE
SOURCE #updateCheckFix
#server void updateCheckFix(InventConsistencyCheck_Table inventConsistencyCheck_Table)
#{
# InventTableModule inventTableModule;
# InventItemLocation inventItemLocation;
# InventDimSetup inventDimSetup;
# Counter serialNoErrors;
# InventSum inventSum;
# InventDim inventDim;
# InventSerial inventSerial;
#
# void addError(str _str)
# {
# checkFailed(_str, '', SysInfoAction_TableField::newBuffer(this));
# }
# ;
#
# setprefix(fieldLabelValue(this.TableId, fieldnum(InventTable,ItemId), this.ItemId));
#
# inventTableModule = InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch,true);
# if (! inventTableModule)
# {
# addError(strfmt("@SYS55203",ModuleInventPurchSales::Purch));
# if (inventConsistencyCheck_Table.checkFix() == CheckFix::Fix)
# {
# inventTableModule.initValue();
# inventTableModule.ItemId = this.ItemId;
# inventTableModule.ModuleType = ModuleInventPurchSales::Purch;
# inventTableModule.insert();
#
# inventConsistencyCheck_Table.updateCorrected();
# }
# }
#
# inventTableModule = InventTableModule::find(this.ItemId,ModuleInventPurchSales::Invent,true);
# if (! inventTableModule)
# {
# addError(strfmt("@SYS55203",ModuleInventPurchSales::Invent));
# if (inventConsistencyCheck_Table.checkFix() == CheckFix::Fix)
# {
# inventTableModule.initValue();
# inventTableModule.ItemId = this.ItemId;
# inventTableModule.ModuleType = ModuleInventPurchSales::Invent;
# inventTableModule.insert();
#
# inventConsistencyCheck_Table.updateCorrected();
# }
# }
#
# inventTableModule = InventTableModule::find(this.ItemId,ModuleInventPurchSales::Sales,true);
# if (! inventTableModule)
# {
# addError(strfmt("@SYS55203",ModuleInventPurchSales::Sales));
# if (inventConsistencyCheck_Table.checkFix() == CheckFix::Fix)
# {
# inventTableModule.initValue();
# inventTableModule.ItemId = this.ItemId;
# inventTableModule.ModuleType = ModuleInventPurchSales::Sales;
# inventTableModule.insert();
#
# inventConsistencyCheck_Table.updateCorrected();
# }
# }
#
# inventItemLocation = InventItemLocation::findDefault(this.ItemId,true);
# if (! inventItemLocation)
# {
# addError("@SYS55204");
# if (inventConsistencyCheck_Table.checkFix() == CheckFix::Fix)
# {
# inventItemLocation.initValue();
# inventItemLocation.ItemId = this.ItemId;
# inventItemLocation.InventDimId = InventDim::inventDimIdBlank();
# inventItemLocation.insert();
#
# inventConsistencyCheck_Table.updateCorrected();
# }
# }
#
# // Check the extra serial number control
# inventDimSetup = InventDimSetup::find(this.DimGroupId, fieldnum(InventDim, InventSerialId));
# if (inventDimSetup && inventDimSetup.Active && inventDimSetup.SerialNumberControl)
# {
# while select inventSum
# where inventSum.ItemId == this.ItemId &&
# inventSum.ClosedQty == NoYes::No &&
# (inventSum.PhysicalInvent != 0 ||
# inventSum.Arrived != 0)
# {
# inventDim = inventSum.inventDim();
# if (inventDim.InventSerialId && !InventSerial::exist(this.ItemId, inventDim.InventSerialId))
# {
# serialNoErrors++;
# if (inventConsistencyCheck_Table.checkFix() == CheckFix::Fix)
# {
# inventSerial.ItemId = this.ItemId;
# inventSerial.InventSerialId = inventDim.InventSerialId;
# inventSerial.insert();
# }
# }
# }
# if (serialNoErrors > 0)
# {
# addError(strfmt("@SYS68715", this.ItemId, serialNoErrors));
# if (inventConsistencyCheck_Table.checkFix() == CheckFix::Fix)
# inventConsistencyCheck_Table.updateCorrected();
# }
# }
#}
#
ENDSOURCE
SOURCE #UpdateLastCostPrice
#server void updateLastCostPrice(
# CostAmount value,
# InventQty qty,
# PriceDate priceDate,
# InventDim _inventDim
# )
#{
# InventTableModule inventTableModule;
# CostPrice costPrice;
#
# void initInventTableModule()
# {
# ;
# inventTableModule.Price = costPrice;
# inventTableModule.Markup = 0;
# inventTableModule.PriceDate = priceDate;
# }
# ;
#
# if (!value)
# return;
#
# if (this.CostModel && qty > 0 && value > 0 && this.inventModelGroup().inventModelType().mustUpdateInventTableCostPrice())
# {
# inventTableModule = InventTableModule::find(this.ItemId,ModuleInventPurchSales::Invent);
# costPrice = Currency::price(inventTableModule.priceUnit() * value / qty);
#
# if (inventTableModule.PriceDate <= priceDate)
# {
# if (costPrice != inventTableModule.Price)
# {
# inventTableModule = InventTableModule::find(this.ItemId,ModuleInventPurchSales::Invent,true);
#
# initInventTableModule();
# inventTableModule.update(false);
# }
# }
#
# initInventTableModule();
# InventItemPrice::updateLastCostPrice(inventTableModule, _inventDim, priceDate);
# }
#}
#
ENDSOURCE
SOURCE #UpdateLastPurchPrice
#server void updateLastPurchPrice(
# TransDate transDate,
# CurrencyCode currencyCode,
# Price purchPrice,
# PriceUnit priceUnit,
# PriceMarkup priceMarkup,
# PurchUnit purchUnit,
# InventDim _inventDim
# )
#{
# InventTableModule inventTableModule;
# Price price;
# PriceMarkup markup;
#
# void initInventTableModule()
# {
# ;
# inventTableModule.Price = price;
# inventTableModule.PriceUnit = priceUnit;
# inventTableModule.Markup = markup;
# inventTableModule.PriceDate = transDate;
# }
# ;
#
# if (!purchPrice)
# return;
#
# if (this.PurchModel)
# {
# inventTableModule = InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch);
# price = UnitConvert::price(Currency::price(Currency::amountCur2MST(purchPrice,currencyCode,0,transDate)), inventTableModule.UnitId, purchUnit, inventTableModule.ItemId);
# markup = UnitConvert::price(Currency::price(Currency::amountCur2MST(priceMarkup,currencyCode,0,transDate)), inventTableModule.UnitId, purchUnit, inventTableModule.ItemId);
#
# if (inventTableModule.PriceDate <= transDate)
# {
#
# if (price)
# {
# if (price != inventTableModule.Price || markup != inventTableModule.Markup || inventTableModule.PriceUnit != priceUnit)
# {
# inventTableModule = InventTableModule::find(this.ItemId,ModuleInventPurchSales::Purch,true);
# initInventTableModule();
# inventTableModule.update(false);
# }
# initInventTableModule();
# InventItemPrice::updateLastPurchPrice(inventTableModule, _inventDim, transDate);
# }
# }
#
# }
#}
#
ENDSOURCE
SOURCE #validateDelete
#public boolean validateDelete()
#{
# boolean ret;
# BOM bomLines;
# BOMId activeBOMId;
# str warningStr;
# InventDim inventDim;
# ;
#
# ret = super();
#
# if (! ret)
# return ret;
#
# inventDim.InventSiteId = this.inventInventSiteId();
#
# if (this.inventItemType().canHaveBOM() && ! isConfigurationkeyEnabled(configurationkeynum(BOMVersion)))
# {
#
# activeBOMId = BOMVersion::findActive(this.ItemId, systemdateget(), this.inventStandardQty(), inventDim).bomId;
#
# select firstonly bomLines
# where bomLines.bomId == activeBOMId;
#
# if (bomLines.RecId)
# warningStr = "@SYS81601";
# }
#
# if (warningStr && Box::yesNo(warningStr+'\n\n'+"@SYS62458",DialogButton::No, strfmt("@SYS81613",this.ItemId)) == DialogButton::No)
# ret = false;
#
# return ret;
#}
#
ENDSOURCE
SOURCE #validateField
#public boolean validateField(fieldId _fieldIdToCheck)
#{
# boolean ret;
# ;
#
# ret = super(_fieldIdToCheck);
#
# switch (fieldExt2Id(_fieldIdToCheck))
# {
# case fieldnum(InventTable, ProjCategoryId):
# ret = ret && this.checkProjCategoryId();
# break;
#
# case fieldnum(InventTable, FiscalLIFOGroup):
# if (this.RecId && (!InventFiscalLIFOGroup::find(this.FiscalLIFOGroup).Individual || !InventFiscalLIFOGroup::find(this.orig().FiscalLIFOGroup).Individual)
# && !SysRecordTemplate::isTemplateEditFormRecord(this))
# {
# if (this.checkFiscalLIFOValuePrevYear())
# ret = checkFailed("@SYS99199");
# }
# break;
#
# case fieldnum(InventTable, Configurable):
# ret = ret && this.checkConfigurable();
# break;
# }
#
# ret = ret && this.inventModelGroup().inventModelType().validateFieldInventTable(this,_fieldIdToCheck);
#
# return ret;
#}
#
#
ENDSOURCE
SOURCE #validateWrite
#public boolean validateWrite()
#{
# boolean ret;
#
# ret = super();
#
# ret = ret && this.checkProjCategoryId();
#
# ret = ret && this.inventModelGroup().inventModelType().validateWriteInventTable(this);
#
# if (ret)
# {
# ret = appl.dimensionSetValidation().checkDimension(this, fieldnum(InventTable, Dimension), true);
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #buildMaxQtyDialogStr
#static TempStr buildMaxQtyDialogStr(InventItemOrderSetupMap _inventItemOrderSetupMap,
# UnitID _unitID,
# UnitID _transUnitId,
# Qty _transQty,
# boolean _lockMaxQtyCheck)
#{
# TempStr maxQtyDialogStr;
#;
# maxQtyDialogStr = strfmt("@SYS14410", UnitConvert::qty(_inventItemOrderSetupMap.highestQty(), _unitID, _transUnitId, _inventItemOrderSetupMap.ItemId))
# + '\n' + strfmt("@SYS10407",_transQty);
# if (!_lockMaxQtyCheck)
# {
# maxQtyDialogStr += '\n\n' + "@SYS53119" ;
# }
#
# return maxQtyDialogStr;
#}
ENDSOURCE
SOURCE #buildMinQtyDialogStr
#static TempStr buildMinQtyDialogStr(InventItemOrderSetupMap _inventItemOrderSetupMap,
# UnitID _unitID,
# UnitID _transUnitId,
# Qty _transQty,
# boolean _lockMinQtyCheck)
#{
# TempStr minQtyDialogStr;
#;
# minQtyDialogStr = strfmt("@SYS2024", UnitConvert::qty(_inventItemOrderSetupMap.lowestQty(), _unitID, _transUnitId, _inventItemOrderSetupMap.ItemId))
# + '\n' + strfmt("@SYS10407",_transQty);
# if (!_lockMinQtyCheck)
# {
# minQtyDialogStr += '\n\n' + "@SYS53116";
# }
#
# return minQtyDialogStr;
#}
ENDSOURCE
SOURCE #buildMultipleDialogStr
#static TempStr buildMultipleDialogStr(InventItemOrderSetupMap _inventItemOrderSetupMap,
# UnitID _unitID,
# UnitID _transUnitId,
# Qty _transQty,
# Qty _numOfRoundedUp,
# boolean _lockMultipleCheck,
# boolean _showRoundedUp = true)
#{
# TempStr multipleDialogStr;
#;
# multipleDialogStr = strfmt("@SYS1100",UnitConvert::qty(_inventItemOrderSetupMap.multipleQty(), _unitID, _transUnitId, _inventItemOrderSetupMap.ItemId))
# + '\n' + strfmt("@SYS10407",_transQty);
#
# if (_showRoundedUp)
# {
# multipleDialogStr += '\n' + strfmt("@SYS15651",UnitConvert::qty(_numOfRoundedUp, _unitID, _transUnitId, _inventItemOrderSetupMap.ItemId));
# }
#
# if (!_lockMultipleCheck)
# {
# multipleDialogStr += '\n\n' + "@SYS4901";
# }
#
# return multipleDialogStr;
#}
ENDSOURCE
SOURCE #checkColor
#server static boolean checkColor(ItemId itemId,
# InventColorId inventColorId
# )
#{
# InventTable inventTable = InventTable::find(itemId);
# ;
#
# if (inventTable.colorActive())
# {
# if (! inventColorId)
# return checkFailed(strfmt("@SYS73924",InventColor::label(),itemId));
# }
# else if (inventColorId)
# return checkFailed(strfmt("@SYS73923",itemId,InventColor::label()));
#
# if (! InventColor::checkExist(itemId,inventColorId))
# return false;
#
# return true;
#}
ENDSOURCE
SOURCE #checkConfig
#server static boolean checkConfig(
# ItemId itemId,
# ConfigId configId
# )
#{
# InventTable inventTable = InventTable::find(itemId);
# ;
# if (inventTable.configActive())
# {
# if (! configId)
# return checkFailed(strfmt("@SYS25771",itemId));
# }
# else if (configId)
# return checkFailed(strfmt("@SYS25621",itemId));
#
# if (! ConfigTable::checkExist(itemId,configId))
# return false;
#
# return true;
#}
#
ENDSOURCE
SOURCE #checkExist
#static boolean checkExist(ItemId itemId)
#{
# if (itemId && !InventTable::exist(itemId))
# return checkFailed(strfmt(InventTable::txtNotExist(),itemId));
# return true;
#}
ENDSOURCE
SOURCE #checkSize
#server static boolean checkSize(ItemId itemId,
# InventSizeId inventSizeId
# )
#{
# InventTable inventTable = InventTable::find(itemId);
# ;
#
# if (inventTable.sizeActive())
# {
# if (! inventSizeId)
# return checkFailed(strfmt("@SYS73924",InventSize::label(),itemId));
# }
# else if (inventSizeId)
# return checkFailed(strfmt("@SYS73923",itemId,InventSize::label()));
#
# if (! InventSize::checkExist(itemId,inventSizeId))
# return false;
#
# return true;
#}
ENDSOURCE
SOURCE #exist
#static boolean exist(ItemId itemId)
#{
# return itemId && (select RecId from inventTable
# index hint ItemIdx
# where inventTable.ItemId == itemId
# ).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#static InventTable find(ItemId itemId,
# boolean update = false)
#{
# InventTable inventTable;
# ;
#
# inventTable.selectForUpdate(update);
#
# if (itemId)
# {
# select firstonly inventTable
# index hint ItemIdx
# where inventTable.ItemId == itemId;
# }
#
# return inventTable;
#}
#
ENDSOURCE
SOURCE #findAlternativeItem
#static container findAlternativeItem (ItemId _itemId,
# InventDim _inventDim,
# InventQty qty
# )
#{
# InventDimParm inventDimParm;
# InventDim inventDim;
# InventOnhand inventOnhand;
# Counter iteration;
# NoYes nextItem;
# ItemId newItemId = _itemId;
# InventTable inventTable = InventTable::find(_itemId);
# ;
# #InventDimDevelop
#
# inventDim.copyItemDim(inventTable.DimGroupId,_inventDim);
#
# inventDimParm.initItemDimension(inventTable.DimGroupId);
#
# if (inventTable.UseAltItemId != ItemNumAlternative::Never)
# {
# while (inventTable.AltItemId && iteration < 10)
# {
# iteration++;
#
# switch(inventTable.UseAltItemId)
# {
# case ItemNumAlternative::Never : newItemId = inventTable.ItemId;
# nextItem = NoYes::No;
# break;
#
# case ItemNumAlternative::InventWhen0 :
# inventOnhand = InventOnhand::newParameters(
# newItemId,
# inventDim,
# inventDimParm);
#
#
#
# if (inventOnhand.availPhysical() >= qty)
# {
# newItemId = inventTable.ItemId;
# nextItem = NoYes::No;
# break;
# }
# else
# {
# inventDim.ConfigId = inventTable.AltConfigId;
# inventDim.InventSizeId = inventTable.AltInventSizeId;
# inventDim.InventColorId = inventTable.AltInventColorId;
# inventTable = InventTable::find(inventTable.AltItemId);
# newItemId = inventTable.ItemId;
# inventDimParm.clear();
# inventDimParm.initItemDimension(inventTable.DimGroupId);
# nextItem = NoYes::Yes;
# break;
# }
#
# case ItemNumAlternative::Always : inventDim.ConfigId = inventTable.AltConfigId;
# inventDim.InventSizeId = inventTable.AltInventSizeId;
# inventDim.InventColorId = inventTable.AltInventColorId;
# inventTable = InventTable::find(inventTable.AltItemId);
# newItemId = inventTable.ItemId;
# inventDimParm.clear();
# inventDimParm.initItemDimension(inventTable.DimGroupId);
# nextItem = NoYes::Yes;
# break;
# }
# if (nextItem)
# continue;
# else
# break;
# }
# }
# return [newItemId,inventDim];
#}
#
ENDSOURCE
SOURCE #findCompanyItem
#static InventTable findCompanyItem(ItemIdCompany itemIdCompany,
# boolean update = false)
#{
# InventTable inventTable;
# ;
#
# inventTable.selectForUpdate(update);
#
# if (itemIdCompany)
# {
# select firstonly inventTable
# where inventTable.ItemIdCompany == itemIdCompany;
# }
#
# return inventTable;
#}
#
ENDSOURCE
SOURCE #findCostPcsPrice
#static Price findCostPcsPrice(
# ItemId _itemId,
# InventDimId _inventDimId,
# InventDim _inventDim = null, // set this parameter for better performance if avail
# PriceDate _priceDate = systemdateget()
# )
#{
# return InventTable::find(_itemId).costPcsPrice(_inventDimId,_inventDim, null, _priceDate);
#}
ENDSOURCE
SOURCE #findExternalItemId
#static container findExternalItemId(ModuleInventCustVend _moduleInventCustVend,
# CustVendAC _custVendAccount,
# ExternalItemId _externalItemId)
#{
# CustVendExternalItem custVendExternalItem;
# ModuleInventPurchSalesVendCustGroup moduleInventPurchSalesVendCustGroup;
# CustVendItemGroupId custVendItemGroupId;
# ;
# if (_custVendAccount && _externalItemId)
# {
# if (_moduleInventCustVend == ModuleInventCustVend::Cust)
# {
# moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::Cust;
# }
# else
# {
# moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::Vend;
# }
#
# custVendExternalItem = CustVendExternalItem::findExternalItemId(moduleInventPurchSalesVendCustGroup, _custVendAccount, _externalItemId);
#
# if (!custVendExternalItem)
# {
# if (_moduleInventCustVend == ModuleInventCustVend::Cust)
# {
# moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::CustGroup;
# custVendItemGroupId = CustTable::find(_custVendAccount).CustItemGroupId;
# }
# else
# {
# moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::VendGroup;
# custVendItemGroupId = VendTable::find(_custVendAccount).VendItemGroupId;
# }
#
# custVendExternalItem = CustVendExternalItem::findExternalItemId(moduleInventPurchSalesVendCustGroup, custVendItemGroupId, _externalItemId);
# }
# }
#
# return [custVendExternalItem.ItemId, custVendExternalItem.inventDim()];
#}
ENDSOURCE
SOURCE #findRecId
#static InventTable findRecId(recId _recId,
# boolean update = false)
#{
# InventTable inventTable;
# ;
#
# inventTable.selectForUpdate(update);
#
# if (_recId)
# {
# select firstonly inventTable
# where inventTable.RecId == _recId;
# }
#
# return inventTable;
#}
ENDSOURCE
SOURCE #findTagId
#static InventTable findTagId(RFIDTagId _tagId,
# boolean update = false)
#{
# InventTable inventTable;
# InventItemGTIN gtin;
# RFIDEpc epc;
# ;
#
# inventTable.selectForUpdate(update);
#
# if (_tagId)
# {
# epc = RFIDEpc::construct(_tagId);
#
# if (epc && epc.objectType() == EPCObjectType::ItemType)
# {
# gtin = InventItemGTIN::findGTIN(epc.object());
#
# if (gtin)
# {
# select firstonly inventTable
# where inventTable.ItemId == gtin.ItemId;
# }
# }
# }
#
# return inventTable;
#}
ENDSOURCE
SOURCE #getInventDimId
#static server InventDimId getInventDimId(ItemId _itemId)
#{
# InventDimId inventDimId;
# InventTable inventTable;
# InventDim inventDim;
# ;
#
# inventTable = InventTable::find(_itemId);
#
# if (inventTable)
# {
# if (inventTable.configActive() || inventTable.sizeActive() || inventTable.colorActive())
# {
# inventDim.ConfigId = inventTable.StandardConfigId;
# inventDim.InventSizeId = inventTable.StandardInventSizeId;
# inventDim.InventColorId = inventTable.StandardInventColorId;
# inventDimId = InventDim::findOrCreate(inventDim).InventDimId;
# }
# else
# {
# inventDimId = InventDim::inventDimIdBlank();
# }
# }
# return inventDimId;
#}
ENDSOURCE
SOURCE #infoActionBOMCalcGroup
#static SysInfoAction_Formrun infoActionBOMCalcGroup(ItemId _itemId,
# InventTable _inventTable = null) // set this parameter for better performance
#{
# SysInfoAction_Formrun infoActionBOMCalcGroup;
# ;
# infoActionBOMCalcGroup = SysInfoAction_Formrun::newFormnameControlname(formstr(InventTable),
# identifierstr(BOMCalculationGroup_BOMCalcGroupId));
# if(!_inventTable)
# {
# _inventTable = InventTable::find(_itemId);
# }
#
# infoActionBOMCalcGroup.parmCallerBuffer(_inventTable);
#
# return infoActionBOMCalcGroup;
#}
#
ENDSOURCE
SOURCE #infoActionItemId
#static SysInfoAction_Formrun infoActionItemId(ItemId _itemId,
# InventTable _inventTable = null) // set this parameter for better performance
#{
# SysInfoAction_Formrun infoActionItemId;
# ;
# infoActionItemId = SysInfoAction_Formrun::newFormnameControlname(formstr(InventTable),
# identifierstr(ctrlInventTable_ItemId));
# if(!_inventTable)
# {
# _inventTable = InventTable::find(_itemId);
# }
#
# infoActionItemId.parmCallerBuffer(_inventTable);
#
# return infoActionItemId;
#}
#
ENDSOURCE
SOURCE #inventDecimals
#static UnitDecimals inventDecimals(ItemId itemId)
#{
# ;
# return Unit::decimals(InventTableModule::find(itemId,ModuleInventPurchSales::Invent).UnitId);
#}
ENDSOURCE
SOURCE #isBatchReceiptRequired
#static boolean isBatchReceiptRequired(ItemId itemId)
#{
# #InventDimDevelop
# InventDimSetup inventDimSetup = InventDimSetup::find(InventTable::find(itemId).DimGroupId, fieldnum(InventDim, InventBatchId));
# ;
# if (!inventDimSetup || !inventDimSetup.Active || inventDimSetup.AllowBlankReceipt)
# return false;
#
# return true;
#}
ENDSOURCE
SOURCE #lookupBOMId
#client static void lookupBOMId(
# FormStringControl _lookupCtrl,
# ItemId _itemId,
# InventDim _inventDimCriteria
# )
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(BOMVersion), _lookupCtrl);
# Query query = new Query();
# QueryBuildDataSource queryBuildDataSource = query.addDataSource(tablenum(BOMVersion));
# QueryBuildRange queryBuildRange;
#
# QueryBuildDataSource qbdsDim;
# container dimFields = InventDim::dimFieldList();
#
# InventDimParm inventDimParm;
# int h;
# int y;
# int x;
# ;
#
# inventDimParm.initDimBOMRouteVersion(InventTable::find(_itemId).DimGroupId);
#
# if (_itemId)
# {
# queryBuildRange = queryBuildDataSource.addRange(fieldnum(BOMVersion, ItemId));
# queryBuildRange.value(queryValue(_itemId));
# }
#
# queryBuildDataSource.addSelectionField(fieldnum(BOMVersion, InventDimId)); // needed below for the addLookupMethod
#
# qbdsDim = queryBuildDataSource.addDataSource(tablenum(InventDim));
# qbdsDim.joinMode(JoinMode::InnerJoin);
# qbdsDim.relations(true);
#
# for (h=1;h<=conlen(dimFields);h++)
# {
# y = conpeek(dimFields, h);
# x = InventDim::dim2dimParm(conpeek(dimFields, h));
#
# if (inventDimParm.(x)) //dimension is active for the item
# {
# if (_inventDimCriteria.(y)) //limitation is specified
# {
# qbdsDim.addRange(y).value(queryValue(_inventDimCriteria.(y)));
# qbdsDim.addRange(y).value(SysQuery::valueEmptyString());
# qbdsDim.addSortField(y);
# }
#
# if (tableHasInstanceMethod(new DictTable(tablenum(BOMVersion)), fieldid2name(tablenum(InventDim),y)))
# {
# sysTableLookup.addLookupMethod(fieldid2name(tablenum(InventDim),y));
# }
# }
# }
#
# sysTableLookup.addLookupfield(fieldnum(BOMVersion, bomId));
# sysTableLookup.addLookupfield(fieldnum(BOMVersion, Name));
#
# sysTableLookup.addLookupfield(fieldnum(BOMVersion, FromDate));
# sysTableLookup.addLookupfield(fieldnum(BOMVersion, ToDate));
# sysTableLookup.addLookupfield(fieldnum(BOMVersion, FromQty));
# sysTableLookup.addLookupfield(fieldnum(BOMVersion, Active));
# sysTableLookup.addLookupfield(fieldnum(BOMVersion, ApprovedBy));
# sysTableLookup.addLookupfield(fieldnum(BOMVersion, Approved));
#
# queryBuildDataSource.addSortField(fieldnum(BOMVersion, bomId),SortOrder::Descending);
#
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#}
#
ENDSOURCE
SOURCE #lookupItemIdCanBeProduced
#static client void lookupItemIdCanBeProduced(FormStringControl _ctrl)
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(InventTable),_ctrl);
# Query query = new Query();
# QueryBuildDataSource queryBuildDataSource = query.addDataSource(tablenum(InventTable));
# ;
#
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemId));
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemName));
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemGroupId));
#
# queryBuildDataSource.addRange(fieldnum(InventTable,ItemType)).value(InventItemType::valueCanBeProduced());
#
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#
#}
ENDSOURCE
SOURCE #lookupItemIdCanBeTransferred
#///
#/// Finds items that can be transferred.
#///
#///
#/// The FormStringControl object where the lookup values should be displayed.
#///
#///
#/// Whether an item can be transferred depends on its item type, and is determined by the return value of the InventItemType.canBeTransferred method.
#///
#public static client void lookupItemIdCanBeTransferred(FormStringControl _lookupctrl)
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(InventTable), _lookupctrl);
# Query query = new Query();
# QueryBuildDataSource queryBuildDataSource;
# ;
#
# sysTableLookup.addLookupfield(fieldnum(InventTable, ItemId));
# sysTableLookup.addLookupfield(fieldnum(InventTable, ItemName));
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemGroupId));
# sysTableLookup.addLookupfield(fieldnum(InventTable,NameAlias));
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemType));
# sysTableLookup.addLookupfield(fieldnum(InventTable,DimGroupId));
#
# queryBuildDataSource = query.addDataSource(tablenum(InventTable));
# queryBuildDataSource.addRange(fieldnum(InventTable,ItemType)).value(InventItemType::valueCanBeTransferred());
#
# queryBuildDataSource.addSortField(fieldnum(InventTable,ItemId));
#
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#}
ENDSOURCE
SOURCE #lookupItemIdCanHaveBOM
#static client void lookupItemIdCanHaveBOM(FormStringControl _ctrl)
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(InventTable),_ctrl);
# Query query = new Query();
# QueryBuildDataSource queryBuildDataSource = query.addDataSource(tablenum(InventTable));
# ;
#
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemId));
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemName));
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemGroupId));
#
# queryBuildDataSource.addRange(fieldnum(InventTable,ItemType)).value(InventItemType::valueCanHaveBOM());
#
# queryBuildDataSource.addSortField(fieldnum(InventTable,ItemId));
#
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#}
#
#
ENDSOURCE
SOURCE #lookupItemIdGroup
#client server static void lookupItemIdGroup(
# FormStringControl ctrl,
# ItemGroupId itemGroupId,
# boolean showBOM = false,
# boolean showRoute = false
# )
#{
# InventLookupItemIdGroup inventLookup;
#;
# inventLookup = new InventLookupItemIdGroup(ctrl, itemGroupId, showBOM, showRoute);
# inventLookup.run();
#}
ENDSOURCE
SOURCE #lookupItemIdType
#static client void lookupItemIdType(FormStringControl _ctrl, str _filterStr, Set _itemTypes)
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(InventTable),_ctrl);
# Query query = new Query();
# QueryBuildDataSource queryBuildDataSource = query.addDataSource(tablenum(InventTable));
# SetEnumerator se;
# ;
#
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemId));
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemName));
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemGroupId));
# sysTableLookup.addLookupfield(fieldnum(InventTable,NameAlias));
# sysTableLookup.addLookupfield(fieldnum(InventTable,ItemType));
#
# queryBuildDataSource.addRange(fieldnum(InventTable,ItemId)).value(_filterStr+'*');
#
# if (_itemTypes)
# {
# se = _itemTypes.getEnumerator();
# while (se.moveNext())
# {
# queryBuildDataSource.addRange(fieldnum(InventTable,ItemType)).value(queryValue(se.current()));
# }
# }
#
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#}
ENDSOURCE
SOURCE #lookupRouteId
#client static void lookupRouteId(
# FormStringControl _lookupCtrl,
# ItemId _itemId,
# InventDim _inventDimCriteria
# )
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(RouteVersion), _lookupCtrl);
# Query query = new Query();
# QueryBuildDataSource queryBuildDataSource = query.addDataSource(tablenum(RouteVersion));
# QueryBuildRange queryBuildRange;
#
# QueryBuildDataSource qbdsDim;
#
# InventDimParm inventDimParm;
# container dimFields = InventDim::dimFieldList();
# int h;
# int y;
# int x;
# ;
#
# inventDimParm.initDimBOMRouteVersion(InventTable::find(_itemId).DimGroupId);
#
# if (_itemId)
# {
# queryBuildRange = queryBuildDataSource.addRange(fieldnum(RouteVersion, ItemId));
# queryBuildRange.value(queryValue(_itemId));
# }
#
# queryBuildDataSource.addSelectionField(fieldnum(RouteVersion, InventDimId)); // needed below for the addLookupMethod
#
# qbdsDim = queryBuildDataSource.addDataSource(tablenum(InventDim));
# qbdsDim.joinMode(JoinMode::InnerJoin);
# qbdsDim.relations(true);
#
# //Adding inventory dimensions
# for (h=1;h<=conlen(dimFields);h++)
# {
# y = conpeek(dimFields, h);
# x = InventDim::dim2dimParm(conpeek(dimFields, h));
#
# if (inventDimParm.(x)) //dimension is active for the item
# {
# if (_inventDimCriteria.(y)) //limitation is specified
# {
# qbdsDim.addRange(y).value(queryValue(_inventDimCriteria.(y)));
# qbdsDim.addRange(y).value(SysQuery::valueEmptyString());
# qbdsDim.addSortField(y);
# }
#
# if (tableHasInstanceMethod(new DictTable(tablenum(RouteVersion)), fieldid2name(tablenum(InventDim),y)))
# {
# sysTableLookup.addLookupMethod(fieldid2name(tablenum(InventDim),y));
# }
# }
# }
#
# sysTableLookup.addLookupfield(fieldnum(RouteVersion, RouteId));
# sysTableLookup.addLookupfield(fieldnum(RouteVersion, Name));
# sysTableLookup.addLookupfield(fieldnum(RouteVersion, FromDate));
# sysTableLookup.addLookupfield(fieldnum(RouteVersion, ToDate));
# sysTableLookup.addLookupfield(fieldnum(RouteVersion, FromQty));
# sysTableLookup.addLookupfield(fieldnum(RouteVersion, Active));
# sysTableLookup.addLookupfield(fieldnum(RouteVersion, ApprovedBy));
# sysTableLookup.addLookupfield(fieldnum(RouteVersion, Approved));
#
# queryBuildDataSource.addSortField(fieldnum(RouteVersion, RouteId),SortOrder::Descending);
#
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#}
#
ENDSOURCE
SOURCE #name
#static Name name(ItemId _itemId,
# InventDim _inventDim = null
# )
#{
# return InventTable::find(_itemId).itemName(_inventDim);
#}
ENDSOURCE
SOURCE #PBALookupItemIdGroup
#static void pbaLookupItemIdGroup(
# FormStringControl ctrl,
# ItemGroupId itemGroupId,
# boolean showBOM = false,
# boolean showRoute = false
# )
#{
# PBAInventLookupItemIdGroup inventLookup;
#;
# inventLookup = new PBAInventLookupItemIdGroup(ctrl, itemGroupId, showBOM, showRoute);
# inventLookup.run();
#}
#
ENDSOURCE
SOURCE #priceInventDimId
#///
#/// Find or create an inventDimId for storing the price of an item price.
#///
#///
#/// The item id
#///
#///
#/// The inventDimId that is converted.
#///
#///
#/// InventDimId for a specific dimension/site combination
#///
#
#public static InventDimId priceInventDimId(
# ItemId _itemId,
# InventDimId _inventDimId
# )
#{
# InventTable inventTable;
# InventDimId inventDimId;
# InventDim inventDim;
# InventDim itemDim;
# InventDimParm inventDimParm;
# ;
#
# inventTable = InventTable::find(_itemId);
#
# if (inventTable.ItemDimCostPrice || inventTable.siteActive())
# {
# inventDim = InventDim::find(_inventDimId);
# if (inventTable.ItemDimCostPrice)
# {
# inventDim.clearNotSiteAndItemDim(inventTable.DimGroupId);
# }
# else
# {
# inventDimParm.InventSiteIdFlag = NoYes::Yes;
# inventDim.clearNotSelectedDim(inventDimParm);
# }
#
# itemDim = InventDim::findOrCreate(inventDim);
# inventDimId = itemDim.InventDimId;
# }
# else
# {
# inventDimId = InventDim::inventDimIdBlank();
# }
#
# return inventDimId;
#}
ENDSOURCE
SOURCE #setMinMaxQty
#static Qty setMinMaxQty(InventItemOrderSetupMap _inventItemOrderSetupMap,
# Qty _transQty,
# UnitID _transUnitId,
# boolean _showUsrDialog = true,
# boolean _lockMinQtyCheck = false,
# boolean _lockMaxQtyCheck = false,
# boolean _lockMultipleCheck = false)
#{
# Qty transQty;
# Qty unitConvert = 1;
# Qty numOfRoundedUp;
# boolean calledFromWeb = webSession() ? true : false;
#
# UnitID unitID = InventTableModule::find(_inventItemOrderSetupMap.ItemId, InventItemOrderSetupMap::setup2ModuleType(_inventItemOrderSetupMap.setupType())).UnitId;
#
# TempStr minQtyDialogStr;
# TempStr maxQtyDialogStr;
# TempStr multipleDialogStr;
# #define.emptyStr('')
#
# boolean mustConvertQty(boolean _showDialog, boolean _lockQtyCheck, TempStr _dialogText)
# {
# boolean ret;
# ;
#
# if (!ret && !_showDialog)
# {
# ret = true;
# }
#
# if (!ret && _lockQtyCheck)
# {
# if (calledFromWeb)
# {//Info box is not supported on web, hence a message is shown in the info log instead.
# info(_dialogText);
# }
# else
# {
# Box::info(_dialogText);
# }
# ret = true;
# }
#
# if (!ret)
# {
# if (calledFromWeb)
# {//YesNo box is not supported on web, hence a warning is shown instead. Qty is not converted.
# warning(_dialogText);
# ret = false;
# }
# else
# {
# if (Box::yesNo(_dialogText, DialogButton::Yes) == DialogButton::Yes)
# {
# ret = true;
# }
# }
# }
#
# return ret;
# }
# ;
#
# transQty = _transQty;
#
# if (_transUnitId != unitID)
# {
# unitConvert = UnitConvert::qty(1, _transUnitId, unitID, _inventItemOrderSetupMap.ItemId, false);
# }
#
# if (transQty > 0)
# {
# if (_inventItemOrderSetupMap.lowestQty() > decround((transQty * unitConvert),10))
# {
# minQtyDialogStr = _showUsrDialog ? InventTable::buildMinQtyDialogStr(_inventItemOrderSetupMap, unitID, _transUnitId, transQty, calledFromWeb ? true : _lockMinQtyCheck) : #emptyStr;
# if (mustConvertQty(_showUsrDialog, _lockMinQtyCheck, minQtyDialogStr))
# {
# transQty = UnitConvert::qty(_inventItemOrderSetupMap.lowestQty(),
# unitID,
# _transUnitId,
# _inventItemOrderSetupMap.ItemId);
# }
# }
#
# if (_inventItemOrderSetupMap.highestQty() < decround((transQty * unitConvert),10) && _inventItemOrderSetupMap.highestQty() != 0)
# {
# maxQtyDialogStr = _showUsrDialog ? InventTable::buildMaxQtyDialogStr(_inventItemOrderSetupMap, unitID, _transUnitId, transQty, calledFromWeb ? true : _lockMaxQtyCheck) : #emptyStr;
# if (mustConvertQty(_showUsrDialog, _lockMaxQtyCheck, maxQtyDialogStr))
# {
# transQty = UnitConvert::qty(_inventItemOrderSetupMap.highestQty(),
# unitID,
# _transUnitId,
# _inventItemOrderSetupMap.ItemId);
# }
# }
#
#
# if (_inventItemOrderSetupMap.multipleQty())
# {
# numOfRoundedUp = round((transQty * unitConvert) + _inventItemOrderSetupMap.multipleQty() / 2.00001, _inventItemOrderSetupMap.multipleQty());
# if (numOfRoundedUp != decround((transQty * unitConvert),10) && transQty != UnitConvert::qty(numOfRoundedUp, unitID, _transUnitId, _inventItemOrderSetupMap.ItemId))
# {
# multipleDialogStr = _showUsrDialog ? InventTable::buildMultipleDialogStr(_inventItemOrderSetupMap, unitID, _transUnitId, transQty, numOfRoundedUp, calledFromWeb ? true : _lockMultipleCheck, !calledFromWeb) : #emptyStr;
# if(mustConvertQty(_showUsrDialog, _lockMultipleCheck, multipleDialogStr))
# {
# transQty = UnitConvert::qty(numOfRoundedUp,
# unitID,
# _transUnitId,
# _inventItemOrderSetupMap.ItemId);
# }
# }
# }
#
# transQty = decround(transQty,Unit::decimals(_transUnitId));
# }
#
# return transQty;
#}
ENDSOURCE
SOURCE #showItemSiteAndItemDim
#static str showItemSiteAndItemDim(
# ItemId _itemId,
# InventDim _inventDim,
# InventSiteId _newSiteId
# )
#{
# InventDim inventDim;
# str preFix;
# ;
#
# inventDim.data(_inventDim);
# inventDim.InventSiteId = _newSiteId;
# inventDim.clearNotSiteAndItemDim(InventTable::find(_itemId).DimGroupId);
#
# preFix = inventDim.preFix();
# return (prefix) ? strfmt("%1 %2",_itemId, preFix) : strfmt("%1",_itemId);
#
#
#}
ENDSOURCE
SOURCE #txtNotExist
#static TxtNotExist txtNotExist()
#{
# return "@SYS10752";
#}
ENDSOURCE
SOURCE #unitConvert
#static Qty unitConvert(ItemId itemId,
# UnitID unitFrom,
# UnitID unitTo,
# UnitID unitInvent,
# Qty valueFrom = 1)
#{
# InventQty inventQty;
# ;
#
# if (unitFrom != unitTo)
# {
# inventQty = UnitConvert::qty(valueFrom, unitFrom, unitInvent, itemId);
#
# return UnitConvert::qty(inventQty, unitInvent, unitTo, itemId);
# }
#
# return valueFrom;
#}
ENDSOURCE
SOURCE #unitConvertValue
#static real unitConvertValue( ItemId itemId,
# UnitID unitFrom,
# UnitID unitTo,
# UnitID unitInvent,
# real valueFrom)
#{
# real inventValue;
# ;
#
# if (unitFrom != unitTo)
# {
# inventValue = UnitConvert::valueConvert(valueFrom, unitFrom, unitInvent, itemId, false);
#
# return UnitConvert::valueConvert(inventValue, unitInvent, unitTo, itemId, false);
# }
#
# return valueFrom;
#}
#
ENDSOURCE
SOURCE #updateAutoSalesPrice
#server static void updateAutoSalesPrice(ItemId itemId, PriceDate priceDate = systemdateget())
#{
# InventTable inventTable = InventTable::find(itemId);
# InventTableModule inventTableSales;
# InventTableModule inventTableBasic;
# ;
#
# if (inventTable.SalesModel == SalesPriceModel::None)
# return;
#
# inventTableSales = InventTableModule::find(itemId,ModuleInventPurchSales::Sales,true);
# if (priceDate < inventTableSales.PriceDate)
# return;
#
# if (inventTable.SalesPriceModelBasic == SalesPriceModelBasic::PurchPrice)
# inventTableBasic = InventTableModule::find(itemId,ModuleInventPurchSales::Purch);
# else
# inventTableBasic = InventTableModule::find(itemId,ModuleInventPurchSales::Invent);
#
# if (! inventTableSales || ! inventTableBasic)
# return;
#
# inventTableSales.calcSalesPrice(inventTable, inventTableBasic);
# inventTableSales.update();
#}
ENDSOURCE
SOURCE #webLookupItemId
#client static void webLookupItemId(
# boolean showConfigurator = true,
# boolean showExternalItem = false
# )
#{
# webTableLookup webTableLookup;
# Query query;
# QueryBuildDataSource queryBDSInventTable;
# QueryBuildDataSource queryBDSInventProductGroupItem;
# QueryBuildDataSource queryBDSInventTxt;
# QueryBuildDataSource queryBDSCustVendExternalItem;
#
#
# WebSession webSession = new WebSession();
#;
#
# webTableLookup = webTableLookup::newParameters(tablenum(InventTable));
# webTableLookup.addLookupfield(fieldnum(InventTable, ItemId));
# webTableLookup.selectField(fieldnum(InventTable, ItemId));
#
# query = new Query();
# queryBDSInventTable = query.addDataSource(tablenum(InventTable));
#
# if (EP::isCustomer())
# {
# queryBDSInventTable.orderMode(OrderMode::GroupBy);
# queryBDSInventTable.addSortField(fieldnum(InventTable,ItemId));
#
# queryBDSInventProductGroupItem = queryBDSInventTable.addDataSource(tablenum(InventProductGroupItem));
# queryBDSInventProductGroupItem.joinMode(JoinMode::InnerJoin);
# queryBDSInventProductGroupItem.relations(true);
# queryBDSInventProductGroupItem.orderMode(OrderMode::GroupBy);
# queryBDSInventProductGroupItem.addSortField(fieldnum(InventProductGroupItem,ItemId));
#
# queryBDSInventTxt = queryBDSInventProductGroupItem.addDataSource(tablenum(InventTxt));
# queryBDSInventTxt.joinMode(JoinMode::OuterJoin);
# queryBDSInventTxt.relations(false);
# queryBDSInventTxt.addLink(fieldnum(InventProductGroupItem,ItemId),fieldnum(InventTxt,ItemId));
# queryBDSInventTxt.orderMode(OrderMode::GroupBy);
# queryBDSInventTxt.addSortField(fieldnum(InventTxt,ItemId));
# queryBDSInventTxt.addSortField(fieldnum(InventTxt,InventDimId));
# queryBDSInventTxt.addSortField(fieldnum(InventTxt,Txt));
#
# queryBDSInventTxt.addRange(fieldnum(InventTxt, LanguageId)).value(webSession.language());
# queryBDSInventTxt.addRange(fieldnum(InventTxt, InventDimId)).value(InventDim::inventDimIdBlank());
#
# showConfigurator = false;
# showExternalItem = false;
#
# webTableLookup.addLookupfield(fieldnum(InventTxt, Txt),false,tablenum(InventTxt));
# }
#
#
# if (showConfigurator && !showExternalItem)
# {
# queryBDSInventTxt = queryBDSInventTable.addDataSource(tablenum(InventTxt));
# queryBDSInventTxt.joinMode(JoinMode::OuterJoin);
# queryBDSInventTxt.relations(false);
# queryBDSInventTxt.addLink(fieldnum(InventTable,ItemId),fieldnum(InventTxt,ItemId));
#
# queryBDSInventTxt.addRange(fieldnum(InventTxt, LanguageId)).value(webSession.language());
# queryBDSInventTxt.addRange(fieldnum(InventTxt, InventDimId)).value(InventDim::inventDimIdBlank());
#
# webTableLookup.addLookupfield(fieldnum(InventTxt, Txt),false,tablenum(InventTxt));
#/*
# queryBDSInventTable.orderMode(OrderMode::GroupBy);
# queryBDSInventTable.addSortField(fieldNum(InventTable,ItemId));
#
# queryBDSConfigTable = queryBDSInventTable.addDataSource(tableNum(configTable));
# queryBDSConfigTable.joinMode(JoinMode::OuterJoin);
# queryBDSConfigTable.relations(true);
# queryBDSConfigTable.orderMode(OrderMode::GroupBy);
# queryBDSConfigTable.addSortField(fieldNum(ConfigTable,ItemId));
# queryBDSConfigTable.addSortField(fieldNum(ConfigTable,ConfigId));
# queryBDSConfigTable.addSortField(fieldNum(ConfigTable,Name));
#
# queryBDSInventTxt = queryBDSConfigTable.addDataSource(tableNum(InventTxt));
# queryBDSInventTxt.joinMode(joinmode::OuterJoin);
# queryBDSInventTxt.relations(false);
# queryBDSInventTxt.addLink(fieldNum(ConfigTable,ItemId),fieldNum(InventTxt,ItemId));
# queryBDSInventTxt.orderMode(OrderMode::GroupBy);
# queryBDSInventTxt.addSortField(fieldNum(InventTxt,ItemId));
# queryBDSInventTxt.addSortField(fieldNum(InventTxt,InventDimId));
# queryBDSInventTxt.addSortField(fieldNum(InventTxt,Txt));
#
# queryBDSInventTxt.addRange(fieldNum(InventTxt, LanguageId)).value(webSession.language());
# queryBDSInventTxt.addRange(fieldNum(InventTxt, InventDimId)).value(InventDim::inventDimIdBlank());
#
# webTableLookup.addLookupfield(fieldNum(configTable, ConfigId),false,tableNum(configTable));
# webTableLookup.addLookupfield(fieldNum(InventTxt, Txt),false,tableNum(InventTxt));
#*/
# }
# if (showExternalItem)
# {
# queryBDSCustVendExternalItem = queryBDSInventTable.addDataSource(tablenum(CustVendExternalItem));
# queryBDSCustVendExternalItem.joinMode(JoinMode::OuterJoin);
#
# if (EP::isVendor())
# {
# queryBDSCustVendExternalItem.addRange(fieldnum(CustVendExternalItem,ModuleType)).value(SysQuery::value(ModuleInventPurchSalesVendCustGroup::Vend));
# queryBDSCustVendExternalItem.addRange(fieldnum(CustVendExternalItem,CustVendRelation)).value(SysQuery::value(SysCompanyUserInfo::current().VendAccount));
# }
#
# if (EP::isCustomer())
# {
# queryBDSCustVendExternalItem.addRange(fieldnum(CustVendExternalItem,ModuleType)).value(SysQuery::value(ModuleInventPurchSalesVendCustGroup::Cust));
# queryBDSCustVendExternalItem.addRange(fieldnum(CustVendExternalItem,CustVendRelation)).value(SysQuery::value(SysCompanyUserInfo::current().CustAccount));
#
# }
#
# queryBDSCustVendExternalItem.relations(true);
#
# webTableLookup.addLookupfield(fieldnum(InventTable, ItemName));
# webTableLookup.addLookupfield(fieldnum(CustVendExternalItem, ExternalItemTxt), false, tablenum(CustVendExternalItem));
# }
#
# if (EP::isVendor())
# {
# query = EPQuery::makeMyVendorSelfServiceQuery(query,tablenum(InventTable));
# }
#
#/* if (EP::isCustomer())
# {
# query = EPQuery::makeMyCustomerSelfServiceQuery(query,tableNum(InventTable));
# debug::printDebug(query.dataSourceNo(1).toString());
# }*/
#
# webTableLookup.parmQuery(query);
#
#
# webTableLookup.run();
#}
#
ENDSOURCE
SOURCE #webLookupItemIdQuery
#///
#/// Creates query object used in the enterprise portal
#/// adds ranges based on custmor or vendor user
#///
#///
#/// Filter out external items (default)
#///
#///
#/// Query object
#///
#///
#/// EP
#///
#public static Query webLookupItemIdQuery(boolean _showExternalItem=false)
#{
# webTableLookup webTableLookup;
# Query query;
# QueryBuildDataSource queryBDSInventTable;
# QueryBuildDataSource queryBDSInventProductGroupItem;
# QueryBuildDataSource queryBDSInventProductGroup;
# QueryBuildDataSource queryBDSInventTxt;
# QueryBuildDataSource queryBDSCustVendExternalItem;
# WebSession webSession = new WebSession();
# ;
#
# query = new Query();
# queryBDSInventTable = query.addDataSource(tablenum(InventTable));
#
# if (EP::isCustomer())
# {
# queryBDSInventTable.orderMode(OrderMode::GroupBy);
# queryBDSInventTable.addSortField(fieldnum(InventTable,ItemId));
# queryBDSInventTable.addSortField(fieldnum(InventTable,ItemName));
#
# queryBDSInventProductGroupItem = queryBDSInventTable.addDataSource(tablenum(InventProductGroupItem));
# queryBDSInventProductGroupItem.joinMode(JoinMode::InnerJoin);
# queryBDSInventProductGroupItem.relations(true);
# queryBDSInventProductGroupItem.orderMode(OrderMode::GroupBy);
# queryBDSInventProductGroupItem.addSortField(fieldnum(InventProductGroupItem,ItemId));
#
# queryBDSInventProductGroup = queryBDSInventProductGroupItem.addDataSource(tablenum(InventProductGroup));
# queryBDSInventProductGroup.relations(true);
# queryBDSInventProductGroup.joinMode(JoinMode::ExistsJoin);
# queryBDSInventProductGroup.addRange(fieldnum(InventProductGroup,Module)).value(queryValue(ModuleSalesPurch::Sales));
# queryBDSInventProductGroup.fetchMode(0);
#
# queryBDSInventTxt = queryBDSInventProductGroupItem.addDataSource(tablenum(InventTxt));
# queryBDSInventTxt.joinMode(JoinMode::OuterJoin);
# queryBDSInventTxt.relations(false);
# queryBDSInventTxt.addLink(fieldnum(InventProductGroupItem,ItemId),fieldnum(InventTxt,ItemId));
# queryBDSInventTxt.orderMode(OrderMode::GroupBy);
# queryBDSInventTxt.addSortField(fieldnum(InventTxt,ItemId));
# queryBDSInventTxt.addSortField(fieldnum(InventTxt,InventDimId));
# queryBDSInventTxt.addSortField(fieldnum(InventTxt,Txt));
# queryBDSInventTxt.fetchMode(0);
#
# queryBDSInventTxt.addRange(fieldnum(InventTxt, LanguageId)).value(webSession.language());
# queryBDSInventTxt.addRange(fieldnum(InventTxt, InventDimId)).value(InventDim::inventDimIdBlank());
#
# _showExternalItem = false;
# }
#
# if (_showExternalItem)
# {
# queryBDSCustVendExternalItem = queryBDSInventTable.addDataSource(tablenum(CustVendExternalItem));
# queryBDSCustVendExternalItem.joinMode(JoinMode::OuterJoin);
#
# if (EP::isVendor())
# {
# queryBDSCustVendExternalItem.addRange(fieldnum(CustVendExternalItem,ModuleType)).value(SysQuery::value(ModuleInventPurchSalesVendCustGroup::Vend));
# queryBDSCustVendExternalItem.addRange(fieldnum(CustVendExternalItem,CustVendRelation)).value(SysQuery::value(SysCompanyUserInfo::current().VendAccount));
# }
#
# queryBDSCustVendExternalItem.relations(true);
#
# webTableLookup = webTableLookup::newParameters(tablenum(InventTable));
# webTableLookup.addLookupfield(fieldnum(InventTable, ItemName));
# webTableLookup.addLookupfield(fieldnum(CustVendExternalItem, ExternalItemTxt), false, tablenum(CustVendExternalItem));
# }
#
# if (EP::isVendor())
# {
# query = EPQuery::makeMyVendorSelfServiceQuery(query,tablenum(InventTable));
# }
#
# return query;
#}
#
ENDSOURCE
SOURCE #WMSPalletTypeId
#static WMSPalletTypeId wmsPalletTypeId(ItemId _itemId)
#{
# WMSPalletTypeId wmsPalletTypeId = InventTable::find(_itemId).wmsPalletTypeId;
# if (!wmsPalletTypeId)
# wmsPalletTypeId = WMSParameters::find().DefaultPalletTypeId;
# return wmsPalletTypeId;
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : Dimensions unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #Dimensions
Id 91
PROPERTIES
Name #Dimensions
Label #@SYS5951
FormRef #Dimensions
TitleField1 #Num
TitleField2 #Description
SecurityKey #Basic
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Main
PrimaryIndex #DimensionIdx
ClusterIndex #DimensionIdx
AnalysisVisibility #High
DeveloperDocumentation #@SYS127050
ENDPROPERTIES
FIELDS
FIELD #Description
Id 1
STRING
PROPERTIES
Name #Description
HelpText #@SYS16063
Table #Dimensions
ExtendedDataType
ARRAY
#Description
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #Num
Id 2
STRING
PROPERTIES
Name #Num
HelpText #@SYS28177
Mandatory #Yes
AllowEdit #No
Table #Dimensions
ExtendedDataType
ARRAY
#SysDim
#
ENDARRAY
ENDPROPERTIES
FIELD #DimensionCode
Id 3
ENUM
PROPERTIES
Name #DimensionCode
AllowEdit #No
Table #Dimensions
ExtendedDataType
ARRAY
#DimensionCode
#
ENDARRAY
EnumType #SysDimension
ENDPROPERTIES
FIELD #InCharge
Id 4
STRING
PROPERTIES
Name #InCharge
Table #Dimensions
ExtendedDataType
ARRAY
#EmplId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CompanyGroup
Id 5
STRING
PROPERTIES
Name #CompanyGroup
Table #Dimensions
ExtendedDataType
ARRAY
#DimensionExt
#
ENDARRAY
ENDPROPERTIES
FIELD #Closed
Id 7
ENUM
PROPERTIES
Name #Closed
Label #@SYS14403
HelpText #@SYS79474
Table #Dimensions
ExtendedDataType
ARRAY
#NoYesId
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ReverseSign
Id 8
ENUM
PROPERTIES
Name #ReverseSign
Label #@SYS9896
HelpText #@SYS13378
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
FIELD #Column
Id 9
INT
PROPERTIES
Name #Column
HelpText #@SYS22753
Table #Dimensions
ExtendedDataType
ARRAY
#Column
#
ENDARRAY
ENDPROPERTIES
FIELD #BoldTypeface
Id 10
ENUM
PROPERTIES
Name #BoldTypeface
Label #@SYS4067
HelpText #@SYS24325
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
FIELD #Italic
Id 11
ENUM
PROPERTIES
Name #Italic
Label #@SYS12327
HelpText #@SYS24326
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
FIELD #LineExceed
Id 12
ENUM
PROPERTIES
Name #LineExceed
Label #@SYS24331
HelpText #@SYS24329
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
FIELD #LineSub
Id 13
ENUM
PROPERTIES
Name #LineSub
Label #@SYS24332
HelpText #@SYS24330
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
FIELD #UnderLineTxt
Id 14
ENUM
PROPERTIES
Name #UnderLineTxt
Label #@SYS24334
HelpText #@SYS24327
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
FIELD #UnderlineNumerals
Id 15
ENUM
PROPERTIES
Name #UnderlineNumerals
Label #@SYS24333
HelpText #@SYS24328
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
FIELD #COSBlockPostCost
Id 17
ENUM
PROPERTIES
Name #COSBlockPostCost
Label #@SYS35529
HelpText #@SYS73344
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
FIELD #COSBlockPostWork
Id 18
ENUM
PROPERTIES
Name #COSBlockPostWork
Label #@SYS35528
HelpText #@SYS73344
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
FIELD #COSValidFrom
Id 19
DATE
PROPERTIES
Name #COSValidFrom
Label #@SYS35161
HelpText #@SYS35444
ConfigurationKey #COSBaseModule
Table #Dimensions
ExtendedDataType
ARRAY
#TransDate
#
ENDARRAY
ENDPROPERTIES
FIELD #COSValidUntil
Id 20
DATE
PROPERTIES
Name #COSValidUntil
Label #@SYS35063
HelpText #@SYS35445
ConfigurationKey #COSBaseModule
Table #Dimensions
ExtendedDataType
ARRAY
#TransDate
#
ENDARRAY
ENDPROPERTIES
FIELD #COSBlockDistribution
Id 21
ENUM
PROPERTIES
Name #COSBlockDistribution
Label #@SYS35530
HelpText #@SYS73344
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
FIELD #COSBlockAllocation
Id 22
ENUM
PROPERTIES
Name #COSBlockAllocation
Label #@SYS35531
HelpText #@SYS73344
Table #Dimensions
EnumType #NoYes
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#DimensionCode
#Num
#Description
#InCharge
#CompanyGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #Administration
PROPERTIES
Name #Administration
Label #@SYS9853
ENDPROPERTIES
GROUPFIELDS
#Closed
#InCharge
#CompanyGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #COSTransControl
PROPERTIES
Name #COSTransControl
Label #@SYS35052
ENDPROPERTIES
GROUPFIELDS
#COSBlockPostCost
#COSBlockPostWork
#COSBlockDistribution
#COSBlockAllocation
ENDGROUPFIELDS
ENDGROUP
GROUP #COSValidity
PROPERTIES
Name #COSValidity
Label #@SYS35164
ENDPROPERTIES
GROUPFIELDS
#COSValidFrom
#COSValidUntil
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#Num
#DimensionCode
ENDGROUPFIELDS
ENDGROUP
GROUP #Name
PROPERTIES
Name #Name
Label #@SYS7399
ENDPROPERTIES
GROUPFIELDS
#Description
ENDGROUPFIELDS
ENDGROUP
GROUP #Overview
PROPERTIES
Name #Overview
Label #@SYS9039
ENDPROPERTIES
GROUPFIELDS
#DimensionCode
#Num
#Description
#InCharge
#CompanyGroup
#Closed
ENDGROUPFIELDS
ENDGROUP
GROUP #SpecialReport
PROPERTIES
Name #SpecialReport
Label #@SYS10223
ENDPROPERTIES
GROUPFIELDS
#ReverseSign
#Column
#BoldTypeface
#Italic
#LineExceed
#LineSub
#UnderLineTxt
#UnderlineNumerals
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#DimensionIdx
Id 1
PROPERTIES
Name #DimensionIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#DimensionCode
#Num
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #Num
PROPERTIES
Name #Num
Table #Dimensions
EntityRelationshipRole #@SYS127010
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DimensionCode
RelatedField #DimensionCode
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #Num
RelatedField #Num
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #delete
#public void delete()
#{
# #avifiles
# #DEFINE.NUMBER_OF_STEPS(4)
# DimensionSetCombination dimensionSetCombination;
# DimensionSetCombinationValidated dimensionSetCombinationValidated;
# RunbaseProgress progress;
# ;
#
# // Only setup progress display if coming from a form
# if (this.isFormDataSource())
# {
# progress = RunbaseProgress::construct(#NUMBER_OF_STEPS, null);
# progress.setTotal(#NUMBER_OF_STEPS);
# progress.setAnimation(#AviFileDel);
# progress.setCaption("@SYS4195");
# }
#
# // Check for budget records with dimension
# if (progress)
# {
# progress.incCount();
# progress.setText(strfmt("@SYS113134", tablepname(LedgerBudget)));
# progress.update(true);
# }
# if (LedgerBudget::existDimension(this))
# {
# checkFailed(strfmt("@SYS75284", tablepname(LedgerBudget)));
#
# // An exception (verses a simple return) prevents the record on the UX (scrolling window) from being deleted.
# throw Exception::Error;
# }
#
# // Check for posted journals with dimension
# if (progress)
# {
# progress.incCount();
# progress.setText(strfmt("@SYS113134", tablepname(LedgerTrans)));
# progress.update(true);
# }
# if (LedgerTrans::existDimension(this))
# {
# checkFailed(strfmt("@SYS75284", tablepname(LedgerTrans)));
#
# // An exception (verses a simple return) prevents the record on the UX (scrolling window) from being deleted.
# throw Exception::Error;
# }
#
# ttsbegin;
#
# if (!this.isTmp())
# {
# // Delete records from DimensionSetCombination
# if (progress)
# {
# progress.incCount();
# progress.setText(strfmt("@SYS113135", tablepname(DimensionSetCombination)));
# progress.update(true);
# }
# delete_from dimensionSetCombination
# where dimensionSetCombination.Dimension[Dimensions::code2ArrayIdx(this.DimensionCode)] == this.Num;
#
#
# // Delete records from DimensionSetCombinationValidated
# if (progress)
# {
# progress.incCount();
# progress.setText(strfmt("@SYS113135", tablepname(DimensionSetCombinationValidated)));
# progress.update(true);
# }
# delete_from dimensionSetCombinationValidated
# where dimensionSetCombinationValidated.Dimension[Dimensions::code2ArrayIdx(this.DimensionCode)] == this.Num;
# }
#
# super();
#
# ttscommit;
#}
ENDSOURCE
SOURCE #renamePrimaryKey
#public void renamePrimaryKey()
#{
# boolean isVirtual;
# DataArea company;
# Dimensions originalDimensions;
# LedgerJournalTrans ledgerJournalTrans;
# VirtualDataAreaList virtualCompanies;
# container concreteCompanies;
# int concreteCompanyCount;
# CompanyId outerCompany;
# int innerLoopCounter;
# CompanyId innerCompany;
# ;
#
# // Capture the renamed record
# originalDimensions = this.orig();
#
# super();
#
# select firstonly company where company.Id == this.DataAreaId;
# isVirtual = company.IsVirtual;
#
# if (isVirtual)
# {
# // Dimension is in a virtual company
#
# // Capture the concrete companies that are part of the dimension's virtual company
# while select virtualCompanies where virtualCompanies.VirtualDataArea == this.DataAreaId
# {
# concreteCompanies += virtualCompanies.Id;
# }
#
# concreteCompanyCount = conlen(concreteCompanies);
#
# if (isConfigurationkeyEnabled(configurationkeynum(LedgerAdvIntercompanyAccounting)))
# {
# // Intercompany is enabled - need to loop over all concrete companies
# while select company
# where company.IsVirtual == false
# {
# outerCompany = company.Id;
#
# // Update related records for each concrete company
# changecompany(outerCompany)
# {
# // Reset the ledgerJournalTrans
# ledgerJournalTrans = null;
# ledgerJournalTrans.skipDataMethods(true);
#
# // Loop over concrete companies in the virtual company
# for (innerLoopCounter = 1; innerLoopCounter <= concreteCompanyCount; innerLoopCounter++)
# {
# innerCompany = conpeek(concreteCompanies, innerLoopCounter);
#
# switch (originalDimensions.DimensionCode)
# {
# case SysDimension::Department:
# // Update records with this dimension on primary company
# update_recordset ledgerJournalTrans
# setting Dimension[1] = this.Num
# where ledgerJournalTrans.Company == innerCompany &&
# ledgerJournalTrans.Dimension[1] == originalDimensions.Num;
#
# // Update records with this dimension as intercompany
# update_recordset ledgerJournalTrans
# setting InterCoDimension[1] = this.Num
# where ledgerJournalTrans.OffsetCompany == innerCompany &&
# ledgerJournalTrans.InterCoDimension[1] == originalDimensions.Num;
# break;
#
# case SysDimension::Center:
# // Update records with this dimension on primary company
# update_recordset ledgerJournalTrans
# setting Dimension[2] = this.Num
# where ledgerJournalTrans.Company == innerCompany &&
# ledgerJournalTrans.Dimension[2] == originalDimensions.Num;
#
# // Update records with this dimension as intercompany
# update_recordset ledgerJournalTrans
# setting InterCoDimension[2] = this.Num
# where ledgerJournalTrans.OffsetCompany == innerCompany &&
# ledgerJournalTrans.InterCoDimension[2] == originalDimensions.Num;
# break;
#
# case SysDimension::Purpose:
# // Update records with this dimension on primary company
# update_recordset ledgerJournalTrans
# setting Dimension[3] = this.Num
# where ledgerJournalTrans.Company == innerCompany &&
# ledgerJournalTrans.Dimension[3] == originalDimensions.Num;
#
# // Update records with this dimension as intercompany
# update_recordset ledgerJournalTrans
# setting InterCoDimension[3] = this.Num
# where ledgerJournalTrans.OffsetCompany == innerCompany &&
# ledgerJournalTrans.InterCoDimension[3] == originalDimensions.Num;
# break;
#
# default:
# break;
# }
# }
# }
# }
# }
# else
# {
# // Intercompany is disabled - need to loop over concrete companies in the virtual company
# for (innerLoopCounter = 1; innerLoopCounter <= concreteCompanyCount; innerLoopCounter++)
# {
# innerCompany = conpeek(concreteCompanies, innerLoopCounter);
#
# changecompany(innerCompany)
# {
# // Reset the ledgerJournalTrans
# ledgerJournalTrans = null;
# ledgerJournalTrans.skipDataMethods(true);
#
# // Update records with this dimension on primary company
# switch (originalDimensions.DimensionCode)
# {
# case SysDimension::Department:
# update_recordset ledgerJournalTrans
# setting Dimension[1] = this.Num
# where ledgerJournalTrans.Company == innerCompany &&
# ledgerJournalTrans.Dimension[1] == originalDimensions.Num;
# break;
#
# case SysDimension::Center:
# update_recordset ledgerJournalTrans
# setting Dimension[2] = this.Num
# where ledgerJournalTrans.Company == innerCompany &&
# ledgerJournalTrans.Dimension[2] == originalDimensions.Num;
# break;
#
# case SysDimension::Purpose:
# update_recordset ledgerJournalTrans
# setting Dimension[3] = this.Num
# where ledgerJournalTrans.Company == innerCompany &&
# ledgerJournalTrans.Dimension[3] == originalDimensions.Num;
# break;
#
# default:
# break;
# }
# }
# }
# }
# }
# else
# {
# // Dimension that is being updated is not in a virtual company
# // If intercompany is enabled, must update the intercompany transactions for all other companies
# if (isConfigurationkeyEnabled(configurationkeynum(LedgerAdvIntercompanyAccounting)))
# {
# while select company
# where company.IsVirtual == false
# {
# outerCompany = company.Id;
#
# // Update related records for each concrete company
# changecompany(outerCompany)
# {
# // Reset the ledgerJournalTrans
# ledgerJournalTrans = null;
# ledgerJournalTrans.skipDataMethods(true);
#
# // Update records with this dimension on primary company
# switch (originalDimensions.DimensionCode)
# {
# case SysDimension::Department:
# update_recordset ledgerJournalTrans
# setting Dimension[1] = this.Num
# where ledgerJournalTrans.Company == originalDimensions.DataAreaId &&
# ledgerJournalTrans.Dimension[1] == originalDimensions.Num;
# break;
#
# case SysDimension::Center:
# update_recordset ledgerJournalTrans
# setting Dimension[2] = this.Num
# where ledgerJournalTrans.Company == originalDimensions.DataAreaId &&
# ledgerJournalTrans.Dimension[2] == originalDimensions.Num;
# break;
#
# case SysDimension::Purpose:
# update_recordset ledgerJournalTrans
# setting Dimension[3] = this.Num
# where ledgerJournalTrans.Company == originalDimensions.DataAreaId &&
# ledgerJournalTrans.Dimension[3] == originalDimensions.Num;
# break;
#
# default:
# break;
# }
# }
# }
# }
# }
#}
ENDSOURCE
SOURCE #tooltipRecord
#str toolTipRecord()
#{
# ;
# return strfmt('%1, ', this.DimensionCode) + super();
#}
ENDSOURCE
SOURCE #update
#public void update()
#{
# DimensionSetCombination dimensionSetCombination;
# ;
#
# ttsbegin;
#
# if (this.Closed != this.orig().Closed)
# {
# update_recordset dimensionSetCombination
# setting active = !this.Closed
# where dimensionSetCombination.Dimension[Dimensions::code2ArrayIdx(this.DimensionCode)] == this.Num;
# }
#
# super();
#
# ttscommit;
#}
ENDSOURCE
SOURCE #validateWrite
#public boolean validateWrite()
#{
# boolean ret = super();
# ;
#
# if(ret && this.cosValidFrom && this.cosValidUntil && this.cosValidFrom > this.cosValidUntil)
# {
# error("@SYS35812");
# ret = false;
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #applyFixedDimension
#///
#/// Applies ledger account fixed dimension values to the dimension.
#///
#///
#/// The dimension to which fixed dimension values are applied.
#///
#///
#/// The ledger account for which to retrieve fixed dimension values.
#///
#///
#/// Dimension with fixed dimension values.
#///
#///
#/// If dimension set rule is not activated, ledger account fixed dimension values are retrieved
#/// from the mandatory dimension in the ledger table; otherwise, they are retrieved from the
#/// dimension set rule table.
#///
#public static Dimension applyFixedDimension(Dimension _dimension, LedgerAccount _accountNum)
#{
# LedgerTable ledgerTable;
# DimensionSetCaller dimensionSetCaller;
# DimensionSetRuleSearch dimensionSetRuleSearch;
# DimensionSetRuleTable dimensionSetRule;
# Dimension dimensionWithFixedDimensionValues = _dimension;
# ;
#
# ledgerTable = LedgerTable::find(_accountNum);
#
# if (ledgerTable.RecId != 0)
# {
# if (LedgerParameters::find().DimensionSetActive == DimensionSetActive::None)
# {
# dimensionWithFixedDimensionValues = ledgerTable.initLedgerTableDimension(_dimension);
# }
# else
# {
# dimensionSetCaller = DimensionSetCaller::construct(ledgerTable);
# dimensionSetRuleSearch = DimensionSetRuleSearch::newDimensionSetCaller(dimensionSetCaller);
#
# if (dimensionSetRuleSearch.next())
# {
# // There can only be one dimension set rule for a particular ledger account.
# dimensionSetRule = dimensionSetRuleSearch.dimensionSetRuleTable();
# dimensionWithFixedDimensionValues = dimensionSetRule.applyFixedDimension(_dimension);
# }
# }
# }
#
# return dimensionWithFixedDimensionValues;
#}
ENDSOURCE
SOURCE #arrayIdx2Code
#///
#/// Converts an array index of a dimension to the dimension code.
#///
#///
#/// An integer that indicates the dimension array index.
#///
#///
#/// An integer that is the dimension code.
#///
#///
#/// This method takes the value of the SysDimension enumeration into account, because a possible fourth dimension could have a value of 100 and not 3 as expected.
#///
#public static int arrayIdx2Code(int _idx)
#{
# DictEnum dictEnum = new DictEnum(enumnum(SysDimension));
# ;
#
# return dictEnum.index2Value(_idx - 1);
#}
ENDSOURCE
SOURCE #balanceDisplayCache
#public static server container balanceDisplayCache(
# SysDimension _dimensionCode,
# OperationsTax _balanceOperationsTax,
# TransDate _balanceFromDate,
# TransDate _balanceToDate,
# StartDate _balanceFiscalYear)
#{
# DimensionCriteria dimensionCriteria;
# TransDate balanceFromDate = _balanceFromDate;
# TransDate balanceToDate = _balanceToDate;
# LedgerBalanceDim_CurrentMST ledgerBalance;
# Map mapBalancePerDimCode;
# ;
#
# if (_balanceFiscalYear)
# {
# balanceFromDate = LedgerPeriod::findOpeningDate(_balanceFiscalYear);
# balanceToDate = LedgerPeriod::fiscalYearEnd(_balanceFiscalYear);
# }
#
# ledgerBalance = new LedgerBalanceDim_CurrentMST(Dimensions::code2ArrayIdx(_dimensionCode),
# balanceFromDate,
# balanceToDate,
# dimensionCriteria,
# NoYes::Yes,
# _balanceFiscalYear ? NoYes::Yes : NoYes::No,
# NoYes::Yes,
# _balanceOperationsTax,
# DebCredProposal::None,
# NoYes::Yes,
# NoYes::Yes);
#
# mapBalancePerDimCode = Map::create(ledgerBalance.balancePerDim().pack());
#
# return mapBalancePerDimCode.pack();
#}
ENDSOURCE
SOURCE #buildSelectable
#server static void buildSelectable(Dimensions dimensions,
# SysDimension sysDimension,
# selectableDataArea company,
# AccountNum accountNum,
# selectableDataArea offSetCompany,
# AccountNum offsetAccountNum)
#{
# Dimensions dimensionsTmp;
# Map accountMap = new Map(Types::String, Types::String);
# Map offsetMap = new Map(Types::String, Types::String);
# Map resultMap = new Map(Types::String, Types::String);
# MapIterator accountIterator;
# MapIterator resultIterator;
# ;
# if (accountNum)
# {
# changecompany(company)
# {
# LedgerTable::validDimensions(accountNum, sysDimension, accountMap);
# }
# }
#
# if (offsetAccountNum)
# {
# changecompany(offSetCompany)
# {
# LedgerTable::validDimensions(offsetAccountNum, sysDimension, offsetMap);
# }
# }
#
# if (accountNum && offsetAccountNum)
# {
# accountIterator = new MapIterator(accountMap);
# accountIterator.begin();
# while (accountIterator.more())
# {
# if (offsetMap.exists(accountIterator.domainValue()))
# {
# resultMap.insert(accountIterator.domainValue(), accountIterator.value());
# }
# accountIterator.next();
# }
# }
# else if (accountNum)
# {
# resultMap = accountMap;
# }
# else if (offsetAccountNum)
# {
# resultMap = offsetMap;
# }
# else
# {
# dimensionsTmp.recordLevelSecurity(true);
# while select dimensionsTmp
# where dimensionsTmp.DimensionCode == sysDimension
# {
# resultMap.insert(dimensionsTmp.Num, dimensionsTmp.Description);
# }
# }
#
# resultIterator = new MapIterator(resultMap);
# resultIterator.begin();
# while (resultIterator.more())
# {
# dimensions.Num = resultIterator.domainValue();
# dimensions.Description = resultIterator.value();
# dimensions.DimensionCode= sysDimension;
# dimensions.insert();
# resultIterator.next();
# }
#}
#
ENDSOURCE
SOURCE #buildSelectableDimSetHierarchy
#server static void buildSelectableDimSetHierarchy(Dimensions dimensions,
# SysDimension sysDimension,
# container packedDimensionCaller)
#
#{
# TmpDimensionEntry tmpDimensionEntry;
# Dimension prefixDimension;
# DimensionSetCaller dimensionSetCaller;
# DimensionSetCombinationSearch dimensionSetCombinationSearch;
# DimensionSetCombination dimensionSetCombination;
# Set usedDimensions;
# Set usedDimensionCodes;
# Dimensions allDimensions;
# DimensionSetId setId;
# DimensionSetId parentSetId;
#
# container packedRules;
# container packedSets;
#
# DimensionTopicsPrioritizer dimensionTopicsPrioritizer;
# DimensionTopic dimensionTopic;
#
# Set valueSet;
# Map setId2ValueMap = new Map(Types::String, Types::Class); // SetId -> valueSet
# Map parentSetId2ValueMap = new Map(Types::String, Types::Class); // parent SetId -> valueSet
# MapEnumerator mapEnumerator;
#
# Set resultValueSet = new Set(Types::String);
# SetEnumerator setEnumerator;
#
# boolean firstFound;
#
# Set allDimensionValuesSet = new Set(Types::String);
# ;
#
# dimensionSetCaller = new DimensionSetCaller();
# dimensionSetCaller.unpack(packedDimensionCaller);
#
# packedSets = DimensionSetSearch::dimensionTreePackSets(true, true);
# packedRules = DimensionSetRuleSearch::newDimensionSetCaller(dimensionSetCaller).pack();
#
# prefixDimension = dimensionSetCaller.getCallerDimension();
# prefixDimension[Dimensions::code2ArrayIdx(sysDimension)] = '';
# tmpDimensionEntry.setTmpData(TmpDimensionEntry::initEntry(packedSets, packedRules, prefixDimension));
#
# usedDimensions = new Set(Types::Container);
# usedDimensionCodes = new Set(Types::Enum);
#
# while select Num from allDimensions
# where allDimensions.DimensionCode == sysDimension
# {
# allDimensionValuesSet.add(allDimensions.Num);
# }
#
# while select tmpDimensionEntry
# {
# dimensionTopicsPrioritizer = DimensionTopicsPrioritizer::newDimensionSetId(tmpDimensionEntry.SetId);
#
# if (!dimensionTopicsPrioritizer)
# {
# throw error(Error::wrongUseOfFunction(funcname()));
# }
#
# dimensionTopic = dimensionTopicsPrioritizer.firstDimensionTopic();
#
# while (dimensionTopic)
# {
# if (dimensionTopic.parmTopicType() == DimensionTopicType::LedgerAccount)
# {
# throw error(Error::wrongUseOfFunction(funcname()));
# }
#
# usedDimensionCodes.add(Dimensions::arrayIdx2Code(dimensionTopic.parmExtendedTopicType()));
# dimensionTopic = dimensionTopicsPrioritizer.nextDimensionTopic(dimensionTopic);
# }
#
# dimensionSetCombinationSearch = new DimensionSetCombinationSearch(tmpDimensionEntry.SetId,
# tmpDimensionEntry.HierarchyId,
# sysDimension,
# true,
# true,
# tmpDimensionEntry.Dimension);
#
# dimensionSetCombinationSearch.init();
#
# while (dimensionSetCombinationSearch.next())
# {
# dimensionSetCombination = dimensionSetCombinationSearch.dimensionSetCombination();
#
# if (!setId2ValueMap.exists(dimensionSetCombination.SetId))
# {
# setId2ValueMap.insert(dimensionSetCombination.SetId, new Set(Types::String));
# }
#
# valueSet = setId2ValueMap.lookup(dimensionSetCombination.SetId);
# valueSet.add(dimensionSetCombination.Dimension[Dimensions::code2ArrayIdx(sysDimension)]);
# }
# }
#
# mapEnumerator = new MapEnumerator(setId2ValueMap);
# mapEnumerator.reset();
#
# while (mapEnumerator.moveNext())
# {
# setId = mapEnumerator.currentKey();
# parentSetId = DimensionSetTable::find(setId).ParentSetId;
#
# valueSet = mapEnumerator.currentValue();
#
# if (parentSetId2ValueMap.exists(parentSetId))
# {
# resultValueSet = parentSetId2ValueMap.lookup(parentSetId);
# }
# else
# {
# resultValueSet = new Set(Types::String);
# }
#
# resultValueSet = Set::union(resultValueSet, valueSet);
# parentSetId2ValueMap.insert(parentSetId, resultValueSet);
# }
#
# resultValueSet = new Set(Types::String);
#
# mapEnumerator = new MapEnumerator(parentSetId2ValueMap);
# mapEnumerator.reset();
#
# firstFound = false;
# while (mapEnumerator.moveNext())
# {
# valueSet = mapEnumerator.currentValue();
# resultValueSet = firstFound ? Set::intersection(resultValueSet, valueSet) : valueSet;
# firstFound = true;
# }
#
# setEnumerator = resultValueSet.getEnumerator();
# setEnumerator.reset();
#
# while (setEnumerator.moveNext())
# {
# dimensions.DimensionCode = sysDimension;
# dimensions.Num = any2str(setEnumerator.current());
# dimensions.Description = Dimensions::find(dimensions.DimensionCode, dimensions.Num).Description;
#
# if (!usedDimensions.in([dimensions.DimensionCode, dimensions.Num]))
# {
# usedDimensions.add([dimensions.DimensionCode, dimensions.Num]);
# dimensions.insert();
# }
# }
#
# if (!usedDimensionCodes.in(sysDimension))
# {
# while select allDimensions
# where allDimensions.DimensionCode == sysDimension
# {
# dimensions.DimensionCode = sysDimension;
# dimensions.Num = allDimensions.Num;
# dimensions.Description = allDimensions.Description;
# dimensions.insert();
# }
# }
#}
ENDSOURCE
SOURCE #buildSelectableDimSetHierarchyServer
#server static Dimensions buildSelectableDimSetHierarchyServer(SysDimension sysDimension,
# container packedDimensionCaller)
#
#{
# Dimensions dimensionsTmp;
# ;
#
# // BP deviation documented
# dimensionsTmp.setTmp();
# Dimensions::buildSelectableDimSetHierarchy(dimensionsTmp, sysDimension, packedDimensionCaller);
# return dimensionsTmp;
#}
ENDSOURCE
SOURCE #buildSelectableServer
#server static Dimensions buildSelectableServer(SysDimension _sysDimension,
# selectableDataArea _company,
# AccountNum _accountNum,
# selectableDataArea _offSetCompany,
# AccountNum _offsetAccountNum)
#{
# Dimensions dimensionsTmp;
# ;
# // BP deviation documented
# dimensionsTmp.setTmp();
# Dimensions::buildSelectable(dimensionsTmp, _sysDimension, _company, _accountNum, _offSetCompany, _offsetAccountNum);
# return dimensionsTmp;
#}
#
#
ENDSOURCE
SOURCE #checkDimension
#static boolean checkDimension(Dimension _dimension,
# boolean _checkForEmptyDimension = false,
# boolean _checkForBlockedDimension = true)
#{
# #LedgerJournalFaults
# Counter dimIdx;
# DimensionCode dimensionCode;
# Dimensions dimensions;
# boolean ok = true;
# ;
#
# for (dimIdx=1; dimIdx <= dimof(_dimension); dimIdx++)
# {
# if (_dimension[dimIdx])
# {
# dimensionCode = Dimensions::arrayIdx2Code(dimIdx);
# dimensions = Dimensions::find(dimensionCode, _dimension[dimIdx]);
# if (! dimensions.RecId)
# {
# ok = AifFault::checkFailedLogFault(strfmt("@SYS24602", enum2str(dimensionCode), _dimension[dimIdx]), #DimensionCodeDoesNotExist);
# }
# else
# {
# if (_checkForBlockedDimension && dimensions.Closed)
# {
# ok = AifFault::checkFailedLogFault(strfmt("@SYS79476", enum2str(dimensionCode), _dimension[dimIdx]), #DimensionCodeIsClosed);
# }
# }
# }
# else
# {
# if (_checkForEmptyDimension && LedgerParameters::find().DenyBlankDimensions)
# {
# dimensionCode = Dimensions::arrayIdx2Code(dimIdx);
# ok = AifFault::checkFailedLogFault(strfmt("@SYS79449", enum2str(dimensionCode)), #DimensionCodeIsRequired);
# }
# }
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #checkDimensionsLicense
#static boolean checkDimensionsLicense(
# int _numOfDimensions = Dimensions::numOfDimensions(),
# boolean _silent = true
# )
#{
# boolean ok;
# ;
#
# ok = _numOfDimensions <= Info::licensedDimensions();
#
# if (!ok && !_silent)
# Dimensions::errorAboutDimensionLicense();
#
# return ok;
#}
ENDSOURCE
SOURCE #checkExist
#public static boolean checkExist(SysDimension sysDimension, SysDim sysDim )
#{
# boolean ret = true;
# ;
#
# if (!Dimensions::exist(sysDimension, sysDim))
# {
# ret = checkFailed(strfmt(Dimensions::txtNotExist(), sysDimension, sysDim));
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #code2ArrayIdx
#///
#/// Converts a dimension code to the array index of the dimension.
#///
#///
#/// A SysDimension enumeration value.
#///
#///
#/// A dimension array index integer.
#///
#///
#/// This method takes the SysDimension value into account, because a possible fourth dimension could have the enumeration value of 100 and not 3 as expected.
#///
#public static int code2ArrayIdx(SysDimension _sysDimension)
#{
# SysDictEnum sysDictEnum;
# ;
#
# sysDictEnum = new SysDictEnum(enumnum(SysDimension));
#
# return sysDictEnum.value2Index(_sysDimension) + 1;
#}
ENDSOURCE
SOURCE #COSCheckValid
#public server static boolean cosCheckValid(DimensionCode _costCode,
# SysDim _costNum,
# COSDate _cosDate)
#{
# Dimensions dimensions;
# ;
# if (_cosDate)
# {
# dimensions = Dimensions::find(_costCode,_costNum);
# }
#
# return
# ((!_cosDate && dimensions) ||
# (_cosDate &&
# dimensions &&
# (!dimensions.cosValidFrom || dimensions.cosValidFrom <= _cosDate) &&
# (!dimensions.cosValidUntil || dimensions.cosValidUntil >= _cosDate)));
#}
ENDSOURCE
SOURCE #dimensionCodesSet
#public static Set dimensionCodesSet()
#{
# Set dimensionCodesSet;
# Dimension dimension;
# int x;
# ;
#
# dimensionCodesSet = new Set(Types::Enum);
#
# for (x = 1; x <= dimof(dimension); x++)
# {
# dimensionCodesSet.add(Dimensions::arrayIdx2Code(x));
# }
#
# return dimensionCodesSet;
#}
ENDSOURCE
SOURCE #dimensionKeep
#public static Dimension dimensionKeep(Set _keepDimensionCodes,
# Dimension _dimension)
#{
# int i;
# int numOfDimensions;
# Dimension keepDimension;
# ;
#
# numOfDimensions = dimof(_dimension);
#
# for (i = 1; i <= numOfDimensions; i++)
# {
# if (_keepDimensionCodes.in(Dimensions::arrayIdx2Code(i)))
# {
# keepDimension[i] = _dimension[i];
# }
# }
# return keepDimension;
#}
ENDSOURCE
SOURCE #dimensionsStaticTextString
#public static Delimiter dimensionsStaticTextString(DimensionsStaticTextString _text = DimensionsStaticTextString::Blank)
#{
# ;
# switch(_text)
# {
# case DimensionsStaticTextString::Blank:
# return ' ';
# case DimensionsStaticTextString::Dash:
# return '—';
# case DimensionsStaticTextString::BlankHyphenBlank:
# return ' - ';
# case DimensionsStaticTextString::Hyphen:
# return '-';
# case DimensionsStaticTextString::Separator:
# return '~';
# default:
# }
# return '';
#}
ENDSOURCE
SOURCE #emptyDimension
#///
#/// Returns an empty dimension type.
#///
#///
#/// An empty dimension array.
#///
#///
#/// Use this method in the cases where you would code the following:
#/// dimension = '';
#/// Do not use for time critical purposes, like a large update of many records. Instead put a variable in your method,
#/// declaring the empty dimension:
#/// Dimension emptyDimension;
#///
#static Dimension emptyDimension()
#{
# Dimension emptyDimension;
# ;
# return emptyDimension;
#}
ENDSOURCE
SOURCE #errorAboutDimensionLicense
#static void errorAboutDimensionLicense()
#{
# SysInfoAction_Formrun infoAction = SysInfoAction_Formrun::newFormname(formstr(SysLicenseCode));
# ;
#
# error(strfmt("@SYS89891", Info::licensedDimensions()), 'appldoc://Help Topics/AdminLicenseInfoSetup', infoAction);
#}
ENDSOURCE
SOURCE #exist
#public static boolean exist(SysDimension sysDimension, SysDim sysDim )
#{
# boolean found;
# ;
#
# found = (select firstonly
# RecId
# from
# dimensions
# where
# dimensions.DimensionCode == sysDimension &&
# dimensions.Num == sysDim).RecId != 0;
#
# return found;
#}
ENDSOURCE
SOURCE #find
#public static Dimensions find(
# SysDimension _sysDimension,
# SysDim _sysDim ,
# boolean _forupdate = false,
# ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
#{
# Dimensions dimensions;
# ;
#
# dimensions.selectForUpdate(_forupdate);
# if (_forupdate && _concurrencyModel != ConcurrencyModel::Auto)
# {
# dimensions.concurrencyModel(_concurrencyModel);
# }
#
# select firstonly
# dimensions
# where
# dimensions.DimensionCode == _sysDimension &&
# dimensions.Num == _sysDim;
#
# return dimensions;
#}
ENDSOURCE
SOURCE #findDimension
#static Dimension findDimension(Common primary,
# Common secondary,
# Dimension dimension = dimension)
#{
# ;
# return Dimensions::findDimensionByFieldId(
# primary,
# fieldname2id(primary.TableId, 'dimension'),
# secondary,
# fieldname2id(secondary.TableId, 'dimension'),
# dimension);
#}
ENDSOURCE
SOURCE #findDimensionByFieldId
#///
#/// Returns a dimension set merged from primary data source, secondary data sourcwe and passed dimension set.
#///
#///
#/// Primary data source.
#///
#///
#/// Primary data source dimension field Id.
#///
#///
#/// Secondary data source.
#///
#///
#/// Secondary data source dimension field Id.
#///
#///
#/// Default dimension
#///
#///
#/// Merged dimension set.
#///
#public static Dimension findDimensionByFieldId(Common primary,
# fieldId primaryFieldId,
# Common secondary,
# fieldId secondaryFieldId,
# Dimension dimension = dimension)
#{
# Dimension dimPrimary;
# Dimension dimSecondary;
# ;
#
# if (primaryFieldId)
# {
# dimPrimary = primary.(primaryFieldId);
# }
#
# if (secondaryFieldId)
# {
# dimSecondary = secondary.(secondaryFieldId);
# }
#
# dimension = Dimensions::mergeDimensions(dimPrimary, dimSecondary, dimension);
#
# return dimension;
#}
ENDSOURCE
SOURCE #findRecId
#static Dimensions findRecId(recId _recId, boolean _forUpdate = false)
#{
# Dimensions dimensions;
#
# if (_recId)
# {
# dimensions.selectForUpdate(_forUpdate);
#
# select firstonly dimensions
# index hint recId
# where dimensions.RecId == _recId;
# }
#
# return dimensions;
#}
#
ENDSOURCE
SOURCE #formDataSourceDimensionsAllowEdit
#///
#/// Sets the allowEdit property of the extended form data source fields for the dimension array.
#///
#///
#/// A form data source.
#///
#///
#/// The field ID of the dimension array field.
#///
#///
#/// An allow edit flag.
#///
#///
#/// A map with already extended field objects that are used for accessing a set of individual array fields from the array; optional.
#///
#client static void formDataSourceDimensionsAllowEdit(FormDataSource _formDataSource,
# fieldId _fieldId,
# boolean _allowEdit,
# Map _mapFieldObjects = null)
#{
# FormControl formControl;
# MapEnumerator mapEnumerator;
# ;
#
# if (_mapFieldObjects)
# {
# mapEnumerator = _mapFieldObjects.getEnumerator();
# }
# else
# {
# mapEnumerator = formDataSourceArrayFieldExtObjects(_formDataSource, _fieldId).getEnumerator();
# }
#
# while (mapEnumerator.moveNext())
# {
# formControl = mapEnumerator.currentValue();
# formControl.allowEdit(_allowEdit);
# }
#}
ENDSOURCE
SOURCE #mergeDimensionByCodes
#public static Dimension mergeDimensionByCodes(Set _primaryDimensionCodes,
# Set _secondaryDimensionCodes,
# Dimension _primaryDimension,
# Dimension _secondayDimension,
# boolean _useSecondaryIfNoPrimary = false)
#{
# Dimension mergedDimension;
# int dimensionArrayIdx;
# SetEnumerator primaryDimCodeEnumerator;
# SetEnumerator secondaryDimCodeEnumerator;
# ;
#
# primaryDimCodeEnumerator = _primaryDimensionCodes.getEnumerator();
#
# while (primaryDimCodeEnumerator.moveNext())
# {
# dimensionArrayIdx = Dimensions::code2ArrayIdx(primaryDimCodeEnumerator.current());
# mergedDimension[dimensionArrayIdx] = _primaryDimension[dimensionArrayIdx];
# }
#
# secondaryDimCodeEnumerator = _secondaryDimensionCodes.getEnumerator();
#
# while (secondaryDimCodeEnumerator.moveNext())
# {
# dimensionArrayIdx = Dimensions::code2ArrayIdx(secondaryDimCodeEnumerator.current());
#
# if ((_useSecondaryIfNoPrimary == false && !_primaryDimensionCodes.in(secondaryDimCodeEnumerator.current()) ||
# _useSecondaryIfNoPrimary == true && _primaryDimension[dimensionArrayIdx] == ''))
# {
# mergedDimension[dimensionArrayIdx] = _secondayDimension[dimensionArrayIdx];
# }
# }
#
# return mergedDimension;
#}
ENDSOURCE
SOURCE #mergeDimensions
#public static Dimension mergeDimensions(Dimension _primaryDimension,
# Dimension _secondaryDimension,
# Dimension _existingDimension = _existingDimension)
#{
# Integer dimIdx;
# Dimension dimension = _existingDimension;
# ;
#
# dimIdx = 1;
# while (dimIdx <= dimof(_primaryDimension))
# {
# if (! dimension[dimIdx])
# {
# if (_primaryDimension[dimIdx])
# {
# dimension[dimIdx] = _primaryDimension[dimIdx];
# }
# else
# {
# if (_secondaryDimension[dimIdx])
# {
# dimension[dimIdx] = _secondaryDimension[dimIdx];
# }
# else
# {
# dimension[dimIdx] = '';
# }
# }
# }
#
# dimIdx ++;
# }
#
# return dimension;
#}
ENDSOURCE
SOURCE #numOfDimensions
#static int numOfDimensions()
#{
# SysDictEnum sysDictEnum;
# ;
#
# sysDictEnum = new SysDictEnum(enumnum(SysDimension));
#
# return sysDictEnum.values();
#}
ENDSOURCE
SOURCE #setArrayElement
#public static Dimension setArrayElement(SysDimension _changeDimension,
# SysDim _num,
# Dimension _existingDimension = Dimensions::emptyDimension())
#{
# Dimension dimension = _existingDimension;
# ;
#
# dimension[Dimensions::code2ArrayIdx(_changeDimension)] = _num;
#
# return dimension;
#}
ENDSOURCE
SOURCE #txtNotExist
#static str txtNotExist()
#{;
# return "@SYS94078";
#}
#
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : InventTableModule unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #InventTableModule
Id 176
PROPERTIES
Name #InventTableModule
Label #@SYS27987
FormRef #InventTable
TitleField1 #ItemId
TitleField2 #ModuleType
ConfigurationKey #LogisticsBasic
SecurityKey #InventTables
CacheLookup #Found
TableGroup #Main
PrimaryIndex #ItemModuleIdx
ClusterIndex #ItemModuleIdx
DeveloperDocumentation #@SYS123848
ENDPROPERTIES
FIELDS
FIELD #ItemId
Id 1
STRING
PROPERTIES
Name #ItemId
HelpText #@SYS20817
Mandatory #Yes
Table #InventTableModule
ExtendedDataType
ARRAY
#ItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ModuleType
Id 2
ENUM
PROPERTIES
Name #ModuleType
HelpText #@SYS10404
Table #InventTableModule
EnumType #ModuleInventPurchSales
ENDPROPERTIES
FIELD #UnitId
Id 3
STRING
PROPERTIES
Name #UnitId
HelpText #@SYS14532
Table #InventTableModule
ExtendedDataType
ARRAY
#UnitID
#
ENDARRAY
ENDPROPERTIES
FIELD #Price
Id 4
REAL
PROPERTIES
Name #Price
HelpText #@SYS25618
Table #InventTableModule
ExtendedDataType
ARRAY
#Price
#
ENDARRAY
ENDPROPERTIES
FIELD #PriceUnit
Id 5
REAL
PROPERTIES
Name #PriceUnit
Table #InventTableModule
ExtendedDataType
ARRAY
#PriceUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #Markup
Id 6
REAL
PROPERTIES
Name #Markup
Table #InventTableModule
ExtendedDataType
ARRAY
#InventPriceMarkup
#
ENDARRAY
ENDPROPERTIES
FIELD #LineDisc
Id 7
STRING
PROPERTIES
Name #LineDisc
HelpText #@SYS7838
Table #InventTableModule
ExtendedDataType
ARRAY
#InventLineDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #MultiLineDisc
Id 8
STRING
PROPERTIES
Name #MultiLineDisc
Label #@Sys11440
HelpText #@SYS8307
Table #InventTableModule
ExtendedDataType
ARRAY
#InventMultiLineDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #EndDisc
Id 9
ENUM
PROPERTIES
Name #EndDisc
Label #@Sys6465
HelpText #@SYS17091
ConfigurationKey #PriceDisc
Table #InventTableModule
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_Quantity
Id 10
REAL
PROPERTIES
Name #DEL_Quantity
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#QtyMultiples
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_LowestQty
Id 11
REAL
PROPERTIES
Name #DEL_LowestQty
HelpText #@SYS17329
GroupPrompt #@SYS21995
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#QtyLowest
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_HighestQty
Id 12
REAL
PROPERTIES
Name #DEL_HighestQty
HelpText #@SYS1036
GroupPrompt #@SYS8606
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#QtyHighest
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxItemGroupId
Id 13
STRING
PROPERTIES
Name #TaxItemGroupId
HelpText #@SYS17342
Table #InventTableModule
ExtendedDataType
ARRAY
#TaxItemGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_Blocked
Id 14
ENUM
PROPERTIES
Name #DEL_Blocked
Label #@Sys13688
HelpText #@SYS16899
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_DeliveryTime
Id 15
INT
PROPERTIES
Name #DEL_DeliveryTime
HelpText #@SYS35
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#LeadTimeDelivery
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_InventLocationId
Id 16
STRING
PROPERTIES
Name #DEL_InventLocationId
HelpText #@SYS3637
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#InventLocationId
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_MandatoryInventLocation
Id 17
ENUM
PROPERTIES
Name #DEL_MandatoryInventLocation
Label #@SYS22408
HelpText #@SYS9327
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_StandardQty
Id 18
REAL
PROPERTIES
Name #DEL_StandardQty
HelpText #@SYS19609
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#QtyStandard
#
ENDARRAY
ENDPROPERTIES
FIELD #MarkupGroupId
Id 19
STRING
PROPERTIES
Name #MarkupGroupId
HelpText #@SYS16610
Table #InventTableModule
ExtendedDataType
ARRAY
#InventMarkupGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #PriceDate
Id 20
DATE
PROPERTIES
Name #PriceDate
HelpText #@SYS7357
Table #InventTableModule
ExtendedDataType
ARRAY
#PriceDate
#
ENDARRAY
ENDPROPERTIES
FIELD #PriceQty
Id 22
REAL
PROPERTIES
Name #PriceQty
HelpText #@SYS25619
Table #InventTableModule
ExtendedDataType
ARRAY
#PriceQty
#
ENDARRAY
ENDPROPERTIES
FIELD #AllocateMarkup
Id 23
ENUM
PROPERTIES
Name #AllocateMarkup
Table #InventTableModule
ExtendedDataType
ARRAY
#PriceAllocateMarkup
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #OverDeliveryPct
Id 24
REAL
PROPERTIES
Name #OverDeliveryPct
Table #InventTableModule
ExtendedDataType
ARRAY
#OverDeliveryPct
#
ENDARRAY
ENDPROPERTIES
FIELD #UnderDeliveryPct
Id 25
REAL
PROPERTIES
Name #UnderDeliveryPct
Table #InventTableModule
ExtendedDataType
ARRAY
#UnderDeliveryPct
#
ENDARRAY
ENDPROPERTIES
FIELD #SuppItemGroupId
Id 26
STRING
PROPERTIES
Name #SuppItemGroupId
Table #InventTableModule
ExtendedDataType
ARRAY
#InventSuppItemGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_CalendarDays
Id 27
ENUM
PROPERTIES
Name #DEL_CalendarDays
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#CalendarDays
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #InterCompanyBlocked
Id 28
ENUM
PROPERTIES
Name #InterCompanyBlocked
Table #InventTableModule
ExtendedDataType
ARRAY
#InterCompanyBlocked
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#ItemId
#ModuleType
#UnitId
#Price
#PriceUnit
#LineDisc
#Markup
ENDGROUPFIELDS
ENDGROUP
GROUP #DeliveryPercent
PROPERTIES
Name #DeliveryPercent
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#OverDeliveryPct
#UnderDeliveryPct
ENDGROUPFIELDS
ENDGROUP
GROUP #Discount
PROPERTIES
Name #Discount
Label #@SYS11829
ENDPROPERTIES
GROUPFIELDS
#LineDisc
#MultiLineDisc
#EndDisc
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#ItemId
#ModuleType
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompany
PROPERTIES
Name #InterCompany
Label #@SYS74106
ENDPROPERTIES
GROUPFIELDS
#InterCompanyBlocked
ENDGROUPFIELDS
ENDGROUP
GROUP #MiscCharges
PROPERTIES
Name #MiscCharges
Label #@SYS8371
ENDPROPERTIES
GROUPFIELDS
#MarkupGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #Module
PROPERTIES
Name #Module
Label #@SYS9941
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #Prices
PROPERTIES
Name #Prices
Label #@SYS12983
ENDPROPERTIES
GROUPFIELDS
#Price
#PriceUnit
#Markup
#PriceQty
#PriceDate
#AllocateMarkup
ENDGROUPFIELDS
ENDGROUP
GROUP #Quantity
PROPERTIES
Name #Quantity
Label #@SYS14578
ENDPROPERTIES
GROUPFIELDS
#UnitId
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTax
PROPERTIES
Name #SalesTax
Label #@SYS5878
ENDPROPERTIES
GROUPFIELDS
#TaxItemGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #Setup
PROPERTIES
Name #Setup
Label #@SYS2186
ENDPROPERTIES
GROUPFIELDS
#UnitId
#MarkupGroupId
#TaxItemGroupId
#OverDeliveryPct
#UnderDeliveryPct
#InterCompanyBlocked
ENDGROUPFIELDS
ENDGROUP
GROUP #SupplementaryItem
PROPERTIES
Name #SupplementaryItem
Label #@SYS58240
ENDPROPERTIES
GROUPFIELDS
#SuppItemGroupId
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#ItemModuleIdx
Id 1
PROPERTIES
Name #ItemModuleIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#ItemId
#ModuleType
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #InventTableModule
PROPERTIES
Name #InventTableModule
Table #InventTableModule
EntityRelationshipRole #@SYS123849
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemId
RelatedField #ItemId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ModuleType
RelatedField #ModuleType
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #calcSalesPrice
#void calcSalesPrice(InventTable _inventTable, InventAutoSalesPriceMap _basePrice)
#{
# ;
# this.InventAutoSalesPriceMap::calcSalesPrice(_inventTable, _basePrice);
#}
ENDSOURCE
SOURCE #CheckValid
#boolean checkValid()
#{
# if (! this)
# return checkFailed(strfmt("@SYS5700",this.ItemId,this.ModuleType));
#
# return true;
#
#}
#
#
ENDSOURCE
SOURCE #initFromInventItemPriceSim
#void initFromInventItemPriceSim(InventItemPriceSim _inventItemPriceSim)
#{
# PriceConvertFactory priceConvertFactory;
# PriceConvert priceConvert;
# ;
# priceConvertFactory = PriceConvertFactory::newItemPrice(_inventItemPriceSim.ItemId, _inventItemPriceSim.UnitID, _inventItemPriceSim.Price, _inventItemPriceSim.PriceUnit, _inventItemPriceSim.Markup, _inventItemPriceSim.PriceQty, '');
# priceConvertFactory.parmNewUnitId(this.UnitId);
# priceConvertFactory.parmRounding(true);
# priceConvert = priceConvertFactory.priceConvert();
#
# this.Price = priceConvert.parmPrice();
# this.PriceUnit = priceConvert.parmPriceUnit();
# this.Markup = priceConvert.parmMarkup();
# this.PriceQty = priceConvert.parmPriceQty();
# this.PriceDate = _inventItemPriceSim.FromDate;
# this.AllocateMarkup = _inventItemPriceSim.PriceAllocateMarkup;
#}
ENDSOURCE
SOURCE #initTaxItemGroupFromSlsPrchItemGrp
#///
#/// This method will assign the default tax id based on the transacation type: Purchasing or Sales.
#///
#///
#/// InventItemGroup table buffer.
#///
#
#public void initTaxItemGroupFromSlsPrchItemGrp(InventItemGroup _inventItemGroup)
#{
# switch(this.ModuleType)
# {
# case ModuleInventPurchSales::Purch:
#
# if(_inventItemGroup.TaxItemGroupIdPurch)
# {
# this.TaxItemGroupId = _inventItemGroup.TaxItemGroupIdPurch;
# }
# break;
#
# case ModuleInventPurchSales::Sales:
#
# if(_inventItemGroup.TaxItemGroupIdSales)
# {
# this.TaxItemGroupId = _inventItemGroup.TaxItemGroupIdSales;
# }
# break;
# }
#}
#
ENDSOURCE
SOURCE #InitValue
#void initValue()
#{
# this.PriceUnit = 1;
#
# this.UnitId = InventParameters::find().DefaultUnitId;
# this.EndDisc = NoYes::Yes;
#
# super();
#
#}
#
ENDSOURCE
SOURCE #insert
#void insert()
#{
# if (this.Price || this.Markup)
# this.PriceDate= systemdateget();
#
# super();
#}
ENDSOURCE
SOURCE #InventTable
#InventTable inventTable()
#{
# InventTable inventTable;
# ;
#
# if (this.isFormDataSource())
# {
# inventTable = this.joinedTable(inventTable);
# if (inventTable && inventTable.ItemId == this.ItemId)
# {
# return inventTable;
# }
# }
#
# return InventTable::find(this.ItemId);
#}
ENDSOURCE
SOURCE #joinedTable
#public Common joinedTable(Common _buffer)
#{
# Common joinBuffer;
# ;
#
# joinBuffer = this.joinParent();
# do
# {
# if (joinBuffer.TableId == _buffer.TableId)
# {
# return joinBuffer;
# }
# joinBuffer = joinBuffer.joinParent();
# }
# while (joinBuffer);
#
# return null;
#}
ENDSOURCE
SOURCE #Markup
#MarkupAmount markup()
#{
# return this.InventPriceMap::markup();
#}
ENDSOURCE
SOURCE #PcsPrice
#Price pcsPrice()
#{;
# return this.InventPriceMap::pcsPrice();
#}
#
ENDSOURCE
SOURCE #Price
#Price price()
#{
# return this.InventPriceMap::price();
#}
ENDSOURCE
SOURCE #PriceQty
#PriceQty priceQty()
#{
# return this.InventPriceMap::priceQty();
#}
ENDSOURCE
SOURCE #PriceUnit
#PriceUnit priceUnit()
#{
# return this.InventPriceMap::priceUnit();
#}
#
ENDSOURCE
SOURCE #Update
#void update(boolean _updatePriceDate = true)
#{
# boolean updPrice;
# FormRun formRun;
# FormObjectSet formObjSet;
# int i;
# InventTable inventTable;
#
# if (this.orig().Price != this.Price ||
# this.orig().Markup != this.Markup ||
# this.orig().PriceUnit != this.PriceUnit)
# {
# updPrice = true;
#
# if (_updatePriceDate)
# this.PriceDate = systemdateget();
# }
#
# ttsbegin;
#
# super();
#
# if (updPrice)
# {
# if (this.ModuleType != ModuleInventPurchSales::Sales)
# InventTable::updateAutoSalesPrice(this.ItemId, this.PriceDate);
# else
# {
# if (this.isFormDataSource())
# {
# // refresh and reread inventTable datasource if exists in form
# formRun = this.dataSource().formRun();
# for (i=1; i<= formRun.dataSourceCount(); i++)
# {
# if (formRun.dataSource(i).cursor().TableId == tablenum(InventTable))
# {
# formObjSet = formRun.dataSource(i);
# inventTable = formObjSet.cursor();
# break;
# }
# }
# if (!inventTable)
# {
# inventTable = InventTable::find(this.ItemId, true);
# }
# if (inventTable)
# {
# if (inventTable.updateAutoSalesPercent() && formObjSet)
# {
# formObjSet.refresh();
# formObjSet.reread();
# }
# }
# }
# }
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId id)
#{
# boolean ret;
#
# ret = super(id);
#
# switch (fieldExt2Id(id))
# {
# case fieldnum(InventTableModule,UnitId):
# if (this.ModuleType==ModuleInventPurchSales::Invent
# && this.UnitId != this.orig().UnitId
# && !SysRecordTemplate::isTemplateEditFormRecord(this)) // Don't verify for template record.
# {
# if (InventTrans::transactionsExist(this.ItemId))
# return checkFailed(strfmt("@SYS120463",this.ItemId));
#
# if (InventItemPrice::costPricesExistForItem(this.ItemId))
# return checkFailed(strfmt("@SYS126703",this.ItemId));
# }
# break;
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #ValidateWrite
#///
#/// Validate table buffer before it is written.
#///
#///
#/// Returns false if the Item sales tax group for purchase or sales order fields is not populated,
#/// a user requires mandatory item tax group.
#/// Otherwise returns true.
#///
#boolean validateWrite()
#{
# boolean ret;
# ;
#
# ret = super();
#
# if (ret
# && !this.TaxItemGroupId
# && (this.ModuleType == ModuleInventPurchSales::Purch
# || this.ModuleType == ModuleInventPurchSales::Sales)
# && (InventParameters::find().MandatoryItemTaxGroup))
# {
# ret = checkFailed("@SYS113293");
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #exist
#static boolean exist(ItemId itemId,
# ModuleInventPurchSales moduleType)
#{
# return itemId && (select inventTableModule
# index hint ItemModuleIdx
# where inventTableModule.ItemId == itemId &&
# inventTableModule.ModuleType == moduleType
# ).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#static InventTableModule find(ItemId itemId,
# ModuleInventPurchSales moduleType,
# boolean _forUpdate = false)
#{
# InventTableModule inventTableModule;
# ;
#
# if (_forUpdate)
# {
# inventTableModule.selectForUpdate(_forUpdate);
# inventTableModule.selectLocked(_forUpdate);
# }
#
# if (itemId)
# select firstonly inventTableModule
# where inventTableModule.ItemId == itemId &&
# inventTableModule.ModuleType == moduleType;
#
# return inventTableModule;
#}
ENDSOURCE
SOURCE #unitConvert
#static Qty unitConvert(ItemId itemId,
# ModuleInventPurchSales module,
# UnitID unitFrom,
# Qty valueFrom = 1)
#{
# UnitID unitInvent;
# UnitID unitTo;
# ;
#
# unitTo = InventTableModule::find(itemId, module).UnitId;
#
# if (unitFrom != unitTo)
# {
# unitInvent = InventTableModule::find(itemId, ModuleInventPurchSales::Invent).UnitId;
# return InventTable::unitConvert(itemId, unitFrom, unitTo, unitInvent, valueFrom);
# }
#
# return valueFrom;
#}
ENDSOURCE
SOURCE #unitConvertValue
#static real unitConvertValue( ItemId itemId,
# ModuleInventPurchSales module,
# UnitID unitFrom,
# real valueFrom)
#{
# UnitID unitInvent;
# UnitID unitTo;
# ;
#
# unitTo = InventTableModule::find(itemId, module).UnitId;
#
# if (unitFrom != unitTo)
# {
# unitInvent = InventTableModule::find(itemId, ModuleInventPurchSales::Invent).UnitId;
# return InventTable::unitConvertValue(itemId, unitFrom, unitTo, unitInvent, valueFrom);
# }
#
# return valueFrom;
#}
#
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : InventItemLocation unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #InventItemLocation
Id 659
PROPERTIES
Name #InventItemLocation
Label #@SYS53618
TitleField1 #ItemId
TitleField2 #inventDimId
ConfigurationKey #LogisticsBasic
SecurityKey #InventTables
CacheLookup #NotInTTS
TableGroup #Main
PrimaryIndex #ItemDimIdx
ClusterIndex #ItemDimIdx
DeveloperDocumentation #@SYS123891
ENDPROPERTIES
FIELDS
FIELD #ItemId
Id 1
STRING
PROPERTIES
Name #ItemId
Mandatory #Yes
AllowEdit #No
Table #InventItemLocation
ExtendedDataType
ARRAY
#ItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CountGroupId
Id 8
STRING
PROPERTIES
Name #CountGroupId
Table #InventItemLocation
ExtendedDataType
ARRAY
#CountGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #wMSStoreZoneId
Id 10
STRING
PROPERTIES
Name #wMSStoreZoneId
Table #InventItemLocation
ExtendedDataType
ARRAY
#WMSStoreZoneId
#
ENDARRAY
ENDPROPERTIES
FIELD #wMSPickingLocation
Id 11
STRING
PROPERTIES
Name #wMSPickingLocation
Table #InventItemLocation
ExtendedDataType
ARRAY
#WMSPickingLocation
#
ENDARRAY
ENDPROPERTIES
FIELD #CountingStarted
Id 12
ENUM
PROPERTIES
Name #CountingStarted
Table #InventItemLocation
ExtendedDataType
ARRAY
#InventCountingStarted
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #CountingJournalId
Id 13
STRING
PROPERTIES
Name #CountingJournalId
AllowEditOnCreate #No
AllowEdit #No
Table #InventItemLocation
ExtendedDataType
ARRAY
#InventJournalId_Counting
#
ENDARRAY
ENDPROPERTIES
FIELD #WMSLocationIdDefaultIssue
Id 14
STRING
PROPERTIES
Name #WMSLocationIdDefaultIssue
Table #InventItemLocation
ExtendedDataType
ARRAY
#WMSLocationIdDefaultIssue
#
ENDARRAY
ENDPROPERTIES
FIELD #WMSLocationIdDefaultReceipt
Id 15
STRING
PROPERTIES
Name #WMSLocationIdDefaultReceipt
Table #InventItemLocation
ExtendedDataType
ARRAY
#WMSLocationIdDefaultReceipt
#
ENDARRAY
ENDPROPERTIES
FIELD #inventDimId
Id 16
STRING
PROPERTIES
Name #inventDimId
AllowEditOnCreate #No
AllowEdit #No
Table #InventItemLocation
ExtendedDataType
ARRAY
#InventDimId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #useWMSOrder
Id 17
ENUM
PROPERTIES
Name #useWMSOrder
Table #InventItemLocation
EnumType #InventInventLocationNoYes
ENDPROPERTIES
FIELD #pickingLocationRefillMin
Id 18
REAL
PROPERTIES
Name #pickingLocationRefillMin
ConfigurationKey #WMSAdvanced
Table #InventItemLocation
ExtendedDataType
ARRAY
#WMSPickingLocationRefillMin
#
ENDARRAY
ENDPROPERTIES
FIELD #PickingLocationMaxQty
Id 19
REAL
PROPERTIES
Name #PickingLocationMaxQty
Table #InventItemLocation
ExtendedDataType
ARRAY
#WMSMaxStorageQuantity
#
ENDARRAY
ENDPROPERTIES
FIELD #useEmptyPalletLocation
Id 20
ENUM
PROPERTIES
Name #useEmptyPalletLocation
Table #InventItemLocation
EnumType #InventInventLocationNo
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#ItemId
#CountGroupId
#wMSStoreZoneId
#wMSPickingLocation
#WMSLocationIdDefaultReceipt
#WMSLocationIdDefaultIssue
ENDGROUPFIELDS
ENDGROUP
GROUP #Counting
PROPERTIES
Name #Counting
Label #@SYS2828
ENDPROPERTIES
GROUPFIELDS
#CountGroupId
#CountingStarted
#CountingJournalId
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#ItemId
ENDGROUPFIELDS
ENDGROUP
GROUP #PickingLocation
PROPERTIES
Name #PickingLocation
Label #@SYS110125
ENDPROPERTIES
GROUPFIELDS
#wMSPickingLocation
#pickingLocationRefillMin
#PickingLocationMaxQty
#useEmptyPalletLocation
ENDGROUPFIELDS
ENDGROUP
GROUP #System
PROPERTIES
Name #System
Label #@SYS4278
ENDPROPERTIES
GROUPFIELDS
#inventDimId
ENDGROUPFIELDS
ENDGROUP
GROUP #WarehouseManagement
PROPERTIES
Name #WarehouseManagement
Label #@SYS50169
ENDPROPERTIES
GROUPFIELDS
#wMSStoreZoneId
#WMSLocationIdDefaultReceipt
#WMSLocationIdDefaultIssue
#useWMSOrder
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#wMSPickIdx
Id 2
PROPERTIES
Name #wMSPickIdx
ConfigurationKey #WMSBasic
ENDPROPERTIES
INDEXFIELDS
#wMSPickingLocation
ENDINDEXFIELDS
#ItemDimIdx
Id 3
PROPERTIES
Name #ItemDimIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#ItemId
#inventDimId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #InventItemLocation
PROPERTIES
Name #InventItemLocation
Table #InventItemLocation
EntityRelationshipRole #@SYS123892
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #inventDimId
RelatedField #inventDimId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemId
RelatedField #ItemId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #InventTable
PROPERTIES
Name #InventTable
Table #InventTable
EntityRelationshipRole #@SYS123828
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemId
RelatedField #ItemId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #WMSLocationIdDefaultIssue
PROPERTIES
Name #WMSLocationIdDefaultIssue
Table #WMSLocation
EntityRelationshipRole #@SYS123832
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #WMSLocationIdDefaultIssue
RelatedField #wMSLocationId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #WMSLocationIdDefaultReceipt
PROPERTIES
Name #WMSLocationIdDefaultReceipt
Table #WMSLocation
EntityRelationshipRole #@SYS123833
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #WMSLocationIdDefaultReceipt
RelatedField #wMSLocationId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #WMSPickingLocation
PROPERTIES
Name #WMSPickingLocation
Table #WMSLocation
EntityRelationshipRole #@SYS123893
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #1
Table #WMSLocation
RelatedField #locationType
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #wMSPickingLocation
RelatedField #wMSLocationId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #checkDim
#boolean checkDim(InventDim inventDim, boolean errorIfNotValid = true)
#{
# InventDimSearch _dimSearch = new InventDimSearch();
# InventTable inventTable = InventTable::find(this.ItemId);
# InventDimGroupId dimGroupId = inventTable.DimGroupId;
# boolean ok = true;
# Integer x;
# InventDim inventDimTemp;
# Integer itemDimActive;
# Integer itemDimFilled;
# ;
# inventDimTemp.data(inventDim.data());
# inventDimTemp.InventLocationId = '';
#
# if (_dimSearch.first(dimGroupId))
# do
# {
# x = _dimSearch.dimFieldId();
#
# if (_dimSearch.dimActive())
# {
# if (_dimSearch.dimItemDimension())
# itemDimActive++;
#
# if (_dimSearch.dimItemDimension() && inventDim.(x))
# itemDimFilled++;
#
# if (inventDimTemp.(x) && !_dimSearch.dimItemDimension())
# {
# ok = false;
# if (errorIfNotValid)
# checkFailed(strfmt("@SYS71543",fieldid2pname(tablenum(InventDim), x)));
# }
# }
# } while (_dimSearch.next(dimGroupId));
#
# if (itemDimActive != itemDimFilled && itemDimFilled > 0)
# if (errorIfNotValid)
# ok = checkFailed(strfmt("@SYS74585"));
#
# return ok;
#}
ENDSOURCE
SOURCE #initFromInventTable
#void initFromInventTable( InventTable inventTable)
#{
# InventItemLocation existingDefault;
# ;
# this.ItemId = inventTable.ItemId;
# existingDefault = InventItemLocation::findDefault(this.ItemId);
# if (existingDefault)
# {
# this.CountGroupId = existingDefault.CountGroupId;
# this.wmsStoreZoneId = existingDefault.wmsStoreZoneId;
# }
#}
#
ENDSOURCE
SOURCE #initValue
#void initValue()
#{
# ;
# super();
#
# if (this.ItemId)
# {
# this.initFromInventTable(InventTable::find(this.ItemId));
# }
#}
#
ENDSOURCE
SOURCE #inventDim
#InventDim inventDim()
#{
# return InventDim::find(this.InventDimId);
#}
ENDSOURCE
SOURCE #inventLocationID
#InventLocationId inventLocationID()
#{
# return this.inventDim().InventLocationId;
#}
ENDSOURCE
SOURCE #inventTable
#InventTable inventTable(boolean _forupdate = false)
#{
# return InventTable::find(this.ItemId,_forupdate);
#}
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
# super(_fieldId);
#
# switch (_fieldId)
# {
# case fieldnum(InventItemLocation,wmsPickingLocation) : if (!this.wmsPickingLocation)
# this.UseEmptyPalletLocation = InventInventLocationNo::InventLocation;
# break;
# }
#}
ENDSOURCE
SOURCE #update
#void update()
#{
# if (! this.CountingStarted)
# this.CountingJournalId = '';
#
# super();
#
#}
ENDSOURCE
SOURCE #useEmptyPalletLocation
#///
#/// Used to determine if a pallet should be attempted to be moved to the location for empty pallets.
#///
#///
#/// WMSLocation where pallet is at.
#///
#///
#/// Return NoYes::Yes if the InventLocations settings for empty pallets should be used.
#///
#NoYes useEmptyPalletLocation(WMSLocationId _wmsLocationId)
#{
# ;
# if (!this.wmsPickingLocation)
# return NoYes::Yes;
#
# if (this.wmsPickingLocation != _wmsLocationId)
# return NoYes::Yes;
#
# return (this.UseEmptyPalletLocation == InventInventLocationNo::InventLocation);
#}
ENDSOURCE
SOURCE #useWMSOrder
#NoYes useWMSOrder(InventDim inventDim)
#{
# ;
# switch(this.UseWMSOrder)
# {
# case InventInventLocationNoYes::InventLocation:
# if (inventDim.InventLocationId)
# return inventDim.inventLocation().useWMSOrder(this.ItemId);
# break;
# case InventInventLocationNoYes::No:
# return NoYes::No;
# case InventInventLocationNoYes::Yes:
# return NoYes::Yes;
# }
# return this.inventTable().inventModelGroup().MandatoryWMSOrder;
#}
ENDSOURCE
SOURCE #validateDelete
#public boolean validateDelete()
#{
# boolean ret;
# InventDim inventDimBlank = InventDim::find(InventDim::inventDimIdBlank());
#
# ret = super();
#
# if (this.RecId && InventDim::isInventDimEqual(this.inventDim(), inventDimBlank))
# ret = ret && checkFailed("@SYS55206");
#
# return ret;
#}
ENDSOURCE
SOURCE #ValidateWrite
#server boolean validateWrite(InventTable _inventTable = null)
#{
# boolean ret = true;
# WMSLocation wmsLocation;
# InventDimSetup inventDimSetup = InventDimSetup::find(this.inventTable().DimGroupId, fieldnum(InventDim, wmsLocationId));
# InventDim inventDim = this.inventDim();
# ;
#
# ret = this.checkDim(inventDim);
#
# if (inventDim.ConfigId)
# ret = ret && InventTable::checkConfig(this.ItemId,inventDim.ConfigId);
#
# if (inventDim.InventSizeId)
# ret = ret && InventTable::checkSize(this.ItemId,inventDim.InventSizeId);
#
# if (inventDim.InventColorId)
# ret = ret && InventTable::checkColor(this.ItemId,inventDim.InventColorId);
#
# ret = ret && inventDim.validateWriteItemDimCombination(this.ItemId);
#
# if (this.wmsPickingLocation)
# {
# wmsLocation = WMSLocation::find(this.wmsPickingLocation, inventDim.InventLocationId);
# if (!wmsLocation || wmsLocation.LocationType != WMSLocationType::Pick)
# ret = checkFailed(strfmt("@SYS50638", this.wmsPickingLocation));
# }
#
# if (!this.wmsPickingLocation && this.UseEmptyPalletLocation == InventInventLocationNo::No)
# ret = checkFailed("@SYS114175");
#
# if (inventDim.InventLocationId && this.wmsStoreZoneId)
# {
# if (!this.wmsStoreZone().hasLocations(inventDim.InventLocationId))
# info(strfmt("@SYS54208", this.wmsStoreZoneId, inventDim.InventLocationId));
# }
#
# if (this.wmsLocationIdDefaultReceipt)
# {
# if (inventDimSetup.Active && inventDimSetup.AllowBlankReceipt)
# info("@SYS63216");
# }
#
# if (this.wmsLocationIdDefaultIssue)
# {
# if (inventDimSetup.Active && inventDimSetup.AllowBlankIssue)
# info("@SYS63217");
# }
#
# ret = super() && ret;
#
# return ret;
#}
#
ENDSOURCE
SOURCE #wMSPickingLocation
#WMSLocation wmsPickingLocation(boolean _update = false)
#{
# return WMSLocation::find(this.wmsPickingLocation, this.inventDim().InventLocationId, _update);
#}
ENDSOURCE
SOURCE #wMSStoreZone
#WMSStoreZone wmsStoreZone(boolean _forUpdate = false)
#{
# return WMSStoreZone::find(this.wmsStoreZoneId ,_forUpdate);
#}
ENDSOURCE
SOURCE #exist
#static boolean exist(ItemId itemId,
# InventDimId inventDimId)
#{
# ;
# return itemId && (select firstonly RecId from inventItemLocation
# index hint ItemDimIdx
# where inventItemLocation.ItemId == itemId &&
# inventItemLocation.InventDimId == inventDimId
# ).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#static InventItemLocation find(ItemId _itemId,
# InventDimId _inventDimId,
# CountGroupId _countGroupId = '',//if specified selection will be constrained based on this,but if blank it will not be taken into consideration
# boolean _forUpdate = false)
#{
# InventItemLocation inventItemLocation;
# InventItemLocation inventItemLocationNull;
# InventDimId inventDimId = _inventDimId;
# InventDim inventDim;
# InventDim inventDimFind;
# InventTable inventTable;
#
#void findInventItemLocation()
#{
# select firstonly inventItemLocation
# index hint ItemDimIdx
# where inventItemLocation.ItemId == _itemId &&
# inventItemLocation.InventDimId == inventDimId&&
# (!_countGroupId || inventItemLocation.CountGroupId == _countGroupId);
#}
# ;
#
# if (!_inventDimId)
# throw(error(strfmt("@SYS23264", funcname())));
#
#
# inventItemLocation.selectForUpdate(_forUpdate);
#
# if (!_itemId)
# return inventItemLocationNull;
#
# inventDimId = _inventDimId;
#
# findInventItemLocation(); // Try to find record with passed InventDimId
#
# if (inventItemLocation.RecId)
# return inventItemLocation;
#
# inventDim = InventDim::find(inventDimId);
# inventTable = InventTable::find(_itemId);
#
# if (InventDim::hasItemDimActive(inventTable.DimGroupId))
# {
# inventDimFind.copyItemDim(inventTable.DimGroupId, inventDim);
# inventDimFind.InventLocationId = inventDim.InventLocationId;
#
# if (inventDimFind.InventLocationId)
# {
# inventDimId = InventDim::findDim(inventDimFind).InventDimId;
#
# if (inventDimId && _inventDimId != inventDimId)
# {
# findInventItemLocation(); // Try to find record with InventDimId with only Item Dimensions and InventLocationId
# if (inventItemLocation.RecId)
# return inventItemLocation;
# }
# }
#
# inventDimFind.InventLocationId = '';
# inventDimId = InventDim::findDim(inventDimFind).InventDimId;
# if (inventDimId && _inventDimId != inventDimId)
# {
# findInventItemLocation(); // Try to find record with InventDimId with only Item Dimensions
# if (inventItemLocation.RecId)
# return inventItemLocation;
# }
# }
# if (inventDim.InventLocationId)
# {
# inventDimFind.clear();
# inventDimFind.InventLocationId = inventDim.InventLocationId;
# inventDimId = InventDim::findDim(inventDimFind).InventDimId;
# if (inventDimId && _inventDimId != inventDimId)
# {
# findInventItemLocation(); // Try to find record with InventDimId with only InventLocationId
# if (inventItemLocation.RecId)
# return inventItemLocation;
# }
# }
#
# inventDimId = InventDim::inventDimIdBlank();
# if (inventDimId && _inventDimId != inventDimId)
# {
# findInventItemLocation(); // Try to find record with InventDimId with no Dimensions
# if (inventItemLocation.RecId)
# return inventItemLocation;
# }
# return inventItemLocationNull;
#}
ENDSOURCE
SOURCE #findDefault
#static InventItemLocation findDefault(ItemId itemId,
# boolean _forUpdate = false)
#{
# return InventItemLocation::find(itemId, InventDim::inventDimIdBlank(),'', _forUpdate);
#}
#
ENDSOURCE
SOURCE #findFixedWarehouse
#static InventItemLocation findFixedWarehouse( ItemId _itemId,
# InventDimId _inventDimId,
# boolean _forUpdate = false)
#{
# InventItemLocation inventItemLocation;
# InventItemLocation inventItemLocationNull;
# InventDimId inventDimId = _inventDimId;
# InventDimId inventDimIdItemDim;
# InventDim inventDim;
# InventDim inventDimFind;
# InventTable inventTable;
#
#void findInventItemLocation()
#{
# select firstonly inventItemLocation
# index hint ItemDimIdx
# where inventItemLocation.ItemId == _itemId &&
# inventItemLocation.InventDimId == inventDimId;
#}
# ;
#
# if (!_inventDimId)
# throw(error(strfmt("@SYS23264", funcname())));
#
#
# inventItemLocation.selectForUpdate(_forUpdate);
#
# if (!_itemId)
# return inventItemLocationNull;
#
# inventDimId = _inventDimId;
#
# findInventItemLocation(); // Try to find record with passed InventDimId
#
# if (inventItemLocation.RecId)
# return inventItemLocation;
#
# inventDim = InventDim::find(inventDimId);
# if (!inventDim.InventLocationId)
# return inventItemLocationNull; // If inventLocationId hasn't been specified this method is used incorrectly and no record should be returned.
#
# if (inventDim.InventSiteId)
# {
# inventDim.InventSiteId = ''; // Site is not used for finding inventItemLocation, so do not search with site
# inventDimId = InventDim::findDim(inventDim).InventDimId;
#
# findInventItemLocation(); // Try to find record with InventDimId with only Item Dimensions and InventLocationId
# if (inventItemLocation.RecId)
# return inventItemLocation;
# }
#
# inventTable = InventTable::find(_itemId);
#
# if (InventDim::hasItemDimActive(inventTable.DimGroupId))
# {
# inventDimFind.copyItemDim(inventTable.DimGroupId, inventDim);
# inventDimFind.InventLocationId = inventDim.InventLocationId;
#
# inventDimId = InventDim::findDim(inventDimFind).InventDimId;
#
# if (inventDimId && _inventDimId != inventDimId)
# {
# inventDimIdItemDim = inventDimId;
# findInventItemLocation(); // Try to find record with InventDimId with only Item Dimensions and InventLocationId
# if (inventItemLocation.RecId)
# return inventItemLocation;
# }
# }
#
# inventDimFind.clear();
# inventDimFind.InventLocationId = inventDim.InventLocationId;
# inventDimId = InventDim::findDim(inventDimFind).InventDimId;
# if (inventDimId && _inventDimId != inventDimId && inventDimId != inventDimIdItemDim)
# {
# findInventItemLocation(); // Try to find record with InventDimId with only InventLocationId
# if (inventItemLocation.RecId)
# return inventItemLocation;
# }
#
# return inventItemLocationNull;
#}
ENDSOURCE
SOURCE #isCountingStarted
#static server boolean isCountingStarted(
# ItemId itemId,
# InventDim inventDim,
# InventJournalId inventJournalId = '' // if specified, return true if started by other journal else false
#)
#{
# InventItemLocation inventItemLocation;
# ;
# if (!inventDim.InventDimId)
# inventDim = InventDim::findOrCreate(inventDim);
# inventItemLocation = InventItemLocation::find(itemId, inventDim.InventDimId);
#
#
# if (!inventItemLocation.RecId || !inventItemLocation.CountingStarted)
# return false;
# if (prmisdefault(inventJournalId))
# return true;
# return (inventItemLocation.CountingJournalId != inventJournalId);
#}
ENDSOURCE
SOURCE #updateStartCounting
#static server void updateStartCounting(
# ItemId itemId,
# InventDim inventDim,
# InventJournalId inventJournalId
#)
#{
# InventItemLocation inventItemLocation;
# ;
# if (!inventDim.InventDimId)
# inventDim = InventDim::findOrCreate(inventDim);
#
# inventItemLocation = InventItemLocation::find(itemId, inventDim.InventDimId,'',true);
#
# if (inventItemLocation.RecId && !inventItemLocation.CountingStarted)
# {
# inventItemLocation.CountingStarted = NoYes::Yes;
# inventItemLocation.CountingJournalId = inventJournalId;
# inventItemLocation.update();
# }
#}
#
ENDSOURCE
SOURCE #updateStopCounting
#static server void updateStopCounting(
# ItemId itemId,
# InventDim inventDim
#)
#{
# InventItemLocation inventItemLocation;
# ;
# if (!inventDim.InventDimId)
# inventDim = InventDim::findOrCreate(inventDim);
#
# inventItemLocation = InventItemLocation::find(itemId, inventDim.InventDimId,'',true);
#
# if (inventItemLocation.RecId && inventItemLocation.CountingStarted)
# {
# inventItemLocation.CountingStarted = NoYes::No;
# inventItemLocation.CountingJournalId = '';
# inventItemLocation.update();
# }
#}
ENDSOURCE
SOURCE #updateStopCountingJournal
#static server void updateStopCountingJournal(InventJournalTrans inventJournalTrans, boolean always = false)
#{
# InventDim inventDim = inventJournalTrans.inventDim();
# InventItemLocation inventItemLocation = InventItemLocation::find(inventJournalTrans.ItemId, inventDim.InventDimId,'',true);
# boolean doStop = true;
# InventJournalTrans otherTrans;
# InventItemLocation otherInventItemLocation;
# ;
# if (inventItemLocation.RecId && inventItemLocation.CountingStarted && inventItemLocation.CountingJournalId == inventJournalTrans.JournalId)
# {
# if (!always)
# {
# while select otherTrans
# where otherTrans.JournalId == inventJournalTrans.JournalId &&
# otherTrans.ItemId == inventJournalTrans.ItemId &&
# otherTrans.RecId != inventJournalTrans.RecId
# {
# otherInventItemLocation = InventItemLocation::find(inventJournalTrans.ItemId, otherTrans.InventDimId);
# if (otherInventItemLocation.RecId == inventItemLocation.RecId)
# {
# doStop = false;
# break;
# }
# }
# }
#
# if (doStop)
# {
# inventItemLocation.CountingStarted = NoYes::No;
# inventItemLocation.CountingJournalId = '';
# inventItemLocation.update();
# }
# }
#}
#
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : SalesLine unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #SalesLine
Id 359
PROPERTIES
Name #SalesLine
Label #@SYS508
TitleField1 #SalesId
TitleField2 #ItemId
ConfigurationKey #LogisticsBasic
SecurityKey #CustTables
CacheLookup #NotInTTS
CreateRecIdIndex #Yes
TableGroup #WorksheetLine
PrimaryIndex #TransIdIdx
ClusterIndex #SalesLineIdx
CreatedDateTime #Yes
DeveloperDocumentation #@SYS124481
ENDPROPERTIES
FIELDS
FIELD #SalesId
Id 1
STRING
PROPERTIES
Name #SalesId
HelpText #@SYS3357
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#SalesIdBase
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #LineNum
Id 2
REAL
PROPERTIES
Name #LineNum
HelpText #@SYS4691
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#LineNum
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemId
Id 3
STRING
PROPERTIES
Name #ItemId
HelpText #@SYS13670
Mandatory #Yes
Table #SalesLine
ExtendedDataType
ARRAY
#ItemIdSmall
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SalesStatus
Id 4
ENUM
PROPERTIES
Name #SalesStatus
Label #@SYS7161
HelpText #@SYS6391
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
EnumType #SalesStatus
ENDPROPERTIES
FIELD #LedgerAccount
Id 5
STRING
PROPERTIES
Name #LedgerAccount
HelpText #@SYS13324
Table #SalesLine
ExtendedDataType
ARRAY
#SalesLedgerAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Name
Id 6
STRING
PROPERTIES
Name #Name
HelpText #@SYS9860
Table #SalesLine
ExtendedDataType
ARRAY
#ItemFreeTxt
#
ENDARRAY
StringSize #1000
ENDPROPERTIES
FIELD #ExternalItemId
Id 7
STRING
PROPERTIES
Name #ExternalItemId
Table #SalesLine
ExtendedDataType
ARRAY
#SalesExternalItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #TaxGroup
Id 8
STRING
PROPERTIES
Name #TaxGroup
Table #SalesLine
ExtendedDataType
ARRAY
#TaxGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #QtyOrdered
Id 9
REAL
PROPERTIES
Name #QtyOrdered
HelpText #@SYS8090
Table #SalesLine
ExtendedDataType
ARRAY
#InventQty
#
ENDARRAY
ENDPROPERTIES
FIELD #SalesDeliverNow
Id 10
REAL
PROPERTIES
Name #SalesDeliverNow
Label #@SYS17214
HelpText #@SYS69027
Table #SalesLine
ExtendedDataType
ARRAY
#SalesQty
#
ENDARRAY
ENDPROPERTIES
FIELD #RemainSalesPhysical
Id 11
REAL
PROPERTIES
Name #RemainSalesPhysical
Label #@SYS22556
HelpText #@SYS27454
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#SalesQty
#
ENDARRAY
ENDPROPERTIES
FIELD #RemainSalesFinancial
Id 12
REAL
PROPERTIES
Name #RemainSalesFinancial
Label #@SYS22380
HelpText #@SYS27453
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#SalesQty
#
ENDARRAY
ENDPROPERTIES
FIELD #CostPrice
Id 13
REAL
PROPERTIES
Name #CostPrice
Table #SalesLine
ExtendedDataType
ARRAY
#ReturnCostPrice
#
ENDARRAY
ENDPROPERTIES
FIELD #SalesPrice
Id 14
REAL
PROPERTIES
Name #SalesPrice
Label #@SYS11770
HelpText #@SYS1174
Table #SalesLine
ExtendedDataType
ARRAY
#SalesPrice
#
ENDARRAY
ENDPROPERTIES
FIELD #CurrencyCode
Id 15
STRING
PROPERTIES
Name #CurrencyCode
HelpText #@SYS6734
Mandatory #Yes
Table #SalesLine
ExtendedDataType
ARRAY
#CustCurrencyCode
#
ENDARRAY
StringSize #3
ENDPROPERTIES
FIELD #LinePercent
Id 16
REAL
PROPERTIES
Name #LinePercent
Table #SalesLine
ExtendedDataType
ARRAY
#SalesLinePercent
#
ENDARRAY
ENDPROPERTIES
FIELD #LineDisc
Id 17
REAL
PROPERTIES
Name #LineDisc
Table #SalesLine
ExtendedDataType
ARRAY
#SalesLineDisc
#
ENDARRAY
ENDPROPERTIES
FIELD #LineAmount
Id 18
REAL
PROPERTIES
Name #LineAmount
Table #SalesLine
ExtendedDataType
ARRAY
#SalesLineAmount
#
ENDARRAY
ENDPROPERTIES
FIELD #ConfirmedDlv
Id 19
DATE
PROPERTIES
Name #ConfirmedDlv
Table #SalesLine
ExtendedDataType
ARRAY
#SalesShippingDate
#
ENDARRAY
ENDPROPERTIES
FIELD #Reservation
Id 20
ENUM
PROPERTIES
Name #Reservation
Table #SalesLine
EnumType #ItemReservation
ENDPROPERTIES
FIELD #SalesGroup
Id 21
STRING
PROPERTIES
Name #SalesGroup
Table #SalesLine
ExtendedDataType
ARRAY
#CommissSalesGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #SalesUnit
Id 22
STRING
PROPERTIES
Name #SalesUnit
Table #SalesLine
ExtendedDataType
ARRAY
#SalesUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #Dimension
Id 23
STRING
PROPERTIES
Name #Dimension
Table #SalesLine
ExtendedDataType
ARRAY
#Dimension
#
ENDARRAY
ENDPROPERTIES
FIELD #PriceUnit
Id 24
REAL
PROPERTIES
Name #PriceUnit
HelpText #@SYS3472
Table #SalesLine
ExtendedDataType
ARRAY
#PriceUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjTransId
Id 25
STRING
PROPERTIES
Name #ProjTransId
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#ProjItemTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventTransId
Id 26
STRING
PROPERTIES
Name #InventTransId
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#InventTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CustGroup
Id 27
STRING
PROPERTIES
Name #CustGroup
Label #@SYS3815
HelpText #@SYS11904
Mandatory #Yes
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#CustGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #CustAccount
Id 28
STRING
PROPERTIES
Name #CustAccount
Label #@SYS302
HelpText #@SYS7149
Mandatory #Yes
Table #SalesLine
ExtendedDataType
ARRAY
#CustAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DEL_InterCompanyReturnActionId
Id 29
STRING
PROPERTIES
Name #DEL_InterCompanyReturnActionId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
ConfigurationKey #SysDeletedObjects41
Table #SalesLine
ExtendedDataType
ARRAY
#SalesReturnActionId
#
ENDARRAY
ENDPROPERTIES
FIELD #SalesQty
Id 30
REAL
PROPERTIES
Name #SalesQty
Table #SalesLine
ExtendedDataType
ARRAY
#SalesOrderedQty
#
ENDARRAY
ENDPROPERTIES
FIELD #SalesMarkup
Id 31
REAL
PROPERTIES
Name #SalesMarkup
HelpText #@SYS16916
Table #SalesLine
ExtendedDataType
ARRAY
#SalesMarkup
#
ENDARRAY
ENDPROPERTIES
FIELD #InventDeliverNow
Id 32
REAL
PROPERTIES
Name #InventDeliverNow
Label #@SYS17214
HelpText #@SYS5006
Table #SalesLine
ExtendedDataType
ARRAY
#InventQty
#
ENDARRAY
ENDPROPERTIES
FIELD #MultiLnDisc
Id 33
REAL
PROPERTIES
Name #MultiLnDisc
Table #SalesLine
ExtendedDataType
ARRAY
#SalesMultiLnDisc
#
ENDARRAY
ENDPROPERTIES
FIELD #MultiLnPercent
Id 34
REAL
PROPERTIES
Name #MultiLnPercent
Table #SalesLine
ExtendedDataType
ARRAY
#SalesMultiLnPercent
#
ENDARRAY
ENDPROPERTIES
FIELD #SalesType
Id 35
ENUM
PROPERTIES
Name #SalesType
Label #@SYS1201
HelpText #@SYS12223
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
EnumType #SalesType
ENDPROPERTIES
FIELD #Blocked
Id 36
ENUM
PROPERTIES
Name #Blocked
Table #SalesLine
ExtendedDataType
ARRAY
#LineStopped
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Complete
Id 37
ENUM
PROPERTIES
Name #Complete
Table #SalesLine
ExtendedDataType
ARRAY
#LineComplete
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #RemainInventPhysical
Id 38
REAL
PROPERTIES
Name #RemainInventPhysical
Label #@SYS22556
HelpText #@SYS15801
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#InventQty
#
ENDARRAY
ENDPROPERTIES
FIELD #TransactionCode
Id 39
STRING
PROPERTIES
Name #TransactionCode
Table #SalesLine
ExtendedDataType
ARRAY
#IntrastatTransactionCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #CountyOrigDest
Id 40
STRING
PROPERTIES
Name #CountyOrigDest
Table #SalesLine
AnalysisVisibility #Low
ExtendedDataType
ARRAY
#AddressCountyOrigDest
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_InterCompanyReturnActionTxt
Id 41
STRING
PROPERTIES
Name #DEL_InterCompanyReturnActionTxt
AllowEditOnCreate #No
AllowEdit #No
Visible #No
ConfigurationKey #SysDeletedObjects41
Table #SalesLine
ExtendedDataType
ARRAY
#Description
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #TaxItemGroup
Id 42
STRING
PROPERTIES
Name #TaxItemGroup
Table #SalesLine
ExtendedDataType
ARRAY
#TaxItemGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxAutogenerated
Id 44
ENUM
PROPERTIES
Name #TaxAutogenerated
Table #SalesLine
ExtendedDataType
ARRAY
#TaxAutoGenerated
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #UnderDeliveryPct
Id 45
REAL
PROPERTIES
Name #UnderDeliveryPct
Table #SalesLine
ExtendedDataType
ARRAY
#SalesUnderDeliveryPct
#
ENDARRAY
ENDPROPERTIES
FIELD #OverDeliveryPct
Id 46
REAL
PROPERTIES
Name #OverDeliveryPct
Table #SalesLine
ExtendedDataType
ARRAY
#SalesOverDeliveryPct
#
ENDARRAY
ENDPROPERTIES
FIELD #BarCode
Id 47
STRING
PROPERTIES
Name #BarCode
Table #SalesLine
ExtendedDataType
ARRAY
#SalesBarCode
#
ENDARRAY
StringSize #80
ENDPROPERTIES
FIELD #BarCodeType
Id 48
STRING
PROPERTIES
Name #BarCodeType
Table #SalesLine
ExtendedDataType
ARRAY
#BarcodeSetupId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventRefTransId
Id 49
STRING
PROPERTIES
Name #InventRefTransId
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#InventRefTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventRefType
Id 50
ENUM
PROPERTIES
Name #InventRefType
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
EnumType #InventRefType
ENDPROPERTIES
FIELD #InventRefId
Id 51
STRING
PROPERTIES
Name #InventRefId
Table #SalesLine
ExtendedDataType
ARRAY
#InventRefId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InterCompanyOrigin
Id 52
ENUM
PROPERTIES
Name #InterCompanyOrigin
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #SalesLine
EnumType #InterCompanyOrigin
ENDPROPERTIES
FIELD #DEL_DeliveryDateControl
Id 53
ENUM
PROPERTIES
Name #DEL_DeliveryDateControl
ConfigurationKey #SysDeletedObjects41
Table #SalesLine
EnumType #NoYes
ENDPROPERTIES
FIELD #ItemBOMId
Id 54
STRING
PROPERTIES
Name #ItemBOMId
Table #SalesLine
ExtendedDataType
ARRAY
#ItemBOMId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ItemRouteId
Id 55
STRING
PROPERTIES
Name #ItemRouteId
Table #SalesLine
ExtendedDataType
ARRAY
#ItemRouteId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #LineHeader
Id 56
STRING
PROPERTIES
Name #LineHeader
Table #SalesLine
ExtendedDataType
ARRAY
#LineHeader
#
ENDARRAY
StringSize #80
ENDPROPERTIES
FIELD #Scrap
Id 57
ENUM
PROPERTIES
Name #Scrap
Label #@SYS24894
HelpText #@SYS112750
Table #SalesLine
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_ReturnActionId
Id 58
STRING
PROPERTIES
Name #DEL_ReturnActionId
ConfigurationKey #SysDeletedObjects41
Table #SalesLine
ExtendedDataType
ARRAY
#SalesReturnActionId
#
ENDARRAY
ENDPROPERTIES
FIELD #DlvMode
Id 59
STRING
PROPERTIES
Name #DlvMode
Table #SalesLine
ExtendedDataType
ARRAY
#DlvModeId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventTransIdReturn
Id 60
STRING
PROPERTIES
Name #InventTransIdReturn
Table #SalesLine
ExtendedDataType
ARRAY
#InventTransIdReturn
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ProjCategoryId
Id 61
STRING
PROPERTIES
Name #ProjCategoryId
Table #SalesLine
ExtendedDataType
ARRAY
#ProjCategoryId
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjId
Id 62
STRING
PROPERTIES
Name #ProjId
Table #SalesLine
ExtendedDataType
ARRAY
#ProjId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventDimId
Id 63
STRING
PROPERTIES
Name #InventDimId
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#InventDimId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Transport
Id 64
STRING
PROPERTIES
Name #Transport
Table #SalesLine
ExtendedDataType
ARRAY
#IntrastatTransport
#
ENDARRAY
ENDPROPERTIES
FIELD #StatProcId
Id 65
STRING
PROPERTIES
Name #StatProcId
Table #SalesLine
ExtendedDataType
ARRAY
#IntrastatProcId
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_EstimateGross
Id 66
REAL
PROPERTIES
Name #DEL_EstimateGross
ConfigurationKey #SysDeletedObjects40
Table #SalesLine
ExtendedDataType
ARRAY
#SalesEstimateGross
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_EstimateNet
Id 67
REAL
PROPERTIES
Name #DEL_EstimateNet
ConfigurationKey #SysDeletedObjects40
Table #SalesLine
ExtendedDataType
ARRAY
#DEL_SalesEstimateNet
#
ENDARRAY
ENDPROPERTIES
FIELD #Port
Id 68
STRING
PROPERTIES
Name #Port
Table #SalesLine
ExtendedDataType
ARRAY
#IntrastatPortId
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjLinePropertyId
Id 69
STRING
PROPERTIES
Name #ProjLinePropertyId
Table #SalesLine
ExtendedDataType
ARRAY
#ProjLinePropertyId
#
ENDARRAY
ENDPROPERTIES
FIELD #ReceiptDateRequested
Id 70
DATE
PROPERTIES
Name #ReceiptDateRequested
Table #SalesLine
ExtendedDataType
ARRAY
#SalesReceiptDateRequested
#
ENDARRAY
ENDPROPERTIES
FIELD #CustomerLineNum
Id 71
INT
PROPERTIES
Name #CustomerLineNum
Table #SalesLine
ExtendedDataType
ARRAY
#CustLineNum
#
ENDARRAY
ENDPROPERTIES
FIELD #PackingUnitQty
Id 72
REAL
PROPERTIES
Name #PackingUnitQty
Table #SalesLine
ExtendedDataType
ARRAY
#InventPackingUnitQty
#
ENDARRAY
ENDPROPERTIES
FIELD #PackingUnit
Id 73
STRING
PROPERTIES
Name #PackingUnit
Table #SalesLine
ExtendedDataType
ARRAY
#InventPackingUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #SkipUpdate
Id 74
ENUM
PROPERTIES
Name #SkipUpdate
SaveContents #No
Visible #No
Table #SalesLine
EnumType #InterCompanySkipUpdate
ENDPROPERTIES
FIELD #InterCompanyInventTransId
Id 75
STRING
PROPERTIES
Name #InterCompanyInventTransId
ConfigurationKey #TradeInterCompany
Table #SalesLine
ExtendedDataType
ARRAY
#InventRefTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #RemainInventFinancial
Id 76
REAL
PROPERTIES
Name #RemainInventFinancial
Label #@SYS22380
HelpText #@SYS27453
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#InventQty
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryAddress
Id 78
STRING
PROPERTIES
Name #DeliveryAddress
Label #@SYS7924
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #TradeMultiShipTo
Table #SalesLine
ExtendedDataType
ARRAY
#Addressing
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #DeliveryName
Id 79
STRING
PROPERTIES
Name #DeliveryName
Label #@SYS22058
HelpText #@SYS17217
GroupPrompt #@SYS7399
ConfigurationKey #TradeMultiShipTo
Table #SalesLine
ExtendedDataType
ARRAY
#CustName
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #DeliveryStreet
Id 80
STRING
PROPERTIES
Name #DeliveryStreet
ConfigurationKey #TradeMultiShipTo
Table #SalesLine
ExtendedDataType
ARRAY
#AddressStreet
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #DeliveryZipCode
Id 81
STRING
PROPERTIES
Name #DeliveryZipCode
HelpText #@SYS17884
ConfigurationKey #TradeMultiShipTo
Table #SalesLine
ExtendedDataType
ARRAY
#AddressZipCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryCity
Id 82
STRING
PROPERTIES
Name #DeliveryCity
ConfigurationKey #TradeMultiShipTo
Table #SalesLine
ExtendedDataType
ARRAY
#AddressCity
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #DeliveryCounty
Id 83
STRING
PROPERTIES
Name #DeliveryCounty
HelpText #@SYS17885
ConfigurationKey #TradeMultiShipTo
Table #SalesLine
ExtendedDataType
ARRAY
#AddressCountyId
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryState
Id 84
STRING
PROPERTIES
Name #DeliveryState
ConfigurationKey #TradeMultiShipTo
Table #SalesLine
ExtendedDataType
ARRAY
#AddressStateId
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryCountryRegionId
Id 85
STRING
PROPERTIES
Name #DeliveryCountryRegionId
HelpText #@SYS17886
ConfigurationKey #TradeMultiShipTo
Table #SalesLine
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryType
Id 86
ENUM
PROPERTIES
Name #DeliveryType
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#TradeLineDlvTypeId
#
ENDARRAY
EnumType #TradeLineDlvType
ENDPROPERTIES
FIELD #CustomerRef
Id 88
STRING
PROPERTIES
Name #CustomerRef
Table #SalesLine
ExtendedDataType
ARRAY
#CustRefLine
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #PurchorderFormNum
Id 89
STRING
PROPERTIES
Name #PurchorderFormNum
Table #SalesLine
ExtendedDataType
ARRAY
#CustPurchaseOrder
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ReceiptDateConfirmed
Id 90
DATE
PROPERTIES
Name #ReceiptDateConfirmed
Table #SalesLine
ExtendedDataType
ARRAY
#SalesReceiptDateConfirmed
#
ENDARRAY
ENDPROPERTIES
FIELD #BlanketRefTransId
Id 91
STRING
PROPERTIES
Name #BlanketRefTransId
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#SalesBlanketRefTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #StatTriangularDeal
Id 92
ENUM
PROPERTIES
Name #StatTriangularDeal
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#IntrastatTriangularDeal
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ShippingDateRequested
Id 93
DATE
PROPERTIES
Name #ShippingDateRequested
Mandatory #Yes
Table #SalesLine
ExtendedDataType
ARRAY
#SalesShippingDateRequested
#
ENDARRAY
ENDPROPERTIES
FIELD #ShippingDateConfirmed
Id 94
DATE
PROPERTIES
Name #ShippingDateConfirmed
Table #SalesLine
ExtendedDataType
ARRAY
#SalesShippingDateConfirmed
#
ENDARRAY
ENDPROPERTIES
FIELD #AddressRefRecId
Id 95
INT64
PROPERTIES
Name #AddressRefRecId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #SalesLine
ExtendedDataType
ARRAY
#AddressRefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #AddressRefTableId
Id 96
INT
PROPERTIES
Name #AddressRefTableId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #SalesLine
ExtendedDataType
ARRAY
#AddressRefTableId
#
ENDARRAY
ENDPROPERTIES
FIELD #ServiceOrderId
Id 97
STRING
PROPERTIES
Name #ServiceOrderId
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#SMAServiceOrderId
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemTagging
Id 98
ENUM
PROPERTIES
Name #ItemTagging
Table #SalesLine
ExtendedDataType
ARRAY
#RFIDItemTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #CaseTagging
Id 99
ENUM
PROPERTIES
Name #CaseTagging
Table #SalesLine
ExtendedDataType
ARRAY
#RFIDCaseTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #PalletTagging
Id 100
ENUM
PROPERTIES
Name #PalletTagging
Table #SalesLine
ExtendedDataType
ARRAY
#RFIDPalletTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_CorrectiveReason
Id 101
STRING
PROPERTIES
Name #DEL_CorrectiveReason
Visible #No
ConfigurationKey #SysDeletedObjects40
Table #SalesLine
ExtendedDataType
ARRAY
#DEL_CustVendCorrectiveReason_ES
#
ENDARRAY
StringSize #(Memo)
ENDPROPERTIES
FIELD #EInvoiceAccountCode
Id 105
STRING
PROPERTIES
Name #EInvoiceAccountCode
Table #SalesLine
ExtendedDataType
ARRAY
#EInvoiceAccountCode
#
ENDARRAY
StringSize #35
ENDPROPERTIES
FIELD #ShipCarrierId
Id 106
STRING
PROPERTIES
Name #ShipCarrierId
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #ShipCarrier
Table #SalesLine
ExtendedDataType
ARRAY
#ShipCarrierId
#
ENDARRAY
ENDPROPERTIES
FIELD #ShipCarrierAccount
Id 107
STRING
PROPERTIES
Name #ShipCarrierAccount
ConfigurationKey #ShipCarrier
Table #SalesLine
ExtendedDataType
ARRAY
#ShipCarrierAccount
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #ShipCarrierDlvType
Id 108
ENUM
PROPERTIES
Name #ShipCarrierDlvType
ConfigurationKey #ShipCarrier
Table #SalesLine
EnumType #ShipCarrierDlvType
ENDPROPERTIES
FIELD #ShipCarrierAccountCode
Id 109
STRING
PROPERTIES
Name #ShipCarrierAccountCode
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #ShipCarrier
Table #SalesLine
ExtendedDataType
ARRAY
#ShipCarrierAccountCode
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DeliveryDateControlType
Id 120
ENUM
PROPERTIES
Name #DeliveryDateControlType
Table #SalesLine
EnumType #SalesDeliveryDateControlType
ENDPROPERTIES
FIELD #ATPInclPlannedOrders
Id 121
ENUM
PROPERTIES
Name #ATPInclPlannedOrders
Visible #No
Table #SalesLine
ExtendedDataType
ARRAY
#SalesATPInclPlannedOrders
#
ENDARRAY
EnumType #boolean
ENDPROPERTIES
FIELD #ATPTimeFence
Id 122
INT
PROPERTIES
Name #ATPTimeFence
Visible #No
Table #SalesLine
ExtendedDataType
ARRAY
#SalesATPTimeFence
#
ENDARRAY
ENDPROPERTIES
FIELD #ActivityNumber
Id 123
STRING
PROPERTIES
Name #ActivityNumber
Table #SalesLine
ExtendedDataType
ARRAY
#ProjActivityNumber
#
ENDARRAY
ENDPROPERTIES
FIELD #ReturnAllowReservation
Id 127
ENUM
PROPERTIES
Name #ReturnAllowReservation
Table #SalesLine
ExtendedDataType
ARRAY
#ReturnAllowReservation
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ItemReplaced
Id 169
ENUM
PROPERTIES
Name #ItemReplaced
Table #SalesLine
ExtendedDataType
ARRAY
#ReturnItemReplaced
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ReturnDeadline
Id 170
DATE
PROPERTIES
Name #ReturnDeadline
Label #@SYS106124
Table #SalesLine
ExtendedDataType
ARRAY
#ReturnDeadline
#
ENDARRAY
ENDPROPERTIES
FIELD #ExpectedRetQty
Id 171
REAL
PROPERTIES
Name #ExpectedRetQty
Table #SalesLine
ExtendedDataType
ARRAY
#ReturnExpectedRetQty
#
ENDARRAY
ENDPROPERTIES
FIELD #ReturnStatus
Id 172
ENUM
PROPERTIES
Name #ReturnStatus
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
EnumType #ReturnStatusLine
ENDPROPERTIES
FIELD #ReturnArrivalDate
Id 173
DATE
PROPERTIES
Name #ReturnArrivalDate
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#ReturnArrivalDate
#
ENDARRAY
ENDPROPERTIES
FIELD #ReturnClosedDate
Id 174
DATE
PROPERTIES
Name #ReturnClosedDate
AllowEditOnCreate #No
AllowEdit #No
Table #SalesLine
ExtendedDataType
ARRAY
#ReturnClosedDate
#
ENDARRAY
ENDPROPERTIES
FIELD #ReturnDispositionCodeId
Id 175
STRING
PROPERTIES
Name #ReturnDispositionCodeId
Table #SalesLine
ExtendedDataType
ARRAY
#ReturnDispositionCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemPBAId
Id 8001
STRING
PROPERTIES
Name #ItemPBAId
Table #SalesLine
ExtendedDataType
ARRAY
#PBAId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CGranDueDate
Id 30001
DATE
PROPERTIES
Name #CGranDueDate
Table #SalesLine
ExtendedDataType
ARRAY
#DueDate
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#SalesId
#ItemId
#SalesQty
#SalesPrice
#LineAmount
#CurrencyCode
#SalesStatus
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressDisplay
PROPERTIES
Name #AddressDisplay
Label #@SYS9362
ENDPROPERTIES
GROUPFIELDS
#DeliveryAddress
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressLookup
PROPERTIES
Name #AddressLookup
Label #@SYS88672
ENDPROPERTIES
GROUPFIELDS
#LineNum
#SalesId
#CustAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressReference
PROPERTIES
Name #AddressReference
Label #@SYS88679
ENDPROPERTIES
GROUPFIELDS
#AddressRefRecId
#AddressRefTableId
ENDGROUPFIELDS
ENDGROUP
GROUP #Barcode
PROPERTIES
Name #Barcode
Label #@SYS24296
ENDPROPERTIES
GROUPFIELDS
#BarCode
#BarCodeType
ENDGROUPFIELDS
ENDGROUP
GROUP #BlanketOrder
PROPERTIES
Name #BlanketOrder
Label #@SYS101267
ENDPROPERTIES
GROUPFIELDS
#BlanketRefTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #Block
PROPERTIES
Name #Block
Label #@SYS28075
ENDPROPERTIES
GROUPFIELDS
#Complete
#Blocked
ENDGROUPFIELDS
ENDGROUP
GROUP #BOMRoute
PROPERTIES
Name #BOMRoute
Label #@SYS22227
ENDPROPERTIES
GROUPFIELDS
#ItemBOMId
#ItemRouteId
#ItemPBAId
ENDGROUPFIELDS
ENDGROUP
GROUP #CarrierInfo
PROPERTIES
Name #CarrierInfo
Label #@SYS50722
ENDPROPERTIES
GROUPFIELDS
#ShipCarrierId
#ShipCarrierAccountCode
#ShipCarrierAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #Commission
PROPERTIES
Name #Commission
Label #@SYS2489
ENDPROPERTIES
GROUPFIELDS
#SalesGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #CustomerRef
PROPERTIES
Name #CustomerRef
Label #@SYS23010
ENDPROPERTIES
GROUPFIELDS
#PurchorderFormNum
#CustomerRef
ENDGROUPFIELDS
ENDGROUP
GROUP #Delivery
PROPERTIES
Name #Delivery
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#OverDeliveryPct
#UnderDeliveryPct
#ReceiptDateRequested
#ShippingDateRequested
#ReceiptDateConfirmed
#ShippingDateConfirmed
#DeliveryDateControlType
#DlvMode
#DeliveryType
ENDGROUPFIELDS
ENDGROUP
GROUP #DeliveryAddress
PROPERTIES
Name #DeliveryAddress
Label #@SYS7924
ENDPROPERTIES
GROUPFIELDS
#DeliveryName
#DeliveryStreet
#DeliveryZipCode
#DeliveryCity
#DeliveryCounty
#DeliveryState
#DeliveryCountryRegionId
ENDGROUPFIELDS
ENDGROUP
GROUP #Dimension
PROPERTIES
Name #Dimension
Label #@SYS5951
ENDPROPERTIES
GROUPFIELDS
#Dimension
ENDGROUPFIELDS
ENDGROUP
GROUP #Discount
PROPERTIES
Name #Discount
Label #@SYS11829
ENDPROPERTIES
GROUPFIELDS
#LineDisc
#LinePercent
#MultiLnDisc
#MultiLnPercent
ENDGROUPFIELDS
ENDGROUP
GROUP #EInvoice
PROPERTIES
Name #EInvoice
Label #@SYS100769
ENDPROPERTIES
GROUPFIELDS
#EInvoiceAccountCode
ENDGROUPFIELDS
ENDGROUP
GROUP #ExternalReference
PROPERTIES
Name #ExternalReference
Label #@SYS21697
ENDPROPERTIES
GROUPFIELDS
#CustomerLineNum
ENDGROUPFIELDS
ENDGROUP
GROUP #ForeignTrade
PROPERTIES
Name #ForeignTrade
Label #@SYS27650
ENDPROPERTIES
GROUPFIELDS
#TransactionCode
#Transport
#Port
#StatProcId
#StatTriangularDeal
#CountyOrigDest
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#SalesId
#LineNum
ENDGROUPFIELDS
ENDGROUP
GROUP #Intercompany
PROPERTIES
Name #Intercompany
Label #@SYS74106
ENDPROPERTIES
GROUPFIELDS
#interCompanyOriginDisplay
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompanyReference
PROPERTIES
Name #InterCompanyReference
Label #@SYS14018
ENDPROPERTIES
GROUPFIELDS
#InterCompanyInventTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #Inventory
PROPERTIES
Name #Inventory
Label #@SYS981
ENDPROPERTIES
GROUPFIELDS
#InventTransId
#Reservation
#QtyOrdered
#RemainInventPhysical
#InventDeliverNow
#RemainInventFinancial
ENDGROUPFIELDS
ENDGROUP
GROUP #ItemProject
PROPERTIES
Name #ItemProject
Label #@SYS70466
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #ItemReference
PROPERTIES
Name #ItemReference
Label #@SYS24659
ENDPROPERTIES
GROUPFIELDS
#InventRefType
#InventRefId
#InventRefTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #OrderLines
PROPERTIES
Name #OrderLines
Label #@SYS508
ENDPROPERTIES
GROUPFIELDS
#TaxAutogenerated
#CustAccount
#CustGroup
#SalesType
#Name
#ExternalItemId
#SalesStatus
#LedgerAccount
#CurrencyCode
#LineAmount
#Reservation
#SalesGroup
#InventDimId
#LineHeader
ENDGROUPFIELDS
ENDGROUP
GROUP #Other
PROPERTIES
Name #Other
Label #@SYS1284
ENDPROPERTIES
GROUPFIELDS
#ShipCarrierDlvType
ENDGROUPFIELDS
ENDGROUP
GROUP #PackagingMaterial
PROPERTIES
Name #PackagingMaterial
Label #@SYS72995
ENDPROPERTIES
GROUPFIELDS
#PackingUnit
#PackingUnitQty
ENDGROUPFIELDS
ENDGROUP
GROUP #Posting
PROPERTIES
Name #Posting
Label #@SYS5943
ENDPROPERTIES
GROUPFIELDS
#LedgerAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #Price
PROPERTIES
Name #Price
Label #@SYS11865
ENDPROPERTIES
GROUPFIELDS
#SalesPrice
#SalesMarkup
#PriceUnit
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectAmount
PROPERTIES
Name #ProjectAmount
Label #@SYS67870
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectCostPrice
PROPERTIES
Name #ProjectCostPrice
Label #@SYS13134
ENDPROPERTIES
GROUPFIELDS
#SalesQty
#CostPrice
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectIdentification
PROPERTIES
Name #ProjectIdentification
Label #@SYS89920
ENDPROPERTIES
GROUPFIELDS
#ProjId
#ActivityNumber
#ProjCategoryId
#ItemId
#ProjLinePropertyId
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectSalesPrice
PROPERTIES
Name #ProjectSalesPrice
Label #@SYS5755
ENDPROPERTIES
GROUPFIELDS
#CurrencyCode
#SalesUnit
#SalesPrice
#LineAmount
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectSalesTax
PROPERTIES
Name #ProjectSalesTax
Label #@SYS67871
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectTransaction
PROPERTIES
Name #ProjectTransaction
Label #@SYS9408
ENDPROPERTIES
GROUPFIELDS
#ProjTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #Return
PROPERTIES
Name #Return
Label #@SYS16512
ENDPROPERTIES
GROUPFIELDS
#ItemReplaced
#ReturnDeadline
#ExpectedRetQty
#ReturnStatus
#ReturnArrivalDate
#ReturnClosedDate
#ReturnDispositionCodeId
ENDGROUPFIELDS
ENDGROUP
GROUP #ReturnGroup
PROPERTIES
Name #ReturnGroup
Label #@SYS101133
ENDPROPERTIES
GROUPFIELDS
#InventTransIdReturn
#CostPrice
#Scrap
ENDGROUPFIELDS
ENDGROUP
GROUP #ReturnGroupRMA
PROPERTIES
Name #ReturnGroupRMA
Label #@SYS101133
ENDPROPERTIES
GROUPFIELDS
#InventTransIdReturn
#CostPrice
#ReturnDispositionCodeId
#ReturnAllowReservation
ENDGROUPFIELDS
ENDGROUP
GROUP #RFIDTagging
PROPERTIES
Name #RFIDTagging
Label #@SYS90171
ENDPROPERTIES
GROUPFIELDS
#ItemTagging
#CaseTagging
#PalletTagging
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesOrderProject
PROPERTIES
Name #SalesOrderProject
Label #@SYS7806
ENDPROPERTIES
GROUPFIELDS
#ProjId
#ActivityNumber
#ProjCategoryId
#ProjTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesQuantity
PROPERTIES
Name #SalesQuantity
Label #@SYS11990
ENDPROPERTIES
GROUPFIELDS
#SalesQty
#SalesUnit
#SalesDeliverNow
#RemainSalesPhysical
#RemainSalesFinancial
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTax
PROPERTIES
Name #SalesTax
Label #@SYS5878
ENDPROPERTIES
GROUPFIELDS
#TaxItemGroup
#TaxGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #ServiceOrder
PROPERTIES
Name #ServiceOrder
Label #@SYS79077
ENDPROPERTIES
GROUPFIELDS
#ServiceOrderId
ENDGROUPFIELDS
ENDGROUP
GROUP #Status
PROPERTIES
Name #Status
Label #@SYS25587
ENDPROPERTIES
GROUPFIELDS
#SalesStatus
#Blocked
#Complete
ENDGROUPFIELDS
ENDGROUP
GROUP #TableGroup
PROPERTIES
Name #TableGroup
Label #@SYS21958
ENDPROPERTIES
GROUPFIELDS
#ItemId
#ConfirmedDlv
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#SalesLineIdx
Id 1
PROPERTIES
Name #SalesLineIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#SalesId
#LineNum
#RecId
ENDINDEXFIELDS
#InventRefTransIdx
Id 2
PROPERTIES
Name #InventRefTransIdx
ENDPROPERTIES
INDEXFIELDS
#InventRefTransId
#InventRefId
ENDINDEXFIELDS
#TransIdIdx
Id 3
PROPERTIES
Name #TransIdIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#InventTransId
ENDINDEXFIELDS
#ItemIdx
Id 5
PROPERTIES
Name #ItemIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#ItemId
#RecId
ENDINDEXFIELDS
#StatusItemIdx
Id 6
PROPERTIES
Name #StatusItemIdx
ENDPROPERTIES
INDEXFIELDS
#SalesStatus
#ItemId
ENDINDEXFIELDS
#SalesTypeIdx
Id 7
PROPERTIES
Name #SalesTypeIdx
ENDPROPERTIES
INDEXFIELDS
#SalesType
#ProjId
ENDINDEXFIELDS
#InventDimIdx
Id 8
PROPERTIES
Name #InventDimIdx
ENDPROPERTIES
INDEXFIELDS
#InventDimId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #Common
PROPERTIES
Name #Common
Table #Common
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #AddressRefRecId
RelatedField #RecId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AddressRefTableId
RelatedField #TableId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CountyOrigDest
PROPERTIES
Name #CountyOrigDest
Table #AddressCounty
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #CountyOrigDest
RelatedField #CountyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #DeliveryCounty
PROPERTIES
Name #DeliveryCounty
Table #AddressCounty
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryCountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryState
RelatedField #StateId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryCounty
RelatedField #CountyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #DeliveryState
PROPERTIES
Name #DeliveryState
Table #AddressState
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryCountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryState
RelatedField #StateId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #DeliveryZipCode
PROPERTIES
Name #DeliveryZipCode
Table #AddressZipCode
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryZipCode
RelatedField #ZipCode
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #ProdTableRef
PROPERTIES
Name #ProdTableRef
Table #ProdTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #SalesLine
Field #InventRefType
Value #3
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InventRefId
RelatedField #ProdId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchTableRef
PROPERTIES
Name #PurchTableRef
Table #PurchTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #SalesLine
Field #InventRefType
Value #2
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InventRefId
RelatedField #PurchId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesTable
PROPERTIES
Name #SalesTable
Table #SalesTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #SalesId
RelatedField #SalesId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesTableRef
PROPERTIES
Name #SalesTableRef
Table #SalesTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #SalesLine
Field #InventRefType
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InventRefId
RelatedField #SalesId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
#MarkupTrans
PROPERTIES
Table #MarkupTrans
DeleteAction #Cascade
ENDPROPERTIES
#DocuRef
PROPERTIES
Table #DocuRef
DeleteAction #Cascade
ENDPROPERTIES
#CustVendCreditInvoicingLine
PROPERTIES
Table #CustVendCreditInvoicingLine
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #AccountClearing
#//BP Deviation Documented
#display LedgerAccount accountClearing(SalesTable _salesTable = this.salesTable())
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# return salesLineType.accountClearing(_salesTable);
#}
ENDSOURCE
SOURCE #AccountConsumption
#//BP Deviation Documented
#display LedgerAccount accountConsumption(InventTable _inventTable = this.inventTable())
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# return salesLineType.accountConsumption(_inventTable);
#}
ENDSOURCE
SOURCE #AccountCust
#//BP Deviation Documented
#display LedgerAccount accountCust(SalesTable _salesTable = this.salesTable())
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# return salesLineType.accountCust(_salesTable);
#}
ENDSOURCE
SOURCE #AccountDisc
#//BP Deviation Documented
#display LedgerAccount accountDisc(InventTable _inventTable = this.inventTable())
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# return salesLineType.accountDisc(_inventTable);
#}
ENDSOURCE
SOURCE #AccountIssue
#//BP Deviation Documented
#display LedgerAccount accountIssue(InventTable _inventTable = this.inventTable())
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# return salesLineType.accountIssue(_inventTable);
#}
ENDSOURCE
SOURCE #AccountSales
#//BP Deviation Documented
#display LedgerAccount accountSales(InventTable _inventTable = this.inventTable())
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# return salesLineType.accountSales(_inventTable);
#}
ENDSOURCE
SOURCE #amountCur
#AmountCur amountCur(AmountMST amountMST,
# TransDate exchRateDate = systemdateget(),
# ExchRate exchRate = this.salesTable().fixedExchRate(),
# ExchrateSecondary exchrateSecondary = this.salesTable().fixedExchRateSecondary(),
# ExchRatesTriangulation exchRatesTriangulation = this.salesTable().fixedEuroTriangulation())
#{
# return this.SalesPurchLine::amountCur(amountMST, exchRateDate, exchRate, exchrateSecondary, exchRatesTriangulation);
#}
ENDSOURCE
SOURCE #amountExclTax
#AmountCur amountExclTax(AmountCur amountCur, Qty qty, TransDate transDate, boolean _rounded = true)
#{
# return this.SalesPurchLine::amountExclTax(amountCur, qty, transDate, _rounded);
#}
ENDSOURCE
SOURCE #amountMST
#AmountMST amountMST(AmountCur amountCur,
# TransDate exchRateDate = systemdateget(),
# ExchRate exchRate = this.salesTable().fixedExchRate(),
# ExchrateSecondary exchrateSecondary = this.salesTable().fixedExchRateSecondary(),
# ExchRatesTriangulation exchRatesTriangulation = this.salesTable().fixedEuroTriangulation())
#{
# return this.SalesPurchLine::amountMST(amountCur, exchRateDate, exchRate, exchrateSecondary, exchRatesTriangulation);
#}
#
ENDSOURCE
SOURCE #AxSalesLine
#public AxSalesLine axSalesLine()
#{
# AxSalesLine axSalesLine = new AxSalesLine();
# ;
# axSalesLine.salesLine(this);
# return axSalesLine;
#}
ENDSOURCE
SOURCE #calcCostAmount
#server CostAmount calcCostAmount(InventQty inventQty = this.QtyOrdered)
#{
# CostAmount costAmount = 0;
# InventQty costInventQty;
# AmountCur costInventValue;
#
# if (inventQty > 0)
# {
# [costInventQty, costInventValue] = InventTrans::calcCostValue(this.InventTransId);
# if (costInventQty)
# {
# costAmount = Currency::amount(inventQty * (costInventValue/costInventQty));
# }
# }
# else
# {
# costAmount = this.calcReturnCostAmount(inventQty);
# }
#
# return costAmount;
#}
ENDSOURCE
SOURCE #calcGrossAmount
#AmountCur calcGrossAmount(Qty qty = this.SalesQty)
#{
# return this.SalesPurchLine::calcGrossAmount(qty);
#}
#
ENDSOURCE
SOURCE #calcGrossAmountExclTax
#AmountCur calcGrossAmountExclTax(Qty qty = this.SalesQty, TransDate transDate = systemdateget(), boolean _rounded = true)
#{
# return this.SalesPurchLine::calcGrossAmountExclTax(qty, this.taxDate(transDate), _rounded);
#}
ENDSOURCE
SOURCE #CalcLineAmount
#AmountCur calcLineAmount(Qty qty = this.SalesQty)
#{
# return this.SalesPurchLine::calcLineAmount(qty);
#}
ENDSOURCE
SOURCE #calcLineAmountExclTax
#AmountCur calcLineAmountExclTax(Qty qty = this.SalesQty, TransDate transDate = systemdateget(), boolean _rounded = true)
#{
# return this.SalesPurchLine::calcLineAmountExclTax(qty, this.taxDate(transDate), _rounded);
#}
ENDSOURCE
SOURCE #calcLineAmountForced
#AmountCur calcLineAmountForced(Qty _qty = this.SalesQty)
#{
# return this.SalesPurchLine::calcLineAmountForced(_qty);
#}
ENDSOURCE
SOURCE #CalcLineDisc
#DiscAmount calcLineDisc(Qty qty = this.SalesQty)
#{
# return this.SalesPurchLine::calcLineDisc(qty);
#}
ENDSOURCE
SOURCE #calcLineDiscExclTax
#DiscAmount calcLineDiscExclTax(Qty qty = this.SalesQty, TransDate transDate = systemdateget())
#{
# return this.SalesPurchLine::calcLineDiscExclTax(qty, this.taxDate(transDate));
#}
ENDSOURCE
SOURCE #calcPackingUnit
#void calcPackingUnit(InventDim _inventDim = this.inventDim())
#{
# ;
# this.PackingUnit = InventPackagingUnit::findSalesPackingUnit(this.ItemId,
# _inventDim);
#}
ENDSOURCE
SOURCE #calcPackingUnitQty
#void calcPackingUnitQty(InventDim _inventDim = this.inventDim())
#{
# ;
# this.PackingUnitQty = InventPackagingUnit::calcPackingUnitQty(this.PackingUnit,
# this.QtyOrdered,
# this.ItemId,
# _inventDim);
#}
ENDSOURCE
SOURCE #calcPrice2LineAmount
#AmountCur calcPrice2LineAmount(Qty _qty, boolean _forceLineAmountCalculation)
#{
# return this.SalesPurchLine::calcPrice2LineAmount(_qty, _forceLineAmountCalculation);
#}
ENDSOURCE
SOURCE #CalcQtyOrdered
#InventQty calcQtyOrdered(Qty salesQty = this.SalesQty)
#{
# return this.SalesPurchLine::calcQtyOrdered(salesQty);
#}
ENDSOURCE
SOURCE #CalcReturnCostAmount
#CostAmount calcReturnCostAmount(InventQty qty)
#{
# return Currency::amount(qty * this.CostPrice);
#}
ENDSOURCE
SOURCE #CanBeInvoiced
#boolean canBeInvoiced()
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# return salesLineType.canBeInvoiced();
#}
ENDSOURCE
SOURCE #canEditDisc
#// This method is called when setting disc fields
#boolean canEditDisc()
#{
# return this.salesTable().type().editDisc();
#}
ENDSOURCE
SOURCE #checkActivity
#boolean checkActivity()
#{
# RecId projRecId;
# ;
#
# if (this.ActivityNumber)
# {
# if (!ProjActivity::find(this.ActivityNumber))
# {
# return checkFailed(strfmt("@SYS50966",this.ActivityNumber));
# }
#
# //validate activity is associated to Project
# projRecId = ProjTable::find(this.ProjId).RecId;
#
# if (smmActivityParentLinkTable::find(this.ActivityNumber, smmActivityParentType::Project, projRecId).RecId == 0)
# {
# return checkFailed(strfmt("@SYS105858",this.ActivityNumber, this.ProjId));
# }
# }
# return true;
#}
#
ENDSOURCE
SOURCE #checkAndPromptFixedLineAmount
#boolean checkAndPromptFixedLineAmount()
#{
# return this.PriceDiscLine::checkAndPromptFixedLineAmount();
#}
#
ENDSOURCE
SOURCE #checkCreditLimit
#public void checkCreditLimit()
#{
# ;
# this.type().checkAgainstCreditLimit();
#}
#
ENDSOURCE
SOURCE #CheckCurrencyCode
#boolean checkCurrencyCode()
#{
# boolean ok = true;
# ;
#
# if (this.CurrencyCode && ! Currency::exist(this.CurrencyCode))
# ok = checkFailed(strfmt("@SYS1458", this.CurrencyCode));
#
# if (this.salesTable().CurrencyCode != this.CurrencyCode)
# ok = checkFailed("@SYS20794");
#
# return ok;
#}
ENDSOURCE
SOURCE #checkDelete
#boolean checkDelete(boolean _useWarning = true)
#{
# return this.type().checkDelete(_useWarning);
#}
ENDSOURCE
SOURCE #checkIfMarked
#//BP Deviation Documented
#display ImageRes checkIfMarked()
#{
# #resAppl
# InventQtyMarked qtyMarked;
# ;
#
# qtyMarked = this.qtyMarked();
#
# if(qtyMarked)
# return #ImageWarning;
#
# return 0;
#}
ENDSOURCE
SOURCE #checkIfUpdate
#server container checkIfUpdate()
#{
# return this.type().checkIfUpdate();
#}
#
ENDSOURCE
SOURCE #CheckInitFromInventTable
#boolean checkInitFromInventTable(InventTable inventTable)
#{
# return this.SalesPurchLine::checkInitFromInventTable(inventTable);
#}
ENDSOURCE
SOURCE #checkItemBOMIdRouteId
#///
#/// Checks if the fields ItemBOMId and ItemRouteId regarding the sales line are valid.
#///
#///
#/// A boolean that determines whether the inventory dimension Site is active for the item specified on the sales line.
#///
#///
#/// true if both fields contain valid values; otherwise, false.
#///
#public boolean checkItemBOMIdRouteId(boolean _siteActive)
#{
# BOMTable bomTable;
# boolean ok = true;
# InventSiteId salesSiteId;
# ;
#
# if ( (this.ItemBOMId || this.ItemRouteId)
# && _siteActive)
# {
# salesSiteId = this.inventDim().InventSiteId;
#
# // Check if a route version record exist for the sales site.
# if ( this.ItemRouteId
# && ! RouteVersion::checkExistInventSiteId(this.ItemId,this.ItemRouteId,salesSiteId))
# {
# ok = checkFailed(strfmt("@SYS78966",fieldid2pname(this.TableId, fieldnum(SalesLine,ItemRouteId))));
# }
#
# // Check if the site for the BOM conflicts with the sales site.
# if (this.ItemBOMId)
# {
# bomTable = BOMTable::find(this.ItemBOMId);
#
# if (bomTable.SiteId && bomTable.SiteId != salesSiteId)
# {
# checkFailed("@SYS110650");
# ok = checkFailed(strfmt("@SYS78966",fieldid2pname(this.TableId, fieldnum(SalesLine,ItemBOMId))));
# }
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckItemId
#boolean checkItemId()
#{
# boolean ok = true;
# ;
#
# if (this.orig().ItemId &&
# this.orig().ItemId != this.ItemId &&
# this.InventTransId)
# {
# ok = checkFailed("@SYS19376");
# }
#
# if (this.SalesStatus != SalesStatus::Invoiced && !this.inventTable().inventItemSalesSetup(this.InventDimId).checkNotStopped(false))
# ok = false;
#
# if (this.salesTable().isInterCompanyOrder() && this.inventTable().interCompanyBlockedSales())
# ok = checkFailed(strfmt("@SYS74812", this.ItemId));
#
# return ok;
#}
ENDSOURCE
SOURCE #checkItemPBAId
#boolean checkItemPBAId()
#{
# boolean ok = true;
# ;
# if ( new DictConfigurationKey( configurationkeynum( PBA_ProductBuilder ) ).enabled() )
# {
# if ( InventTable::find( this.ItemId ).pbaItemConfigurable == NoYes::Yes )
# {
# if ( ! PBAVersion::existsVersion(this.ItemId,this.ItemPBAId) )
# {
# ok = checkFailed(strfmt("@SYS41402",this.ItemPBAId, this.ItemId));
# }
# }
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #CheckLedgerAccount
#boolean checkLedgerAccount()
#{
# boolean ok = true;
# ;
#
# if (this.LedgerAccount)
# ok = LedgerTable::checkPosting(this.LedgerAccount, this.postingSales());
#
# if (ok)
# ok = LedgerTable::checkTransactionAccount(this.LedgerAccount);
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckOverDelivery
#boolean checkOverDelivery()
#{
# boolean ok = true;
# ;
#
# if (this.OverDeliveryPct < 0)
# ok = checkFailed("@SYS26776");
#
# return ok;
#}
ENDSOURCE
SOURCE #checkProjCategory
#boolean checkProjCategory()
#{
# ProjCategory projCategory;
# boolean ok = true;
# ;
#
# if (this.ProjCategoryId)
# {
# projCategory = ProjCategory::find(this.ProjCategoryId);
#
# if (projCategory.CategoryType != ProjCategoryType::Item)
# ok = checkFailed(strfmt("@SYS56468",ProjCategoryType::Item));
#
# ok = ok && projCategory.validateIfInactiveAllowed();
# }
# return ok;
#}
ENDSOURCE
SOURCE #checkReleaseOrderLines
#boolean checkReleaseOrderLines(SalesBlanketRefTransId _blanketRefTransId)
#{
# boolean ok = true;
# SalesLine salesLine;
# ;
#
# if (_blanketRefTransId)
# {
# select firstonly RecId from salesLine
# where salesLine.BlanketRefTransId == _blanketRefTransId;
#
# if (salesLine.RecId)
# {
# ok = checkFailed("@SYS112340");
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkReqActivity
#boolean checkReqActivity()
#{
# RequireActivity requireActivity;
# boolean ret = true;
# ;
#
# requireActivity = ProjTable::checkRequireActivity(this.ProjId,tablenum(ProjItemTrans));
# if (requireActivity && (!this.ActivityNumber))
# {
# ret = false;
# }
# return ret;
#}
#
ENDSOURCE
SOURCE #checkReservation
#boolean checkReservation()
#{
# InventMovement movement;
# InventQty reserveNow;
# InventOnhand inventOnhand;
# SalesLine salesLine;
# InventMovement orig_movement;
# ;
#
# movement = InventMovement::construct(this);
# if (movement.mustBeAutoReserved() || movement.transIdSum().onOrder())
# {
# orig_movement = InventMovement::construct(salesLine);
# reserveNow = movement.autoReserveQty(orig_movement); // NULl
# if (reserveNow > 0)
# {
# infolog.emptyTmpInfolog();
# infolog.viewUpdate();
#
# setprefix(strfmt("@SYS24300",this.ItemId));
# inventOnhand = InventOnhand::newEstimatedUpdate(movement,movement.inventdim());
# return inventOnhand.checkReservation(-reserveNow,NoYes::No,InventParameters::find().ReserveOnOrdered);
# }
# }
# return true;
#}
ENDSOURCE
SOURCE #checkReservationField
#boolean checkReservationField()
#{
# boolean ok = true;
# ;
#
# if (this.InventRefTransId
# && this.Reservation == ItemReservation::Explosion)
# ok = checkFailed("@SYS105404");
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckSalesType
#boolean checkSalesType()
#{
# if (this.salesTable().SalesType != this.SalesType)
# return checkFailed("@SYS17570");
#
# return true;
#}
ENDSOURCE
SOURCE #checkSalesUnit
#boolean checkSalesUnit()
#{
# boolean ok = true;
# ;
#
# if (!UnitConvert::canConvert(InventTable::find(this.ItemId).inventUnitId(), this.SalesUnit, this.ItemId))
# ok = checkFailed(strfmt("@SYS28690", InventTable::find(this.ItemId).inventUnitId(), this.SalesUnit));
#
# if (this.RecId &&
# this.SalesUnit != this.orig().SalesUnit &&
# this.orig().SalesQty != this.RemainSalesPhysical)
# {
# ok = checkFailed(strfmt("@SYS81897", this.ItemId));
# }
#
# if (this.BlanketRefTransId &&
# this.RecId && (this.SalesUnit != this.orig().SalesUnit))
# ok = checkFailed("@SYS83498");
#
# if (ok)
# ok = this.type().checkSalesUnit();
#
# if (ok
# && this.SalesUnit != this.orig().SalesUnit)
# ok = !this.interCompanyIsBeingUpdated();
#
# return ok;
#}
#
ENDSOURCE
SOURCE #CheckTaxItemGroup
#boolean checkTaxItemGroup()
#{
# if (this.TaxItemGroup && ! TaxItemGroupHeading::exist(this.TaxItemGroup))
# return checkFailed(strfmt("@SYS21973", this.TaxItemGroup));
#
# return true;
#}
ENDSOURCE
SOURCE #CheckUnderdelivery
#boolean checkUnderDelivery()
#{
# boolean ok = true;
# ;
#
# if (this.UnderDeliveryPct > 100)
# ok = checkFailed("@SYS26778");
#
# return ok;
#}
ENDSOURCE
SOURCE #checkUpdatePhysical
#boolean checkUpdatePhysical()
#{
# return this.type().checkUpdatePhysical();
#}
ENDSOURCE
SOURCE #checkUpdatePicked
#boolean checkUpdatePicked()
#{
# return this.type().checkUpdatePicked();
#}
#
ENDSOURCE
SOURCE #clearAddressReference
#public void clearAddressReference()
#{
# this.AddressRefRecId = 0;
# this.AddressRefTableId = 0;
#}
ENDSOURCE
SOURCE #ConfigId
#// PBa
#//BP Deviation Documented
#display ConfigId configId()
#{
# return this.inventDim().ConfigId;
#}
ENDSOURCE
SOURCE #ConfigIdChanged
#server void configIdChanged()
#{
# this.initFromInventTable(this.inventTable());
#}
#
ENDSOURCE
SOURCE #convertCurrencyCode
#server void convertCurrencyCode(CurrencyCode currencyCode, TradeCurencyConversion tradeCurencyConversion = TradeCurencyConversion::ExchRate)
#{
# MarkupTrans markupTrans;
#
# ttsbegin;
#
# while select forupdate markupTrans
# index hint TableRecIdIdx
# where markupTrans.TransTableId == this.TableId &&
# markupTrans.TransRecId == this.RecId
# {
# markupTrans.convertCurrencyCode(currencyCode);
# markupTrans.doUpdate();
# }
#
# this.SalesPrice = Currency::curPrice2CurPrice(this.SalesPrice, this.CurrencyCode, currencyCode);
# this.LineDisc = Currency::curPrice2CurPrice(this.LineDisc, this.CurrencyCode, currencyCode);
# this.MultiLnDisc = Currency::curPrice2CurPrice(this.MultiLnDisc, this.CurrencyCode, currencyCode);
# this.SalesMarkup = Currency::curPrice2CurPrice(this.SalesMarkup, this.CurrencyCode, currencyCode);
# this.LineAmount = Currency::curAmount2CurAmount(this.LineAmount, this.CurrencyCode, currencyCode);
# this.CurrencyCode = currencyCode;
#
# switch(tradeCurencyConversion)
# {
# case TradeCurencyConversion::ExchRate:
# break;
# case TradeCurencyConversion::TradeAgreements:
# this.SalesPurchLine::resetPriceAgreement();
# this.setPriceDisc(this.inventDim());
# break;
# }
# this.LineAmount = this.calcLineAmount();
#
# ttscommit;
#}
ENDSOURCE
SOURCE #copyDimension
#///
#/// Returns a dimension set that can be applied to the SalesLine.dimension field.
#/// The method ensures that potential linked dimensions are not overwritten.
#///
#///
#/// A dimension set that should be applied to the SalesLine.dimension field.
#///
#///
#/// A dimensionCopy object previously instantiated using the current SalesLine buffer; optional.
#///
#///
#/// Dimension set that can be applied to the SalesLine.dimension field.
#///
#public Dimension copyDimension(Dimension _dimension, DimensionCopy _dimensionCopy = DimensionCopy::newFromTable(this))
#{
# return _dimensionCopy.copy(_dimension);
#}
ENDSOURCE
SOURCE #copyShipCarrierInformation
#void copyShipCarrierInformation(SalesLine _salesLine)
#{
# DlvMode dlvMode = DlvMode::find(_salesLine.DlvMode);
# ;
#
# this.ShipCarrierId = dlvMode.ShipCarrierId;
# this.ShipCarrierAccountCode = dlvMode.ShipCarrierAccountCode;
# this.ShipCarrierDlvType = dlvMode.ShipCarrierDlvType;
# this.ShipCarrierAccount = _salesLine.ShipCarrierAccount;
#}
ENDSOURCE
SOURCE #createFromSalesQuotationLine
#void createFromSalesQuotationLine(SalesQuotationLine _salesQuotationLine)
#{
# SalesTable salesTable;
# ProjTable projTable;
# InventTableModule inventTableModule = InventTableModule::find(_salesQuotationLine.ItemId, ModuleInventPurchSales::Sales);
# InventDim inventDim = InventDim::find(_salesQuotationLine.InventDimId);
# ;
#
# projTable = ProjTable::find(_salesQuotationLine.projId());
#
#
# salesTable = projTable.salesTable_ItemReq(_salesQuotationLine.CurrencyCode);
# if (!salesTable)
# {
# salesTable = projTable.createSalesTable_ItemReqFromSQ(_salesQuotationLine);
# }
#
# this.clear();
#
# this.initValue();
#
# this.SalesId = salesTable.SalesId;
# this.SalesType = salesTable.SalesType;
# this.CurrencyCode = _salesQuotationLine.CurrencyCode;
#
# this.ProjId = salesTable.ProjId;
# this.ItemId = _salesQuotationLine.ItemId;
#
# this.ProjCategoryId = _salesQuotationLine.ProjCategoryId;
# this.ProjLinePropertyId = _salesQuotationLine.LinePropertyId;
#
# //Sales Group
# this.SalesGroup = _salesQuotationLine.SalesGroup;
#
# this.CustomerRef = salesTable.CustomerRef;
# this.PurchorderFormNum = salesTable.PurchOrderFormNum;
# this.CustAccount = salesTable.CustAccount;
# this.CustGroup = salesTable.CustGroup;
#
#//General
#
# //Sales tax
# this.TaxItemGroup = _salesQuotationLine.TaxItemGroup;
# this.TaxGroup = _salesQuotationLine.TaxGroup;
#
#//Setup
#
# //Delivery
# this.SalesUnit = inventTableModule.UnitId;
# this.OverDeliveryPct = _salesQuotationLine.OverDeliveryPct;
# this.UnderDeliveryPct = _salesQuotationLine.UnderDeliveryPct;
# this.ReceiptDateRequested = _salesQuotationLine.ReceiptDateRequested;
# this.ShippingDateRequested = _salesQuotationLine.ShippingDateRequested;
# this.ShippingDateConfirmed = salesTable.ShippingDateConfirmed;
# this.ReceiptDateConfirmed = salesTable.ReceiptDateConfirmed;
# this.DeliveryDateControlType = _salesQuotationLine.DeliveryDateControlType;
# this.DlvMode = _salesQuotationLine.DlvMode;
#
# //RFID tagging
# this.ItemTagging = _salesQuotationLine.ItemTagging;
# this.CaseTagging = _salesQuotationLine.CaseTagging;
# this.PalletTagging = _salesQuotationLine.PalletTagging;
#
#//Address
#
# //Delivery address
# this.DeliveryName = _salesQuotationLine.DeliveryName;
# this.DeliveryStreet = _salesQuotationLine.DeliveryStreet;
# this.DeliveryZipCode = _salesQuotationLine.DeliveryZipCode;
# this.DeliveryCity = _salesQuotationLine.DeliveryCity;
# this.DeliveryCounty = _salesQuotationLine.DeliveryCounty;
# this.DeliveryState = _salesQuotationLine.DeliveryState;
# this.DeliveryCountryRegionId = _salesQuotationLine.DeliveryCountryRegionId;
#
# //Address
# this.DeliveryAddress = _salesQuotationLine.DeliveryAddress;
#
# this.AddressRefRecId = _salesQuotationLine.AddressRefRecId;
# this.AddressRefTableId = _salesQuotationLine.AddressRefTableId;
#
#//Price/Discount
#
# //Discount
#
# //Project - quantity
# this.SalesQty = _salesQuotationLine.SalesQty;
# this.QtyOrdered = this.calcQtyOrdered();
# this.PriceUnit = _salesQuotationLine.PriceUnit;
#
# //Project - cost amount
# this.CostPrice = _salesQuotationLine.CostPrice;
#
# //Project - sales amount
# this.SalesPrice = _salesQuotationLine.SalesPrice;
# this.SalesMarkup = _salesQuotationLine.SalesMarkup;
# this.LineAmount = _salesQuotationLine.LineAmount;
#
#//Other
#
# //Item
# this.Name = _salesQuotationLine.Name;
# this.ExternalItemId = _salesQuotationLine.ExternalItemId;
#
# //Project dates
# this.ConfirmedDlv = _salesQuotationLine.ConfirmedDlv;
#
# //Bar code
# this.BarCode = _salesQuotationLine.BarCode;
# this.BarCodeType = _salesQuotationLine.BarCodeType;
#
# //BOM/route
# this.ItemBOMId = _salesQuotationLine.ItemBOMId;
# this.ItemRouteId = _salesQuotationLine.ItemRouteId;
# this.ItemPBAId = _salesQuotationLine.ItemPBAId;
#
# //Foreign trade
# this.TransactionCode = _salesQuotationLine.TransactionCode;
# this.Transport = _salesQuotationLine.Transport;
# this.Port = _salesQuotationLine.Port;
# this.StatProcId = _salesQuotationLine.StatProcId;
# this.CountyOrigDest = _salesQuotationLine.CountyOrigDest;
# this.StatTriangularDeal = _salesQuotationLine.StatTriangularDeal;
#
#
#//Dimension
#
# //Inventory dimensions
# this.setInventDimId(_salesQuotationLine.InventDimId, inventDim);
# this.calcPackingUnit(inventDim);
# this.calcPackingUnitQty(inventDim);
#
# //Dimensions
# this.Dimension = this.copyDimension(_salesQuotationLine.Dimension);
#
#
#//Create line
#
# this.createLine( false, // validation
# false, // initFromSalesTable
# false, // initFromInventTableModule
# true, // calcInventQty
# false, // searchMarkup
# false, // searchPrice
# salesTable.Reservation==ItemReservation::Automatic, // checkReservation
# true, // skipCreditLimitCheck
# this.ItemPBAId ? _salesQuotationLine.InventTransId : ''); // used to forward the config info from the "old" inventTransId to the new sales line
#
#}
#
ENDSOURCE
SOURCE #createFromTmpFrmVirtual
#void createFromTmpFrmVirtual(SalesTable _salesTable, TmpFrmVirtual tmpFrmVirtual)
#{
# ;
#
# while select tmpFrmVirtual
# where tmpFrmVirtual.Qty
# {
# try
# {
# this.clear();
# this.ProjId = _salesTable.ProjId;
# this.SalesType = _salesTable.SalesType;
# this.initValue();
# this.SalesId = _salesTable.SalesId;
# this.ItemId = tmpFrmVirtual.ItemId;
# this.SalesQty = tmpFrmVirtual.Qty;
# this.setInventDimId(tmpFrmVirtual.InventDimId);
#
# this.createLine(true, // validation
# true, // initFromSalesTable
# true, // initFromInventTableModule
# true, // calcInventQty
# true, // searchMarkup
# true, // searchPrice
# _salesTable.Reservation==ItemReservation::Automatic, // checkReservation
# true); // skipCreditLimitCheck
#
# tmpFrmVirtual.delete();
# }
#
# catch (Exception::Error)
# {
# checkFailed("@SYS18447");
# }
# }
#}
#
ENDSOURCE
SOURCE #CreateLine
#server void createLine(boolean validation = false,
# boolean initFromSalesOrderTable = false,
# boolean initFromInventTable = false,
# boolean calcInventQty = false,
# boolean searchMarkup = true,
# boolean searchPrice = false,
# boolean checkReservation = false,
# boolean skipCreditLimitCheck = false,
# InventTransId oldInventTransId = '')
#{
# SalesTable salesTable;
# InventTable inventTable;
# boolean dropInvent = false;
# ;
#
# if (initFromSalesOrderTable)
# {
# salesTable = this.salesTable();
# this.initFromSalesTable(salesTable);
# }
#
# if (initFromInventTable)
# {
# inventTable = this.inventTable();
#
# if (!this.checkInitFromInventTable(inventTable))
# throw error("@SYS18447");
#
# this.initFromInventTable(inventTable);
# }
#
# if (calcInventQty)
# this.QtyOrdered = this.calcQtyOrdered();
#
# this.RemainSalesPhysical = this.SalesQty;
# this.RemainSalesFinancial = 0;
# this.RemainInventPhysical = this.QtyOrdered;
#
# if (searchPrice)
# {
# this.setPriceDisc(this.inventDim());
# }
#
# if (checkReservation)
# this.checkReservation(); // Message to infolog
#
# if (validation)
# if (!this.validateWrite(skipCreditLimitCheck))
# throw error("@SYS18447");
#
# if (!this.LineNum)
# this.LineNum = SalesLine::lastLineNum(this.SalesId) + 1.0;
#
# this.insert(dropInvent,searchMarkup, null, skipCreditLimitCheck);
#
# if (oldInventTransId)
# {
# PBATableInstance::copyInstance(this.InventTransId,oldInventTransId);
# PBABOMRouteOccurrence::copyOccurrence(this.InventTransId,oldInventTransId);
# }
#}
#
ENDSOURCE
SOURCE #createMarkupTrans
#server void createMarkupTrans(SalesTable salesTable)
#{;
# if (this.markupAllowed())
# {
# Markup::insertMarkupTrans(HeadingLine::Linie,
# ModuleInventCustVend::Cust,
# this,
# salesTable.CustAccount,
# salesTable.MarkupGroup,
# salesTable.CurrencyCode,
# salesTable.LanguageId,
# this.ItemId,
# this.inventTable().salesMarkupGroup(),
# (this.LineAmount < 0)); // invert sign on creditnotes
# }
#}
ENDSOURCE
SOURCE #createReplacement
#///
#/// Creates replacement lines for each entry in return replacement table existing for sales order line(return order line).
#///
#///
#/// Created a new sales order if replacement sales order is not specified.
#///
#public void createReplacement()
#{
# ReturnReplaceItemRef replaceItemRef;
# SalesTable replacementOrder;
# SalesTable salesTable, salesTableUpdate;
# SalesLine replacementLine;
# ;
#
# salesTable = this.salesTable();
# replacementOrder = SalesTable::find(salesTable.ReturnReplacementId);
#
# ttsbegin;
# while select forupdate replaceItemRef
# where replaceItemRef.OrigSalesId == this.SalesId
# && replaceItemRef.OrigSalesLineNum == this.LineNum
# && replaceItemRef.ReplaceSalesId == ''
# {
#
# if (!replacementOrder)
# {
# // create a new sales order
# replacementOrder = SalesTable::createSalesTable_Replacement(salesTable.CustAccount, salesTable.CurrencyCode, salesTable.ReturnItemNum);
# // update original sales order with replacement order Id
# salesTableUpdate = SalesTable::find(salesTable.SalesId,true);
# salesTableUpdate.ReturnReplacementId = replacementOrder.SalesId;
# salesTableUpdate.update();
# }
#
# // create replacement lines
# replacementLine.clear();
# replacementLine.initFromSalesTable(replacementOrder);
# replacementLine.ItemId = replaceItemRef.ItemId;
# replacementLine.SalesQty = replaceItemRef.ReturnReplaceQty;
# replacementLine.setInventDimId(replaceItemRef.InventDimId);
#
# replacementLine.createLine(true,// validation
# false, // initFromSalesTable
# true, // initFromInventTableModule
# false, // calcInventQty
# true, // searchMarkup
# true, // searchPrice
# salesTable.Reservation==ItemReservation::Automatic, // checkReservation
# true); // skipCreditLimitCheck
#
# replaceItemRef.ReplaceSalesId = replacementOrder.SalesId;
# replaceItemRef.ReplaceSalesLineNum = replacementLine.LineNum;
# replaceItemRef.update();
# }
# ttscommit;
#}
ENDSOURCE
SOURCE #createReturnMarkupTrans
#server void createReturnMarkupTrans(SalesTable salesTable)
#{;
# if (this.markupAllowed())
# {
# Markup::insertReturnMarkupTrans(HeadingLine::Linie,
# ModuleInventCustVend::Cust,
# this,
# salesTable.CustAccount,
# salesTable.MarkupGroup,
# salesTable.LanguageId); // invert sign on creditnotes
# }
#}
#
ENDSOURCE
SOURCE #createReturnReservationLine
#public server void createReturnReservationLine()
#{
# SalesLine resReturnLine;
# InventTrans inventTrans, inventTransReserved;
# InventTrans inventTransQuarantine, inventTransQuarantineRes;
# InventUpd_Reservation reservation;
# InventMovement movement;
# ;
#
# // check that reservation line has not been created for sales line
# select firstonly Qty, TransType, TransRefId, InventTransId, InventRefTransId, RecId from inventTrans
# where inventTrans.InventTransId == this.InventTransId
# join TransRefId from inventTransReserved
# where inventTransReserved.InventTransId == inventTrans.InventRefTransId &&
# inventTransReserved.StatusIssue != StatusIssue::None &&
# inventTransReserved.TransType != InventTransType::QuarantineOrder;
#
# if (inventTrans.RecId)
# {
# if (inventTransReserved.TransRefId != inventTrans.TransRefId)
# {
# // Inventory lot '%1' has been reserved by %2 '%3'.
# throw error(strfmt("@SYS117212",this.InventTransId, inventTransReserved.TransType, inventTransReserved.TransRefId));
# }
# else
# {
# if (ReturnDispositionCode::find(this.ReturnDispositionCodeId).DispositionAction == DispositionAction::ReturnToCust)
# {
# ttsbegin;
# resReturnLine = SalesLine::findInventTransId(inventTrans.InventRefTransId, true);
# if (resReturnLine.RecId && resReturnLine.ReturnStatus != this.ReturnStatus)
# {
# resReturnLine.ReturnStatus = this.ReturnStatus;
# resReturnLine.update();
# this.InventRefTransId = resReturnLine.InventTransId;
# this.InventRefId = resReturnLine.SalesId;
# this.update();
# }
# ttscommit;
# }
# }
# }
# else
# {
# // Create a sales line to make a reservation
# ttsbegin;
#
# if (this.qtyMarked())
# {
# while select forupdate inventTransQuarantine where inventTransQuarantine.InventRefTransId == this.InventTransId &&
# inventTransQuarantine.TransType == InventTransType::QuarantineOrder
# {
# InventTrans::deleteMarking(inventTransQuarantine.InventRefTransId, inventTransQuarantine.InventTransId, -inventTransQuarantine.Qty);
# inventTransQuarantine.InventRefTransId = '';
#
# if (inventTransQuarantine.RecId && !inventTransQuarantineRes.InventDimId)
# {
# select firstonly InventDimId, InventTransId from inventTransQuarantineRes where inventTransQuarantineRes.InventTransId == inventTransQuarantine.InventTransId &&
# inventTransQuarantineRes.InventRefTransId == '' &&
# inventTransQuarantineRes.Direction == InventDirection::Receipt;
# }
#
# inventTransQuarantine.update();
# }
# }
#
# resReturnLine.clear();
# resReturnLine.data(this.data()) ;
# resReturnLine.LineNum = 0;
# resReturnLine.InventRefTransId = this.InventTransId;
# resReturnLine.InventRefType = InventRefType::Sales;
# resReturnLine.InventRefId = this.SalesId;
# resReturnLine.InterCompanyInventTransId = '';
# resReturnLine.ExpectedRetQty = this.ExpectedRetQty * -1;
# resReturnLine.SalesQty = this.SalesQty * -1;
# resReturnLine.QtyOrdered = this.QtyOrdered * -1;
# resReturnLine.LineAmount = resReturnLine.LineAmount * -1;
# resReturnLine.InventDimId = inventTransQuarantineRes.InventDimId ? inventTransQuarantineRes.InventDimId : InventTrans::findTransId(this.InventTransId).InventDimId;
#
# if (ReturnDispositionCode::find(resReturnLine.ReturnDispositionCodeId).createScrap())
# {
# resReturnLine.ReturnStatus = ReturnStatusLine::Awaiting;
# resReturnLine.SalesPrice = 0;
# resReturnLine.LineAmount = 0;
#
# }
#
# resReturnLine.createLine(NoYes::No, // Validate
# NoYes::No, // initFromSalesTable
# NoYes::No, // initFromInventTable
# NoYes::No, // calcInventQty
# NoYes::Yes, // searchMarkup
# NoYes::No // searchPrice
# );
#
# movement = InventMovement::construct(resReturnLine);
# reservation = InventUpd_Reservation::newMovement(movement,-resReturnLine.SalesQty,true);
# reservation.updateNow();
#
# this.InventRefTransId = resReturnLine.InventTransId;
# this.InventRefType = InventRefType::Sales;
# this.InventRefId = resReturnLine.SalesId;
# this.update();
#
# ttscommit;
# }
#}
#
ENDSOURCE
SOURCE #CreditNoteLine
#boolean creditNoteLine()
#{
# return this.type().creditNoteLine();
#}
#
ENDSOURCE
SOURCE #custClassification
#//BP Deviation Documented
#display CustClassificationId custClassification()
#{
# return CustTable::find(this.CustAccount).CustClassificationId;
#}
ENDSOURCE
SOURCE #delete
#void delete(Common childBuffer = null, boolean deletePBA = true)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.delete(childBuffer,deletePBA);
#}
ENDSOURCE
SOURCE #DeliveredInTotal
#//BP Deviation Documented
#display SalesQty deliveredInTotal()
#{
# if (!this.InventTransId)
# return 0;
#
# return this.deliveredInTotalServer();
#}
ENDSOURCE
SOURCE #deliveredInTotalServer
#server SalesQty deliveredInTotalServer()
#{
# return this.type().deliveredInTotal();
#}
ENDSOURCE
SOURCE #deliveredInventInTotal
#//BP Deviation Documented
#display InventQty deliveredInventInTotal()
#{
# InventTransIdSum inventTransIdSum;
# InventQty inventQty;
# ;
# if (!this.InventTransId)
# return 0;
#
# inventTransIdSum = InventTransIdSum::newTransId(this.InventTransId);
# inventQty = -(inventTransIdSum.physical() + inventTransIdSum.financial());
# return inventQty;
#}
ENDSOURCE
SOURCE #deliveryAddress
#//BP Deviation Documented
#display Addressing deliveryAddress()
#{
# return this.DeliveryAddress ? this.DeliveryAddress : this.salesTable().DeliveryAddress;
#}
ENDSOURCE
SOURCE #DeliveryDate
#//BP Deviation Documented
#display SalesShippingDate deliveryDate(SalesShippingDate blankDate = InventOrderEntryDeadlineTable::effectiveOrderDate('',''))
#{
# SalesTable salesTable;
# ;
# if (this.ShippingDateConfirmed)
# return this.ShippingDateConfirmed;
#
# salesTable = this.salesTable();
# if (salesTable.ShippingDateConfirmed)
# return salesTable.ShippingDateConfirmed;
#
# if (this.ShippingDateRequested)
# return this.ShippingDateRequested;
#
# if (salesTable.ShippingDateRequested)
# return salesTable.ShippingDateRequested;
#
# return blankDate;
#}
ENDSOURCE
SOURCE #deliveryName
#//BP Deviation Documented
#display Name deliveryName()
#{
# return this.DeliveryName ? this.DeliveryName : this.salesTable().DeliveryName;
#}
ENDSOURCE
SOURCE #deliveryTerm
#DlvTermId deliveryTerm()
#{
# return this.salesTable().DlvTerm;
#}
ENDSOURCE
SOURCE #DiscAmount
#DiscAmount discAmount()
#{
# return PriceDisc::discAmount(SalesParameters::find().Disc, this.LineDisc, this.MultiLnDisc);
#}
ENDSOURCE
SOURCE #DiscPercent
#DiscPct discPercent()
#{
# return PriceDisc::discPercent(SalesParameters::find().Disc, this.LinePercent, this.MultiLnPercent);
#}
ENDSOURCE
SOURCE #endDisc
#boolean endDisc()
#{
# return this.SalesPurchLine::endDisc();
#}
ENDSOURCE
SOURCE #ExpandBOM
#server void expandBOM(TmpFrmVirtual _tmpFrmVirtual, BOM tmpBOM)
#{
# Label label = new Label(this.salesTable().LanguageId);
# SalesLine salesLine;
# BOMCalcData bomCalcData;
# RouteId routeNum;
# SalesAlternativeItem salesAlternativeItem;
# ItemId itemId;
# ItemId itemIdOld;
# InventDim localInventDim;
# InventDim inventDim;
# ;
#
# ttsbegin;
#
# bomCalcData = BOMCalcData::newInventTable(this.QtyOrdered,this.inventTable());
# routeNum = this.inventTable().routeId(this.salesTable().DeliveryDate, this.QtyOrdered, this.inventDim());
#
# startLengthyOperation();
#
# while select _tmpFrmVirtual
# {
# salesLine.clear();
# salesLine.SalesId = this.SalesId;
# select tmpBOM where tmpBOM.RecId == _tmpFrmVirtual.RecordNo;
#
# if (tmpBOM)
# {
# salesLine.initFromSalesTable(this.salesTable());
# salesLine.initFromBOM(tmpBOM, this);
# salesLine.setAddressFromSalesLine(this);
#
# salesLine.QtyOrdered = UnitConvert::qty(BOMCalcConsumption::construct(tmpBOM.Formula,bomCalcData).calcConsumption(tmpBOM,
# Route::accError(routeNum,
# tmpBOM.OprNum)),
# tmpBOM.UnitId,
# salesLine.inventTable().inventUnitId(),
# tmpBOM.ItemId);
#
# salesLine.SalesQty = UnitConvert::qty(salesLine.QtyOrdered,
# salesLine.inventTable().inventUnitId(),
# salesLine.SalesUnit,
# tmpBOM.ItemId);
#
# salesAlternativeItem = SalesAlternativeItem::newAlternativeItem(salesLine);
#
# if (salesAlternativeItem.existAlternativeItem())
# {
# itemIdOld = salesLine.ItemId;
# itemId = salesAlternativeItem.alternativeItemId();
# localInventDim = inventDim;
# localInventDim.copyItemDim( InventTable::find(itemId).DimGroupId,
# salesAlternativeItem.alternativeItemDim(InventTable::find(itemId).DimGroupId,inventDim));
# salesLine.setInventDimIdFromInventDim(localInventDim);
# salesLine.ItemId = itemId;
# salesLine.itemIdChanged();
# info(strfmt("@SYS79522", itemIdOld, salesLine.ItemId));
# }
#
# // Performance optimization (See PS Issue #18029)
# // Skip credit limit check here - it will be done once when all lines are created.
# salesLine.createLine(true,false,false,false,true,true,false,true);
#
# if (salesLine.DeliveryDateControlType != SalesDeliveryDateControlType::None)
# {
# SalesCalcAvailableDlvDates::initDateFields(this);
# if (this.ShippingDateConfirmed || this.ReceiptDateConfirmed)
# {
# if(salesLine.ShippingDateConfirmed > this.ShippingDateConfirmed ||
# salesLine.ReceiptDateConfirmed > this.ReceiptDateConfirmed)
# {
# salesLine.DeliveryDateControlType = SalesDeliveryDateControlType::None;
# checkFailed(strfmt("@SYS88261",salesLine.ItemId,salesLine.InventTransId));
# }
# }
# else
# {
# if (salesLine.ShippingDateRequested > this.ShippingDateRequested ||
# salesLine.ReceiptDateRequested > this.ReceiptDateRequested)
# {
# salesLine.DeliveryDateControlType = SalesDeliveryDateControlType::None;
# checkFailed(strfmt("@SYS88261",salesLine.ItemId,salesLine.InventTransId));
# }
# }
#
# }
#
# salesLine.ShippingDateConfirmed = this.ShippingDateConfirmed;
# salesLine.ShippingDateRequested = this.ShippingDateRequested;
# salesLine.ReceiptDateConfirmed = this.ReceiptDateConfirmed;
# salesLine.ReceiptDateRequested = this.ReceiptDateRequested;
#
# salesLine.LineNum = this.LineNum + 0.001;
# salesLine.LineHeader = strfmt(label.extractString(literalstr("@SYS25825")), this.inventTable().ItemName);
# salesLine.write();
# }
# }
#
# // Finaly DO credit limit check here for all lines at once.
# if (!this.validateWrite())
# throw error ("@SYS18447");
#
# while select _tmpFrmVirtual
# {
# this.resetInvent();
# break;
# }
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #fieldChanged
#boolean fieldChanged(fieldId fieldId)
#{
# boolean ok = false;
# ;
#
# if (!this.RecId)
# ok = true;
#
# if (this.orig().(fieldId) != this.(fieldId))
# ok = true;
#
# return ok;
#}
ENDSOURCE
SOURCE #hasOnlyLineAmount
#boolean hasOnlyLineAmount()
#{
# return this.PriceDiscLine::hasOnlyLineAmount();
#}
ENDSOURCE
SOURCE #inclTax
#boolean inclTax()
#{;
# return this.SalesPurchLine::inclTax();
#}
ENDSOURCE
SOURCE #initBarcode
#server void initBarcode(InventDim _inventDim = this.inventDim())
#{
# InventItemBarcode inventItemBarcode = InventItemBarcode::findSalesBarcodeDimension(this.ItemId, _inventDim);
# ;
# this.BarCode = inventItemBarcode.ItemBarCode;
# this.BarCodeType = inventItemBarcode.BarcodeSetupId;
#}
ENDSOURCE
SOURCE #InitFromBOM
#void initFromBOM(BOM bom,
# SalesLine parentLine)
#{
# InventDim inventDim;
# ;
# if (this.InventDimId)
# inventDim = this.inventDim();
#
# this.ItemId = bom.ItemId;
#
# if (bom.ItemBOMId)
# this.ItemBOMId = bom.ItemBOMId;
#
# inventDim.copyItemDim(InventTable::find(this.ItemId).DimGroupId,bom.inventDim());
# inventDim.InventLocationId = bom.inventDim().InventLocationId;
# inventDim.initFromInventLocation(inventDim.inventLocation());
# this.setInventDimIdFromInventDim(inventDim);
#
# this.initFromInventTable(this.inventTable());
#}
#
ENDSOURCE
SOURCE #initFromCustConfirmTrans
#void initFromCustConfirmTrans(CustConfirmTrans custConfirmTrans, boolean copyPrecisely = true,
# boolean copyPriceDisc = true,
# boolean copyQty = true,
# Qty qty = custConfirmTrans.Qty)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromCustConfirmTrans(custConfirmTrans, copyPrecisely, copyPriceDisc, copyQty, qty);
#
#}
ENDSOURCE
SOURCE #initFromCustExternalItemDescription
#server void initFromCustExternalItemDescription(InventDim _inventDim = this.inventDim())
#{
# CustExternalItemDescription custExternalItemDescription = new CustExternalItemDescription(this.ItemId, _inventDim, this.salesTable().CustAccount);
# ;
#
# if (custExternalItemDescription.findExternalDescription())
# {
# this.ExternalItemId = custExternalItemDescription.externalItemId();
# if (custExternalItemDescription.externalItemFreeTxt())
# {
# if (CustFormletterParameters::find().ExternalItemOverwriteAppend == OverwriteAppend::Overwrite)
# {
# this.Name = custExternalItemDescription.externalItemFreeTxt();
# }
# else
# {
# this.initName(this.inventTable());
# if (this.Name)
# {
# this.Name += '\n';
# }
# this.Name += custExternalItemDescription.externalItemFreeTxt();
# }
# }
# }
#}
ENDSOURCE
SOURCE #InitFromCustInvoiceTrans
#void initFromCustInvoiceTrans(CustInvoiceTrans custInvoiceTrans, boolean copyPrecisely = true,
# boolean copyPriceDisc = true,
# boolean copyQty = true,
# Qty qty = custInvoiceTrans.Qty)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromCustInvoiceTrans(custInvoiceTrans, copyPrecisely, copyPriceDisc, copyQty, qty);
#
#}
ENDSOURCE
SOURCE #InitFromCustPackingSlipTrans
#void initFromCustPackingSlipTrans(CustPackingSlipTrans custPackingSlipTrans, boolean copyPrecisely = true,
# boolean copyPriceDisc = true,
# boolean copyQty = true,
# Qty qty = custPackingSlipTrans.Qty)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromCustPackingSlipTrans(custPackingSlipTrans, copyPrecisely, copyPriceDisc, copyQty, qty);
#}
ENDSOURCE
SOURCE #initFromCustQuotationTrans
#void initFromCustQuotationTrans(CustQuotationTrans custQuotationTrans, boolean copyPrecisely = true,
# boolean copyPriceDisc = true,
# boolean copyQty = true,
# Qty qty = custQuotationTrans.Qty)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromCustQuotationTrans(custQuotationTrans, copyPrecisely, copyPriceDisc, copyQty, qty);
#
#}
ENDSOURCE
SOURCE #initFromCustTable
#server void initFromCustTable()
#{
# Address address;
# CustTable custTable = CustTable::find(this.CustAccount);
# ;
#
# this.CustAccount = custTable.AccountNum;
# this.DeliveryName = custTable.Name;
#
# this.DeliveryAddress = custTable.Address;
# this.DeliveryZipCode = custTable.ZipCode;
# this.DeliveryCounty = custTable.County;
# this.DeliveryCountryRegionId = custTable.CountryRegionId;
# this.DeliveryState = custTable.State;
# this.DeliveryStreet = custTable.Street;
# this.DeliveryCity = custTable.City;
#
# this.setTaxGroup(TaxSales::custTaxGroup(custTable.DlvTerm, custTable.TaxGroup));
#
# if (DirPartyAddress::findAddress(custTable, AddressType::Delivery))
# {
# address = DirPartyAddress::findAddress(custTable, AddressType::Delivery);
#
# this.setAddress(address);
# }
#
# this.setListCode();
#}
ENDSOURCE
SOURCE #InitFromInventTable
#void initFromInventTable(InventTable inventTable)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromInventTable(inventTable);
#}
ENDSOURCE
SOURCE #InitFromPriceDisc
#void initFromPriceDisc(PriceDisc priceDisc)
#{
# this.SalesPrice = priceDisc.price();
# this.PriceUnit = priceDisc.priceUnit();
# this.SalesMarkup = priceDisc.markup();
#
# if (!this.RecId || !this.ShippingDateRequested || !this.ReceiptDateRequested)
# {
# if (!this.ShippingDateRequested)
# this.ShippingDateRequested = this.salesTable().ShippingDateRequested;
#
# if (!this.ReceiptDateRequested)
# this.ReceiptDateRequested = this.salesTable().ReceiptDateRequested;
# }
#
# SalesCalcAvailableDlvDates::initDateFields(this,priceDisc);
#
#}
#
ENDSOURCE
SOURCE #initFromProjActivity
#public void initFromProjActivity(ProjActivity _projActivity)
#{;
# if (!_projActivity || !_projActivity.CategoryDefault)
# {
# return;
# }
#
# this.ProjCategoryId = _projActivity.CategoryDefault;
#}
#
ENDSOURCE
SOURCE #initFromProjInvoiceItem
#void initFromProjInvoiceItem(ProjInvoiceItem projInvoiceItem, boolean copyPrecisely = true,
# boolean copyPriceDisc = true,
# boolean copyQty = true,
# Qty qty = projInvoiceItem.Qty)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromProjInvoiceItem(projInvoiceItem, copyPrecisely, copyPriceDisc, copyQty, qty);
#
#}
ENDSOURCE
SOURCE #initFromProjTable
#void initFromProjTable(ProjTable _projTable,
# boolean _setCurrency = true)
#{
# SalesTable salesTable;
# ProjInvoiceTable projInvoiceTable = _projTable.projInvoice();
# ;
#
# if (_setCurrency)
# {
# this.CurrencyCode = _projTable.currencyId();
# }
#
# if (! ProjValProjCategorySetUp::checkProjCategory(this.ProjId,this.ProjCategoryId))
# this.ProjCategoryId = '';
#
# this.setProjLinePropertyId();
#
# if (this.ProjId)
# {
# switch (this.SalesType)
# {
# case (SalesType::Sales) :
# salesTable = _projTable.salesTable_SalesOrder(this.CurrencyCode);
# break;
#
# case (SalesType::ItemReq) :
# salesTable = _projTable.salesTable_ItemReq(this.CurrencyCode);
# break;
#
# default :
# salesTable = _projTable.salesTable_ItemReq(this.CurrencyCode);
# }
#
# if (!salesTable)
# {
# switch (this.SalesType)
# {
# case (SalesType::Sales) :
# salesTable = _projTable.createSalesTable_sales(this.CurrencyCode);
# break;
#
# case (SalesType::ItemReq) :
# salesTable = _projTable.createSalesTable_ItemReq(this.CurrencyCode);
# break;
#
# default :
# salesTable = _projTable.createSalesTable_ItemReq(this.CurrencyCode);
# }
# }
#
# this.initFromSalesTable(salesTable);
#
# // if this sales line is created from a project, then always initialize its delivery address fields with that of the project.
# this.setAddressFromProjTable(_projTable);
#
# }
#}
ENDSOURCE
SOURCE #initFromPurchLine
#void initFromPurchLine(PurchLine purchLine)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromPurchLine(purchLine);
#}
#
ENDSOURCE
SOURCE #initFromSalesBasketLine
#void initFromSalesBasketLine(SalesBasketLine salesBasketLine)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromSalesBasketLine(salesBasketLine);
#}
ENDSOURCE
SOURCE #initFromSalesBasketLinePBA
#void initFromSalesBasketLinePBA(SalesBasketLine salesBasketLine)
#{
# this.ItemBOMId = salesBasketLine.ItemBOMId;
# this.ItemRouteId = salesBasketLine.ItemRouteId;
# this.ItemPBAId = salesBasketLine.ItemPBAId;
# if ( salesBasketLine.ConfirmedDlv )
# {
# this.ShippingDateRequested = salesBasketLine.ConfirmedDlv;
# }
# if ( salesBasketLine.SalesPrice )
# {
# this.SalesPrice = salesBasketLine.SalesPrice;
# this.LineAmount = this.calcLineAmount(this.SalesQty);
# }
#}
ENDSOURCE
SOURCE #InitFromSalesLine
#void initFromSalesLine(SalesLine salesLine, boolean copyPrecisely = true,
# boolean copyPriceDisc = true,
# boolean copyQty = true,
# Qty qty = salesLine.SalesQty)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromSalesLine(salesLine, copyPrecisely, copyPriceDisc, copyQty, qty);
#}
ENDSOURCE
SOURCE #initFromSalesQuotationLine
#void initFromSalesQuotationLine(SalesQuotationLine _salesQuotationLine)
#{
# ;
#
# this.Dimension = this.copyDimension(_salesQuotationLine.Dimension);
#
# this.BarCode = _salesQuotationLine.BarCode;
# this.BarCodeType = _salesQuotationLine.BarCodeType;
# this.CustomerRef = _salesQuotationLine.CustomerRef;
#
# this.ConfirmedDlv = _salesQuotationLine.ConfirmedDlv;
#
# this.DeliveryName = _salesQuotationLine.DeliveryName;
# if (_salesQuotationLine.DeliveryAddress)
# {
# this.DeliveryAddress = _salesQuotationLine.DeliveryAddress;
# this.DeliveryCity = _salesQuotationLine.DeliveryCity;
# this.DeliveryCounty = _salesQuotationLine.DeliveryCounty;
# this.DeliveryCountryRegionId = _salesQuotationLine.DeliveryCountryRegionId;
# this.DeliveryState = _salesQuotationLine.DeliveryState;
# this.DeliveryStreet = _salesQuotationLine.DeliveryStreet;
# this.DeliveryZipCode = _salesQuotationLine.DeliveryZipCode;
# this.AddressRefRecId = _salesQuotationLine.RecId;
# this.AddressRefTableId = _salesQuotationLine.TableId;
# }
#
# this.ItemBOMId = _salesQuotationLine.ItemBOMId;
# this.ItemRouteId = _salesQuotationLine.ItemRouteId;
# // PBA Begin
# this.ItemPBAId = _salesQuotationLine.ItemPBAId;
# // PBA End
#
# this.LedgerAccount = _salesQuotationLine.LedgerAccount;
# this.LineHeader = _salesQuotationLine.LineHeader;
# this.LineNum = _salesQuotationLine.LineNum;
# this.Name = _salesQuotationLine.Name;
#
# this.SalesPrice = _salesQuotationLine.SalesPrice;
# this.PriceUnit = _salesQuotationLine.PriceUnit;
# this.LinePercent = _salesQuotationLine.LinePercent;
# this.LineDisc = _salesQuotationLine.LineDisc;
# this.LineAmount = _salesQuotationLine.LineAmount;
# this.MultiLnDisc = _salesQuotationLine.MultiLnDisc;
# this.MultiLnPercent = _salesQuotationLine.MultiLnPercent;
#
# this.PackingUnit = _salesQuotationLine.PackingUnit;
# this.PackingUnitQty = _salesQuotationLine.PackingUnitQty;
#
# this.SalesGroup = _salesQuotationLine.SalesGroup;
# this.SalesMarkup = _salesQuotationLine.SalesMarkup;
#
# this.TaxAutogenerated = _salesQuotationLine.TaxAutoGenerated;
# this.TaxGroup = _salesQuotationLine.TaxGroup;
# this.TaxItemGroup = _salesQuotationLine.TaxItemGroup;
#
# this.Port = _salesQuotationLine.Port;
# this.StatProcId = _salesQuotationLine.StatProcId;
# this.TransactionCode = _salesQuotationLine.TransactionCode;
# this.Transport = _salesQuotationLine.Transport;
# this.CountyOrigDest = _salesQuotationLine.CountyOrigDest;
# this.StatTriangularDeal = _salesQuotationLine.StatTriangularDeal;
#
# if (_salesQuotationLine.DlvMode != "")
# this.DlvMode = _salesQuotationLine.DlvMode;
# this.ShippingDateRequested = _salesQuotationLine.ShippingDateRequested;
# this.ReceiptDateRequested = _salesQuotationLine.ReceiptDateRequested;
#}
#
#
#
#
ENDSOURCE
SOURCE #InitFromSalesTable
#server void initFromSalesTable(SalesTable salesTable)
#{
# this.type().initFromSalesTable(salesTable);
#}
#
ENDSOURCE
SOURCE #initFromSMAServiceOrderTable
#///
#/// Initializes SalesLine with data from SMAServiceOrderTable.
#///
#///
#/// SMAServiceOrderTable record buffer.
#///
#public void initFromSMAServiceOrderTable(SMAServiceOrderTable _serviceOrderTable)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromSMAServiceOrderTable(_serviceOrderTable);
#}
ENDSOURCE
SOURCE #initFromTmpSuppItem
#void initFromTmpSuppItem(TmpSuppItem _tmpSuppItem)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.initFromTmpSuppItem(_tmpSuppItem);
#}
ENDSOURCE
SOURCE #initItemDim
#server void initItemDim(InventDim _inventDim = this.inventDim())
#{
# ;
# this.setInventDimIdFromInventDim(_inventDim);
# this.initName();
# this.initFromCustExternalItemDescription(_inventDim);
# this.calcPackingUnit(_inventDim);
# this.initBarcode(_inventDim);
# this.CostPrice = this.inventTable().costPcsPrice(this.InventDimId, _inventDim);
#
#}
#
ENDSOURCE
SOURCE #initName
#void initName(InventTable _inventTable = this.inventTable(), SalesTable _salesTable = this.salesTable())
#{
# this.Name = SalesParameters::nameAndOrDescription(_inventTable, _salesTable.LanguageId, this.InventDimId);
#}
ENDSOURCE
SOURCE #InitSalesQty
#void initSalesQty()
#{
# SalesLineType salesLineType;
# ;
# salesLineType = this.type();
# salesLineType.initSalesQty();
#}
ENDSOURCE
SOURCE #InitValue
#void initValue()
#{
# super();
#
# this.type().initValue();
#}
ENDSOURCE
SOURCE #insert
#public void insert(boolean dropInvent = false,
# boolean findMarkup = true,
# Common childBuffer = null,
# boolean _skipCreditLimitCheck = false)
#{
# SalesLineType salesLineType;
# ;
#
# this.setInventSumLogTTS();
#
# salesLineType = this.type();
# salesLineType.insert(dropInvent, findMarkup, childBuffer, _skipCreditLimitCheck);
#}
#
ENDSOURCE
SOURCE #interCompanyIsBeingUpdated
#public boolean interCompanyIsBeingUpdated(boolean _showWarning = true, boolean _checkThis = false)
#{
# PurchLine purchLine;
# InventTrans inventTrans;
# SalesTable salesTable = this.salesTable();
# boolean ret = false;
#;
# if (this.RecId)
# {
# if (salesTable.InterCompanyCompanyId || _checkThis)
# {
# inventTrans = null;
# select firstonly RecId, TransRefId from inventTrans
# index hint TransIdIdx
# where inventTrans.InventTransId == this.InventTransId
# && (inventTrans.StatusReceipt == StatusReceipt::Received
# || inventTrans.StatusReceipt == StatusReceipt::Registered
# || inventTrans.StatusReceipt == StatusReceipt::Arrived
# || inventTrans.StatusIssue == StatusIssue::Deducted
# || inventTrans.StatusIssue == StatusIssue::Picked
# || inventTrans.TransChildType != InventTransChildType::None);
#
# if (inventTrans.RecId)
# {
# ret = true;
# if (_showWarning)
# {
# salesTable.SalesId = inventTrans.TransRefId;
# setprefix(#PreFixField(salesTable, SalesId));
# checkFailed("@SYS93839");
# }
# }
# else
# {
# if (this.SalesStatus != SalesStatus::Invoiced)
# {
# select sum(Qty) from inventTrans
# index hint TransIdIdx
# where inventTrans.InventTransId == this.InventTransId
# && (inventTrans.StatusReceipt == StatusReceipt::Purchased
# || inventTrans.StatusIssue == StatusIssue::Sold);
# if (inventTrans.Qty != 0)
# {
# ret = true;
# if (_showWarning)
# {
# salesTable.SalesId = this.SalesId;
# setprefix(#PreFixField(salesTable, SalesId));
# checkFailed("@SYS93839");
# }
# }
# }
# }
# }
#
# if (!ret
# && this.InventRefType == InventRefType::Purch
# && this.InventRefId
# && this.InventRefTransId)
# {
# select firstonly purchLine
# index hint TransIdIdx
# where purchLine.InventTransId == this.InventRefTransId;
#
# if (purchLine)
# ret = purchLine.interCompanyIsBeingUpdated(_showWarning);
# }
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #interCompanyLineAmount
#AmountCur interCompanyLineAmount(SalesQty _salesQty = this.SalesQty,
# InvoiceDate _invoiceDate = this.ConfirmedDlv,
# boolean _rounded = true)
#{
# AmountCur lineAmount;
# PurchLine purchLine;
# SalesLine salesLine;
# dataAreaId curDataArea = curext();
# ;
# lineAmount = 0;
# if (this.salesTable().InterCompanyCompanyId)
# {
# appl.setDefaultCompany(this.salesTable().InterCompanyCompanyId, false);
#
# purchLine = PurchLine::findInventTransId(this.InterCompanyInventTransId);
# salesLine = SalesLine::findInventTransId(purchLine.InventRefTransId);
# if (salesLine.RecId)
# {
# lineAmount = salesLine.calcLineAmountExclTax(_salesQty, _invoiceDate, _rounded);
# }
#
# if (salesLine.RecId)
# lineAmount = Currency::curAmount2CurAmount(lineAmount, salesLine.CurrencyCode, this.CurrencyCode, _invoiceDate, _rounded);
#
# appl.setDefaultCompany(curDataArea, false);
#
# if (!salesLine.RecId)
# lineAmount = this.calcLineAmountExclTax(_salesQty,_invoiceDate,_rounded);
# }
# else
# {
# lineAmount = this.calcLineAmountExclTax(_salesQty,_invoiceDate,_rounded);
# }
# return lineAmount;
#}
#
ENDSOURCE
SOURCE #interCompanyOriginalCustAccount
#//BP Deviation Documented
#display CustAccount interCompanyOriginalCustAccount()
#{
# CustAccount custAccount;
#;
# if (this.salesTable().InterCompanyCompanyId)
# {
# custAccount = SalesTable::find(this.SalesId).InterCompanyOriginalCustAccount;
# }
# else
# {
# custAccount = SalesTable::find(this.SalesId).CustAccount;
# }
# return custAccount;
#}
#
ENDSOURCE
SOURCE #interCompanyOriginDisplay
#//BP Deviation Documented
#display InterCompanyOriginDisplay interCompanyOriginDisplay()
#{
# InterCompanyOriginDisplay interCompanyOriginDisplay;
# DictEnum dictEnum = new DictEnum(enumnum(InterCompanyOrigin));
# ;
# if (this.InterCompanyInventTransId)
# {
# interCompanyOriginDisplay = dictEnum.value2Name(this.InterCompanyOrigin);
# }
# return interCompanyOriginDisplay;
#}
#
ENDSOURCE
SOURCE #interCompanyReturnItemInventTransId
#InventRefTransId interCompanyReturnItemInventTransId()
#{
# CustInvoiceTrans custInvoiceTrans;
# InventRefTransId inventRefTransId;
#;
# if (this.InventTransIdReturn)
# {
# custInvoiceTrans = CustInvoiceTrans::findInventTransid(this.InventTransIdReturn);
# if (custInvoiceTrans.InventRefTransId)
# {
# inventRefTransId = VendInvoiceTrans::findInventTransId(custInvoiceTrans.InventRefTransId).InventTransId;
# }
# }
#
# return inventRefTransId;
#}
ENDSOURCE
SOURCE #interCompanySalesId
#//BP Deviation Documented
#display InterCompanySalesId interCompanySalesId()
#{
# PurchLine purchLineLocal;
# SalesLine salesLineLocal;
# InterCompanySalesId interCompanySalesId;
#;
# if (this.salesTable().InterCompanyCompanyId)
# {
# changecompany(this.salesTable().InterCompanyCompanyId)
# {
# purchLineLocal = PurchLine::findInventTransId(this.InterCompanyInventTransId);
# salesLineLocal = SalesLine::findInventTransId(purchLineLocal.InventRefTransId);
# interCompanySalesId = salesLineLocal.SalesId;
# }
# }
# return interCompanySalesId;
#}
#
ENDSOURCE
SOURCE #interCompanySalesLineExist
#boolean interCompanySalesLineExist()
#{
# boolean ret;
# ;
# if (this.InventRefType == InventRefType::Purch
# && this.InventRefTransId)
# {
# ret = PurchLine::findInventTransId(this.InventRefTransId).InterCompanyInventTransId ? true : false;
# }
# return ret;
#}
#
ENDSOURCE
SOURCE #interCompanyUpdateNow
#boolean interCompanyUpdateNow()
#{
# boolean ok = false;
# ;
#
# if (!this.RecId)
# ok = true;
#
# if (this.orig().ItemId != this.ItemId
# || this.orig().InventDimId != this.InventDimId
# || this.orig().ConfirmedDlv != this.ConfirmedDlv
# || this.orig().ReceiptDateRequested != this.ReceiptDateRequested
# || this.orig().ReceiptDateConfirmed != this.ReceiptDateConfirmed
# || this.orig().ShippingDateRequested != this.ShippingDateRequested
# || this.orig().ShippingDateConfirmed != this.ShippingDateConfirmed
# || this.orig().LineNum != this.LineNum
# || this.orig().InventTransId != this.InventTransId
# || this.orig().SalesQty != this.SalesQty
# || this.orig().SalesUnit != this.SalesUnit
# || this.orig().OverDeliveryPct != this.OverDeliveryPct
# || this.orig().UnderDeliveryPct != this.UnderDeliveryPct
# || this.orig().DeliveryAddress != this.DeliveryAddress
# || this.orig().DeliveryName != this.DeliveryName
# || this.orig().DeliveryStreet != this.DeliveryStreet
# || this.orig().DeliveryZipCode != this.DeliveryZipCode
# || this.orig().DeliveryCity != this.DeliveryCity
# || this.orig().DeliveryCounty != this.DeliveryCounty
# || this.orig().DeliveryState != this.DeliveryState
# || this.orig().DeliveryCountryRegionId != this.DeliveryCountryRegionId
# || this.orig().Dimension != this.Dimension
# || this.orig().SalesPrice != this.SalesPrice
# || this.orig().PriceUnit != this.PriceUnit
# || this.orig().LineAmount != this.LineAmount
# || this.orig().SalesMarkup != this.SalesMarkup
# || this.orig().LineDisc != this.LineDisc
# || this.orig().LinePercent != this.LinePercent
# || this.orig().MultiLnDisc != this.MultiLnDisc
# || this.orig().MultiLnPercent != this.MultiLnPercent
# || this.orig().Complete != this.Complete
# || this.orig().Blocked != this.Blocked
# || this.orig().ReturnDispositionCodeId != this.ReturnDispositionCodeId
# || this.orig().ReturnStatus != this.ReturnStatus
# || this.orig().ExpectedRetQty != this.ExpectedRetQty
# )
# {
# ok = true;
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #InventDim
#InventDim inventDim(boolean _forUpdate = false)
#{
# return InventDim::find(this.InventDimId, _forUpdate);
#}
#
ENDSOURCE
SOURCE #InventTable
#InventTable inventTable(ItemId itemId = this.ItemId,
# boolean _forUpdate = false)
#{
# return InventTable::find(itemId, _forUpdate);
#}
ENDSOURCE
SOURCE #invoiceAccount
#CustInvoiceAccount invoiceAccount()
#{
# return this.salesTable().InvoiceAccount;
#}
ENDSOURCE
SOURCE #InvoicedInTotal
#//BP Deviation Documented
#display SalesQty invoicedInTotal()
#{
# SalesLineType salesLineType;
# ;
#
# if (!this.InventTransId)
# return 0;
#
# salesLineType = this.type();
# return salesLineType.invoicedInTotal();
#}
#
ENDSOURCE
SOURCE #invoicedInventInTotal
#//BP Deviation Documented
#display InventQty invoicedInventInTotal()
#{
# InventTransIdSum inventTransIdSum;
# InventQty inventQty = 0;
# ;
#
# if (this.InventTransId)
# {
# inventTransIdSum = new InventTransIdSum(this.InventTransId);
#
# inventQty = -inventTransIdSum.financial();
# }
#
# return inventQty;
#}
ENDSOURCE
SOURCE #isInterCompanyOrder
#boolean isInterCompanyOrder()
#{
# boolean ok = false;
# ;
#
# if (this.InterCompanyInventTransId && this.salesTable().isInterCompanyOrder())
# {
# ok = true;
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #isLinkedToProdConsumed
#boolean isLinkedToProdConsumed()
#{
# boolean ret = false;
# InventTrans inventTrans;
# InventTrans inventTransRef;
# ProdTable prodTable;
#
# select firstonly InventRefTransId from inventTrans
# where inventTrans.InventTransId == this.InventTransId
# && inventTrans.InventRefTransId
# join inventTransRef
# where inventTransRef.InventTransId == inventTrans.InventRefTransId
# && inventTransRef.TransType == InventTransType::Production
# join prodTable
# where prodTable.ProdId == inventTransRef.TransRefId
# && prodTable.ProjPostingType == ProjProdPostingType::ConsumedMethod
# && prodTable.ProjLinkedToOrder == NoYes::Yes;
#
# if (inventTrans.InventRefTransId)
# ret = true;
#
# return ret;
#}
ENDSOURCE
SOURCE #isReturnLineScrapped
#public boolean isReturnLineScrapped()
#{
# InventTrans returnLine;
# InventTrans quarantineIssue;
# InventTrans quarantineReciept;
# InventTrans qurantineScrap;
# ;
#
# select firstonly RecId from returnLine where returnLine.InventTransId == this.InventTransId &&
# returnLine.Qty == -this.QtyOrdered &&
# returnLine.TransType == InventTransType::Sales
# exists join quarantineIssue where quarantineIssue.InventRefTransId == returnLine.InventTransId &&
# quarantineIssue.Qty == -returnLine.Qty &&
# quarantineIssue.TransType == InventTransType::QuarantineOrder &&
# quarantineIssue.StatusIssue == StatusIssue::Sold
# exists join quarantineReciept where quarantineReciept.InventRefTransId == quarantineIssue.InventTransId &&
# quarantineReciept.Qty == -quarantineIssue.Qty &&
# quarantineReciept.TransType == InventTransType::QuarantineOrder &&
# quarantineReciept.StatusReceipt == StatusReceipt::Purchased
# exists join qurantineScrap where qurantineScrap.InventRefTransId == quarantineReciept.InventTransId &&
# qurantineScrap.Qty == -quarantineReciept.Qty &&
# qurantineScrap.TransType == InventTransType::QuarantineOrder &&
# qurantineScrap.StatusIssue == StatusIssue::Sold;
#
# return returnLine.RecId ? true : false;
#}
ENDSOURCE
SOURCE #isReturnReservationLine
#///
#/// Checks if the SalesLine in scope is a Return order reservation line.
#///
#///
#/// Returns true if the line in scope is a Return order reservation line, otherwise false.
#///
#public boolean isReturnReservationLine()
#{
# boolean ret;
# SalesLine returnOrderLine;
# ReturnDispositionCode returnDispositionCode;
# ;
#
# if (this.SalesType == SalesType::ReturnItem && this.QtyOrdered > 0 && this.returnCreateScrap() && this.qtyMarked())
# {
# select firstonly SalesId from returnOrderLine where returnOrderLine.InventTransId == this.InventRefTransId &&
# returnOrderLine.SalesId == this.SalesId
# exists join returnDispositionCode where returnDispositionCode.DispositionCodeId == returnOrderLine.ReturnDispositionCodeId &&
# returnDispositionCode.DispositionAction == DispositionAction::Scrap ||
# returnDispositionCode.DispositionAction == DispositionAction::ReplaceScrap;
# if (returnOrderLine.SalesId)
# {
# ret = true;
# }
# }
# return ret;
#}
#
ENDSOURCE
SOURCE #ItemIdChanged
#server void itemIdChanged()
#{
# SalesTable salesTable;
#
# this.initFromInventTable(this.inventTable());
#
# if (ReverseChargeParameters_UK::find().rcEnabled)
# {
# if (ReverseChargeItemGroup_UK::exist(this.inventTable().ItemGroupId))
# {
# salesTable = this.salesTable();
# if (!salesTable.vatNum && ReverseCharge_invoice_UK::isSalesDomestic(salesTable))
# {
# warning("@SYS125406");
# }
# }
# }
#}
ENDSOURCE
SOURCE #ItemLineDisc
#LineDiscCode itemLineDisc()
#{;
# return this.inventTable().salesLineDisc();
#}
ENDSOURCE
SOURCE #ItemName
#//BP Deviation Documented
#display SalesLineShowItemName itemName()
#{
# return this.inventTable().itemName(this.inventDim());
#}
#
#
ENDSOURCE
SOURCE #lineAmountExclTax
#//BP Deviation Documented
#display SalesLineAmount lineAmountExclTax(TransDate transDate = systemdateget())
#{
# return this.SalesPurchLine::lineAmountExclTax(this.taxDate(transDate));
#}
ENDSOURCE
SOURCE #lineAmountModified
#void lineAmountModified()
#{
# this.PriceDiscLine::lineAmountModified();
#}
ENDSOURCE
SOURCE #LineAmountMST
#AmountMST lineAmountMST(TransDate exchRateDate = systemdateget(),
# ExchRate exchRate = this.salesTable().fixedExchRate(),
# ExchrateSecondary exchrateSecondary = this.salesTable().fixedExchRateSecondary(),
# ExchRatesTriangulation exchRatesTriangulation = this.salesTable().fixedEuroTriangulation())
#
#{
# return this.SalesPurchLine::lineAmountMST(exchRateDate, exchRate, exchrateSecondary, exchRatesTriangulation);
#}
#
ENDSOURCE
SOURCE #lineAmountMSTExclTax
#AmountMST lineAmountMSTExclTax(TransDate exchRateDate = systemdateget(),
# ExchRate exchRate = this.salesTable().fixedExchRate(),
# ExchrateSecondary exchrateSecondary = this.salesTable().fixedExchRateSecondary(),
# ExchRatesTriangulation exchRatesTriangulation = this.salesTable().fixedEuroTriangulation())
#
#{
# return this.SalesPurchLine::lineAmountMSTExclTax(exchRateDate, exchRate, exchrateSecondary, exchRatesTriangulation);
#}
#
ENDSOURCE
SOURCE #LineDisc
#LineDiscCode lineDisc()
#{;
# return this.salesTable().LineDisc;
#}
ENDSOURCE
SOURCE #linkInventDim2Dimension
#///
#/// Defaults SalesLine.dimension values based on the InventDim record buffer values.
#///
#///
#/// The InventDim record buffer linked to the current SalesLine record buffer;
#///
#///
#/// The InventDim record buffer that was previously linked to the current SalesLine record buffer;
#///
#public void linkInventDim2Dimension(InventDim _newInventDim, InventDim _oldInventDim)
#{
# ;
# _newInventDim.setInventSiteFromParentIfModified(this, _oldInventDim);
#}
ENDSOURCE
SOURCE #markupAllowed
#public boolean markupAllowed()
#{
# return this.type().markupAllowed();
#}
ENDSOURCE
SOURCE #mayConfirmationBeUpdated
#boolean mayConfirmationBeUpdated()
#{
# return this.type().mayConfirmationBeUpdated();
#}
#
ENDSOURCE
SOURCE #mayInvoiceBeUpdated
#boolean mayInvoiceBeUpdated()
#{
# return this.type().mayInvoiceBeUpdated();
#}
#
ENDSOURCE
SOURCE #mayPackingSlipBeUpdated
#boolean mayPackingSlipBeUpdated()
#{
# return this.type().mayPackingSlipBeUpdated();
#}
#
ENDSOURCE
SOURCE #mayPickingListBeRegistrated
#boolean mayPickingListBeRegistrated()
#{
# return this.type().mayPickingListBeRegistrated();
#}
#
ENDSOURCE
SOURCE #mayPickingListBeUpdated
#boolean mayPickingListBeUpdated()
#{
# return this.type().mayPickingListBeUpdated();
#}
#
ENDSOURCE
SOURCE #mayProjectPackingSlipBeUpdated
#boolean mayProjectPackingSlipBeUpdated()
#{
# return this.type().mayProjectPackingSlipBeUpdated();
#}
#
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
# AxSalesLine axSalesLine;
# Object formDataSource;
# InventQty inventQty;
# CostAmount costAmount;
# DlvMode dlvMode;
# ;
# super(_fieldId);
#
# if (this.isFormDataSource())
# {
# if (formDataSourceHasMethod(this.dataSource(),classstr(AxSalesLine)))
# {
# formDataSource = this.dataSource();
# axSalesLine = formDataSource.axSalesLine();
# }
# }
# else
# {
# axSalesLine = this.axSalesLine();
# }
#
# if (axSalesLine)
# {
# axSalesLine.setFieldAsTouched(_fieldId);
# axSalesLine.modify();
# if (this.dataSource())
# {
# if (formDataSourceHasMethod(this.dataSource(),identifierstr(fieldModified)))
# {
# formDataSource = this.dataSource();
# formDataSource.fieldModified();
# }
# }
# }
# else
# {
# switch (_fieldId)
# {
# case fieldnum(SalesLine, SalesDeliverNow):
# this.setInventDeliverNow();
# break;
#
# case fieldnum(SalesLine, SalesPrice):
# if(this.ReturnStatus != ReturnStatusLine::None)
# {
# this.LineAmount = this.calcLineAmountForced(this.ExpectedRetQty);
# }
# else
# {
# this.LineAmount = this.calcLineAmountForced();
# }
# break;
#
# case fieldnum(SalesLine, LinePercent):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(SalesLine, LineDisc):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(SalesLine, LineAmount):
# this.lineAmountModified();
# break;
#
# case fieldnum(SalesLine, SalesUnit):
# SalesLine::modifySalesQty(this,this.inventDim());
# InventMovement::bufferSetTransQtyUnit(this);
# this.setInventDeliverNow();
# break;
#
# case fieldnum(SalesLine, PriceUnit):
# this.LineAmount = this.calcLineAmount();
# break;
#
# case fieldnum(SalesLine, ExpectedRetQty):
# SalesLine::modifySalesQty(this,this.inventDim());
# if (this.ReturnStatus != ReturnStatusLine::None)
# {
# this.LineAmount = this.calcLineAmount(this.ExpectedRetQty);
#
# if (this.ReturnAllowReservation)
# {
# this.SalesQty = this.ExpectedRetQty;
# SalesLine::modifySalesQty(this,this.inventDim());
# }
# }
# break;
#
# case fieldnum(SalesLine, SalesQty):
# SalesLine::modifySalesQty(this,this.inventDim());
# break;
#
# case fieldnum(SalesLine, SalesMarkup):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(SalesLine, MultiLnDisc):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(SalesLine, MultiLnPercent):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(SalesLine, InventTransIdReturn):
# [inventQty, costAmount] = InventTrans::calcInvoicedCostValue(this.InventTransIdReturn);
# if (inventQty)
# {
# this.CostPrice = costAmount/inventQty;
# }
# break;
#
# case fieldnum(SalesLine, ProjCategoryId):
# this.setTaxItemGroup(this.TaxItemGroup);
# this.setProjLinePropertyId();
# break;
#
# case fieldnum(SalesLine, ActivityNumber):
# this.initFromProjActivity(ProjActivity::find(this.ActivityNumber));
# this.setTaxItemGroup(this.TaxItemGroup);
# this.setProjLinePropertyId();
# break;
#
# case fieldnum(SalesLine, ProjId):
#
# if (this.SalesType == SalesType::ItemReq)
# {
# this.CurrencyCode = this.projTable().currencyId();
# this.projIdChanged();
# this.LineDisc = 0;
# this.LinePercent = 0;
# this.SalesMarkup = 0;
# if (this.projTable().Type == ProjType::FixedPrice)
# this.SalesPrice = 0;
# }
#
# this.setTaxItemGroup(this.TaxItemGroup);
# break;
#
# case fieldnum(SalesLine, PackingUnit):
# this.calcPackingUnitQty();
# break;
#
# case fieldnum(SalesLine, DeliveryAddress):
# this.setListCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(SalesLine, DeliveryCountryRegionId):
# this.AddressMap::formatAddress();
# this.setListCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(SalesLine, DeliveryCounty):
# this.AddressMap::formatAddress();
# this.setListCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(SalesLine, DeliveryState):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# break;
#
# case fieldnum(SalesLine, DeliveryCity):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# break;
#
# case fieldnum(SalesLine, DeliveryStreet):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# break;
#
# case fieldnum(SalesLine, DeliveryZipCode):
# this.AddressMap::modifiedFieldZipCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(SalesLine, DeliveryAddress):
# this.setListCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(SalesLine, ReceiptDateRequested):
# if (this.ShippingDateRequested > this.ReceiptDateRequested)
# {
# this.ShippingDateRequested = this.ReceiptDateRequested;
# this.ConfirmedDlv = this.ShippingDateConfirmed ? this.ShippingDateConfirmed : this.ShippingDateRequested;
# }
# break;
#
# case fieldnum(SalesLine, ShippingDateRequested):
# this.ConfirmedDlv = this.ShippingDateConfirmed ? this.ShippingDateConfirmed : this.ShippingDateRequested;
#
# if (this.ShippingDateRequested > this.ReceiptDateRequested)
# this.ReceiptDateRequested = this.ShippingDateRequested;
# break;
#
# case fieldnum(SalesLine, ShippingDateConfirmed):
# this.ConfirmedDlv = this.ShippingDateConfirmed ? this.ShippingDateConfirmed : this.ShippingDateRequested;
#
# if (this.ShippingDateConfirmed > this.ReceiptDateConfirmed)
# this.ReceiptDateConfirmed = this.ShippingDateConfirmed;
# break;
#
# case fieldnum(SalesLine, ReceiptDateConfirmed):
# if (this.ShippingDateConfirmed > this.ReceiptDateConfirmed)
# {
# this.ShippingDateConfirmed = this.ReceiptDateConfirmed;
# this.ConfirmedDlv = this.ShippingDateConfirmed ? this.ShippingDateConfirmed : this.ShippingDateRequested;
# }
# break;
#
# // Return - begin
# case fieldnum(SalesLine, ReturnDispositionCodeId):
# this.createReturnMarkupTrans(this.salesTable());
# this.returnUpdateBasedOnDispcode();
# break;
#
# case fieldnum(SalesLine, ReturnAllowReservation):
# if (this.ReturnStatus == ReturnStatusLine::Awaiting)
# {
# this.SalesQty = this.ReturnAllowReservation ? this.ExpectedRetQty : 0;
# SalesLine::modifySalesQty(this,this.inventDim());
# }
# break;
# // Return - end
#
# case fieldnum(SalesLine, DlvMode):
# dlvMode = DlvMode::find(this.DlvMode);
# this.ShipCarrierId = dlvMode.ShipCarrierId;
# this.ShipCarrierDlvType = dlvMode.ShipCarrierDlvType;
# this.ShipCarrierAccountCode = dlvMode.ShipCarrierAccountCode;
# break;
# }
# this.modifiedFieldDDC(_fieldId);
# }
#}
#
ENDSOURCE
SOURCE #modifiedFieldDDC
#///
#/// Processes the modified field event for delivery date control fields.
#///
#///
#/// The field ID for the modified field.
#///
#void modifiedFieldDDC(fieldId _fieldId) //Enhanced Delivery Date Control
#{;
# if (this.DeliveryDateControlType != SalesDeliveryDateControlType::None)
# {
# switch (_fieldId)
# {
# case fieldnum(SalesLine, DeliveryCountryRegionId): //fall through
# case fieldnum(SalesLine, DeliveryCounty): //fall through
# case fieldnum(SalesLine, DeliveryState): //fall through
# case fieldnum(SalesLine, DeliveryZipCode): //fall through
# case fieldnum(SalesLine, DlvMode): //fall through
# if (!this.RecId)
# {
# SalesCalcAvailableDlvDates::modifiedField(this,_fieldId,false);
# }
# break;
#
# case fieldnum(SalesLine, DeliveryDateControlType):
# if(this.DeliveryDateControlType != SalesDeliveryDateControlType::None)
# {
# SalesCalcAvailableDlvDates::modifiedField(this,_fieldId);
# }
# break;
#
# case fieldnum(SalesLine, ReceiptDateRequested):
# SalesCalcAvailableDlvDates::modifiedField(this,_fieldId);
#
# if (this.ShippingDateRequested > this.ReceiptDateRequested)
# this.ShippingDateRequested = this.ReceiptDateRequested;
# break;
#
# case fieldnum(SalesLine, ShippingDateRequested):
# SalesCalcAvailableDlvDates::modifiedField(this,_fieldId);
#
# if (this.ShippingDateRequested > this.ReceiptDateRequested)
# this.ReceiptDateRequested = this.ShippingDateRequested;
# break;
#
# case fieldnum(SalesLine, ShippingDateConfirmed):
# SalesCalcAvailableDlvDates::modifiedField(this,_fieldId);
#
# if (this.ShippingDateConfirmed > this.ReceiptDateConfirmed)
# this.ReceiptDateConfirmed = this.ShippingDateConfirmed;
# break;
#
# case fieldnum(SalesLine, ReceiptDateConfirmed):
# SalesCalcAvailableDlvDates::modifiedField(this,_fieldId);
#
# if (this.ShippingDateConfirmed > this.ReceiptDateConfirmed)
# this.ShippingDateConfirmed = this.ReceiptDateConfirmed;
# break;
#
# default:
# }
# }
#
# this.ConfirmedDlv = this.ShippingDateConfirmed ? this.ShippingDateConfirmed : this.ShippingDateRequested;
#}
#
ENDSOURCE
SOURCE #modifyItemDim
#void modifyItemDim(InventDim inventDim,
# fieldId dimFieldId,
# InventDimGroupId dimGroupId
# )
#{
# SalesLineType salesLineType;
# InventDim inventDimLocal = InventDim::findOrCreate(inventDim);
# ;
#
# if (InventDim::isFieldIdInventItemSetupRelevant(dimFieldId))
# {
# this.setDeliveryDateControlType(inventDimLocal.InventDimId);
# }
#
# if (this.DeliveryDateControlType == SalesDeliveryDateControlType::ATP)
# {
# this.InventDimId = inventDimLocal.InventDimId;
# SalesLine::modifySalesQty(this, inventDimLocal);
# }
#
# salesLineType = this.type();
# salesLineType.modifyItemDim(inventDim, dimFieldId, dimGroupId);
#}
#
ENDSOURCE
SOURCE #modifyWMSLocation
#///
#/// Modifies an InventDim record with WMS values.
#///
#///
#/// The InventDim record to modify.
#///
#///
#/// The field ID for the InventDim field that is changed.
#///
#///
#/// The dimension group for relating item.
#///
#///
#/// Indication of if it is an issue or an receipt transaction.
#///
#///
#/// When changing the warehouse on a sales order line the location is updated with default WMS values, for items where the attached dimension group has the location set to active.
#///
#void modifyWMSLocation(InventDim _inventDim,
# fieldId _dimFieldId,
# InventDimGroupId _dimGroupId,
# InventDirection _inventDirection = InventDirection::Issue
# )
#{
# WMSLocation wmsLocation;
# ;
# if (!_dimGroupId)
# return;
#
# if (_dimFieldId == fieldnum(InventDim,InventLocationId))
# {
# if (InventDim::find(this.InventDimId).InventLocationId != InventDim::find(this.orig().InventDimId).InventLocationId || // for new records
# InventDim::find(this.InventDimId).InventLocationId !=_inventDim.InventLocationId) // for existing records
# {
# if (InventDimSetup::find(_dimGroupId,fieldnum(InventDim,wmsLocationId)).Active)
# { // validate that the already specified location actually exists
# if (!WMSLocation::exist(_inventDim.wmsLocationId, _inventDim.InventLocationId))
# {
# _inventDim.wmsLocationId = ''; // clear the illegal location
# _inventDim.wmsPalletId = '';
# }
#
# if (this.QtyOrdered > 0)
# {
# _inventDirection = InventDirection::Issue;
# }
# else
# if (this.QtyOrdered < 0)
# {
# _inventDirection = InventDirection::Receipt;
# }
#
# wmsLocation = WMSLocation::defaultItemLocation(this.ItemId, _inventDirection, InventDim::findOrCreate(_inventDim));
# if (wmsLocation)
# {
# _inventDim.InventLocationId = wmsLocation.InventLocationId;
# _inventDim.wmsLocationId = wmsLocation.wmsLocationId;
# }
# }
# }
# }
#}
ENDSOURCE
SOURCE #ModuleType
#ModuleInventPurchSales moduleType()
#{
# return ModuleInventPurchSales::Sales;
#}
ENDSOURCE
SOURCE #MustBeCovPlanned
#boolean mustBeCovPlanned()
#{
# return this.RemainSalesPhysical ||
# this.RemainSalesFinancial;
#}
ENDSOURCE
SOURCE #nextLineNum
#LineNum nextLineNum()
#{
# SalesLine salesLine;
#
# return this.SalesPurchLine::nextLineNum(salesLine);
#}
ENDSOURCE
SOURCE #OnOrder
#//BP Deviation Documented
#display InventQtyOnOrder onOrder()
#{
# if (!this.InventTransId)
# return 0;
#
# return -(select sum(Qty) from inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.StatusIssue == StatusIssue::OnOrder).Qty;
#}
#
ENDSOURCE
SOURCE #onOrderInSalesUnit
#//BP Deviation Documented
#display SalesQtyOnOrder onOrderInSalesUnit()
#{
# InventQtyOnOrder inventQtyOnOrder;
# ;
# inventQtyOnOrder = this.onOrder();
#
# if (!inventQtyOnOrder)
# return 0;
#
# return this.unitConvertInvent2Sales(inventQtyOnOrder);
#}
#
ENDSOURCE
SOURCE #OrderAccount
#CustAccount orderAccount()
#{;
# return this.CustAccount;
#}
ENDSOURCE
SOURCE #pickedInTotalInventUnit
#//BP Deviation Documented
#display SalesQty pickedInTotalInventUnit()
#{
# if (!this.InventTransId)
# return 0;
#
# return this.pickedInTotalInventUnitServer();
#}
ENDSOURCE
SOURCE #pickedInTotalInventUnitServer
#server SalesQty pickedInTotalInventUnitServer()
#{
# return this.type().pickedInTotalInventUnit();
#}
ENDSOURCE
SOURCE #pickedInTotalSalesUnit
#//BP Deviation Documented
#display SalesQty pickedInTotalSalesUnit()
#{
# if (!this.InventTransId)
# return 0;
#
# return this.pickedInTotalSalesUnitServer();
#}
ENDSOURCE
SOURCE #pickedInTotalSalesUnitServer
#server SalesQty pickedInTotalSalesUnitServer()
#{
# return this.type().pickedInTotalSalesUnit();
#}
ENDSOURCE
SOURCE #postingOperations
#LedgerPostingType postingOperations()
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# return salesLineType.postingOperations();
#}
ENDSOURCE
SOURCE #postingSales
#LedgerPostingType postingSales()
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# return salesLineType.postingSales();
#}
ENDSOURCE
SOURCE #PriceGroupId
#PriceGroupId priceGroupId()
#{;
# return this.salesTable().PriceGroupId;
#}
ENDSOURCE
SOURCE #prodConsumedInventTransIds
#ListIterator prodConsumedInventTransIds(NoYesCombo _endedProductionsOnly = NoYesCombo::No)
#{
# List il = new List(Types::String);
# ListIterator it;
# InventTrans inventTrans;
# InventTrans inventTransRef;
# ProdTable prodTable;
#
# while select InventRefTransId from inventTrans
# group by inventTrans.InventRefTransId
# where inventTrans.InventTransId == this.InventTransId
# && inventTrans.InventRefTransId
# join inventTransRef
# where inventTransRef.InventTransId == inventTrans.InventRefTransId
# && inventTransRef.TransType == InventTransType::Production
# join prodTable
# where prodTable.ProdId == inventTransRef.TransRefId
# && prodTable.ProjPostingType == ProjProdPostingType::ConsumedMethod
# && prodTable.ProjLinkedToOrder == NoYes::Yes
# && (_endedProductionsOnly == NoYesCombo::No || prodTable.ProdStatus == ProdStatus::Completed)
# {
# il.addEnd(inventTrans.InventRefTransId);
# }
#
# it = new ListIterator (il);
#
# return it;
#}
ENDSOURCE
SOURCE #projIdChanged
#void projIdChanged()
#{
# SalesShippingDateConfirmed shippingDateConfirmed = this.ShippingDateConfirmed;
# SalesShippingDateRequested shippingDateRequested = this.ShippingDateRequested;
# SalesReceiptDateConfirmed receiptDateConfirmed = this.ReceiptDateConfirmed;
# SalesReceiptDateRequested receiptDateRequested = this.ReceiptDateRequested;
# SalesDeliveryDateControlType deliveryDateControl = this.DeliveryDateControlType;
# SalesShippingDate shippingDate = this.ConfirmedDlv;
# ;
# this.initFromProjTable(this.projTable(),false);
#
# this.ShippingDateConfirmed = shippingDateConfirmed;
# this.ShippingDateRequested = shippingDateRequested;
# this.ReceiptDateConfirmed = receiptDateConfirmed;
# this.ReceiptDateRequested = receiptDateRequested;
# this.DeliveryDateControlType = deliveryDateControl;
# this.ConfirmedDlv = shippingDate;
#}
#
ENDSOURCE
SOURCE #ProjProposalId
#//BP Deviation Documented
#display ProjProposalId projProposalId()
#{
# return ProjTrans::newSalesLine(this).proposalId();
#}
ENDSOURCE
SOURCE #projTable
#ProjTable projTable(boolean _update = false)
#{
# return ProjTable::find(this.ProjId, _update);
#}
#
ENDSOURCE
SOURCE #qtyActivateRemainder
#//BP Deviation Documented
#display InventQty qtyActivateRemainder()
#{
# return (this.onOrder() + this.reservedPhysical() + this.reservedOnOrder()) - (this.reservedOnPick() + this.qtyOnPickNotReserved());
#}
#
ENDSOURCE
SOURCE #qtyMarked
#InventQtyMarked qtyMarked()
#{
# ;
# return InventTrans::qtyMarked(this.InventTransId);
#}
ENDSOURCE
SOURCE #qtyOnPickNotReserved
#//BP Deviation Documented
#display InventQty qtyOnPickNotReserved()
#{
# return -(select sum(Qty) from inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.TransChildType == InventTransChildType::WMSOrder &&
# inventTrans.StatusIssue > StatusIssue::ReservPhysical).Qty;
#}
#
ENDSOURCE
SOURCE #qualityOrderStatusDisplay
#///
#/// Retrieves and returns the associated qualtiy orders's status.
#///
#///
#/// Current quality order status.
#///
#
#//BP deviation documented
#display InventTestOrderStatusDisplay qualityOrderStatusDisplay()
#{
# ;
# return InventQualityOrderType::newBuffer(this).orderStatusDisplay();
#}
#
ENDSOURCE
SOURCE #referenceWarningTxt
#str referenceWarningTxt()
#{
# ProdTable prodTable;
# PurchLine purchLine;
# SalesLine salesLine;
# ;
#
# if (this.InventRefId)
# {
# switch (this.InventRefType)
# {
# case InventRefType::Production:
# prodTable = ProdTable::find(this.InventRefId);
# if (prodTable)
# {
# return strfmt("@SYS27052", prodTable.ProdId, prodTable.ProdStatus, this.ItemId);
# }
# break;
# case InventRefType::Sales:
# salesLine = SalesLine::findInventTransId(this.InventRefTransId);
# if (salesLine)
# {
# return strfmt("@SYS75609", salesLine.SalesId, salesLine.SalesStatus, this.ItemId);
# }
# break;
# case InventRefType::Purch:
# purchLine = PurchLine::findInventTransId(this.InventRefTransId);
# if (purchLine)
# {
# return strfmt("@SYS75607", purchLine.PurchId, purchLine.PurchStatus, this.ItemId);
# }
# break;
# }
# }
#
# return '';
#}
ENDSOURCE
SOURCE #remainReturnLotQty
#ReturnExpectedRetQty remainReturnLotQty(SalesLine _salesLine)
#{
# ;
# return abs((select sum(ExpectedRetQty) from salesLine where
# salesLine.InventTransIdReturn == this.InventTransId &&
# salesLine.InventTransId != _salesLine.InventTransId).ExpectedRetQty);
#}
ENDSOURCE
SOURCE #reqTrans
#ReqTrans reqTrans(ReqPlanId _reqPlanId = ReqPlanSched::defaultDynamicId(),boolean _forupdate = false)
#{
# ReqTrans reqTrans;
# ;
# reqTrans.selectForUpdate(_forupdate);
#
# select firstonly reqTrans
# index hint RefIdx
# where reqTrans.ReqPlanId == _reqPlanId &&
# reqTrans.RefType == ReqRefType::Sales &&
# reqTrans.RefId == this.SalesId &&
# reqTrans.InventTransId == this.InventTransId;
#
# return reqTrans;
#}
ENDSOURCE
SOURCE #ReservedOnOrder
#//BP Deviation Documented
#display InventQtyReservOrdered reservedOnOrder()
#{
# if (!this.InventTransId)
# return 0;
#
#
# return -(select sum(Qty) from inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.StatusIssue == StatusIssue::ReservOrdered).Qty;
#}
#
ENDSOURCE
SOURCE #reservedOnOrderInSalesUnit
#//BP Deviation Documented
#display SalesQtyReservOrdered reservedOnOrderInSalesUnit()
#{
# InventQtyReservOrdered inventQtyReservOrdered;
# ;
# inventQtyReservOrdered = this.reservedOnOrder();
#
# if (!inventQtyReservOrdered)
# return 0;
#
# return this.unitConvertInvent2Sales(inventQtyReservOrdered);
#}
#
ENDSOURCE
SOURCE #reservedOnPick
#//BP Deviation Documented
#display InventQtyReservOrdered reservedOnPick()
#{
# return -(select sum(Qty) from inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.TransChildType == InventTransChildType::WMSOrder &&
# inventTrans.StatusIssue == StatusIssue::ReservPhysical).Qty;
#
#}
#
ENDSOURCE
SOURCE #ReservedPhysical
#//BP Deviation Documented
#display InventQtyReservPhysical reservedPhysical()
#{
# if (!this.InventTransId)
# return 0;
#
#
# return -(select sum(Qty) from inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.StatusIssue == StatusIssue::ReservPhysical).Qty;
#}
#
ENDSOURCE
SOURCE #reservedPhysicalInSalesUnit
#//BP Deviation Documented
#display SalesQtyReservPhysical reservedPhysicalInSalesUnit()
#{
# SalesQtyReservPhysical salesQtyReservPhysical;
# ;
# salesQtyReservPhysical = this.reservedPhysical();
#
# if (!salesQtyReservPhysical)
# return 0;
#
# return this.unitConvertInvent2Sales(salesQtyReservPhysical);
#}
#
ENDSOURCE
SOURCE #ReserveQty
#InventQty reserveQty()
#{
#
# if (! this.Reservation)
# return 0;
#
# if (this.RemainInventPhysical < 0)
# return 0;
#
# return -this.RemainInventPhysical;
#
#}
ENDSOURCE
SOURCE #ResetInvent
#client server
#void resetInvent(boolean update = true)
#{
# this.SalesQty = 0;
# this.QtyOrdered = 0;
# this.SalesPrice = 0;
# this.LineAmount = 0;
#
# this.RemainSalesPhysical = this.SalesQty;
# this.RemainSalesFinancial = 0;
# this.RemainInventPhysical = this.QtyOrdered;
#
# InventMovement::bufferSetTransQtyUnit(this);
# this.setInventDeliverNow();
#
# if (update)
# {
# this.update();
# this.SalesStatus = SalesStatus::Canceled;
# this.doUpdate();
#
# InterCompanyUpdateStatus::synchronize(this);
# }
# else
# {
# this.SalesStatus = SalesStatus::Canceled;
# }
#}
ENDSOURCE
SOURCE #returnCreateReplacement
#///
#/// Determines if a Replacement order should be created for the SalesLine in scope.
#///
#///
#/// True if a Replacement order should be created, otherwise false.
#///
#public boolean returnCreateReplacement()
#{
# boolean ret;
# ;
# ret = this.salesTable().returnCreateReplacement() &&
# this.returnDispositionCode().createReplacement();
#
# return ret;
#}
#
ENDSOURCE
SOURCE #returnCreateScrap
#///
#/// Determines if the items returned on the SalesLine in scope should be scrapped.
#///
#///
#/// True if the lot should be scrapped, otherwise false.
#///
#public boolean returnCreateScrap()
#{
# boolean ret;
# ;
# if (this.interCompanySalesLineExist())
# {
# ret = false;
# }
# else
# {
# ret = this.returnDispositionCode().createScrap();
# }
# return ret;
#}
#
ENDSOURCE
SOURCE #returnDispositionCode
#///
#/// Finds the ReturnDispositionCode record related to the SalesLine in scope.
#///
#///
#/// A boolean controling if the ReturnDispositionCode code should be selected with the forupdate flag. Default value is false.
#///
#///
#/// A ReturnDispositionCode table buffer identified by the ReturnDispositionCodeId applied to the SalesLine in scope.
#///
#public ReturnDispositionCode returnDispositionCode(boolean _forupdate = false)
#{;
# return ReturnDispositionCode::find(this.ReturnDispositionCodeId,_forupdate);
#}
#
ENDSOURCE
SOURCE #returnJournal
#public boolean returnJournal()
#{;
# return this.ReturnStatus >= ReturnStatusLine::Awaiting ? true : false;
#}
#
ENDSOURCE
SOURCE #returnLineAmount
#public LineAmount returnLineAmount()
#{
# LineAmount returnAmount;
# Qty qtyNow = this.ExpectedRetQty;
# ;
#
# if (this.SalesPrice)
# {
# returnAmount = (qtyNow * ((this.SalesPrice) / 1) + (qtyNow >= 0 ? this.SalesMarkup : -this.SalesMarkup));
# }
# else
# {
# returnAmount = this.LineAmount + (qtyNow >= 0 ? this.SalesMarkup : -this.SalesMarkup);
# }
#
# returnAmount = Currency::amount(returnAmount, this.CurrencyCode);
#
# return returnAmount;
#}
#
#
ENDSOURCE
SOURCE #returnLineScrap
#///
#/// Scraps the lot returned on the SalesLine in scope.
#///
#///
#/// If a Reservationline exists I'll be deleted and if other markings exists they'll be cancelled.
#/// The lot in question is send to quarantine and the scrapped.
#///
#public void returnLineScrap()
#{
# InventTrans inventTrans;
# SalesLine reservationLine;
# InventDim inventDimQuarantine, inventDim;
# InventQuarantineOrder quarantineOrder;
# InventParmQuarantineOrder inventParmQuarantineOrder;
# InventQuarantineOrder_Scrap inventQuarantineOrder_Scrap = InventQuarantineOrder_Scrap::construct();
# InventQuarantineUpdStartUp inventQuarantineUpdStartUp;
# InventLocation inventLocation;
# InventDimId inventDimIdRes;
# ;
#
# if (this.returnCreateScrap())
# {
# ttsbegin;
# if (this.qtyMarked())
# {
# select forupdate firstonly reservationLine where reservationLine.InventRefTransId == this.InventTransId;
# if (reservationLine.isReturnReservationLine())
# {
# inventDimIdRes = reservationLine.InventDimId;
# reservationLine.delete();
# }
#
# if (this.qtyMarked())
# {
# InventTrans::deleteMarking(this.InventTransId, this.InventTransId, this.QtyOrdered *-1);
# }
# }
#
# // Create the Quarantine order.
# inventTrans = InventTrans::findTransId(this.InventTransId);
# quarantineOrder.initFromInventTable(InventTable::find(inventTrans.ItemId));
# quarantineOrder.initFromInventTrans(inventTrans);
# quarantineOrder.initValue();
# quarantineOrder.InventDimId = inventDimIdRes ? inventDimIdRes : inventTrans.InventDimId;
# inventDim.data(InventDim::find(quarantineOrder.InventDimId));
# inventDimQuarantine.data(inventDim);
# inventLocation = InventLocation::find(inventDim.InventLocationId);
# inventDimQuarantine.InventSiteId = inventLocation.InventSiteId;
# inventDimQuarantine.InventLocationId = inventLocation.InventLocationIdQuarantine;
# inventDimQuarantine.wmsLocationId = WMSLocation::defaultItemLocation(this.ItemId, InventDirection::Receipt, inventDimQuarantine).wmsLocationId;
#
# quarantineOrder.InventDimId = InventDim::findOrCreate(inventDim).InventDimId;
# quarantineOrder.InventDimIdQuarantine = InventDim::findOrCreate(inventDimQuarantine).InventDimId;
# quarantineOrder.InventTransIdRef = this.InventTransId;
# quarantineOrder.insert();
#
# //Establish hard marking betwen this Return order line and the Quarantine order which will scrap the lot in question.
# InventTrans::updateMarking(quarantineOrder.InventTransId, this.InventTransId, -quarantineOrder.Qty);
# InventTrans::updateMarking(this.InventTransId, quarantineOrder.InventTransId, quarantineOrder.Qty);
#
# // Start the Quarantine order.
# inventParmQuarantineOrder.QuarantineId = quarantineOrder.QuarantineId;
# inventParmQuarantineOrder.TransDate = quarantineOrder.QuarantineDate;
# inventQuarantineUpdStartUp = InventQuarantineUpdStartUp::newParmBuffer(inventParmQuarantineOrder);
# inventQuarantineUpdStartUp.run();
#
# // Scrap the Quarantine order.
# inventQuarantineOrder_Scrap.parmInventQuarantineId(quarantineOrder.QuarantineId);
# inventQuarantineOrder_Scrap.parmScrapQty(quarantineOrder.RemainQty);
# inventQuarantineOrder_Scrap.parmTransDate(systemdateget());
# inventQuarantineOrder_Scrap.run();
#
# ttscommit;
# }
#}
ENDSOURCE
SOURCE #returnLineUpdate
#///
#/// Handles Return orders
#///
#///
#/// A base enum; DocumentStatus.
#///
#///
#/// Handles the special actions needed for Return orders.
#///
#void returnLineUpdate(DocumentStatus _documentStatus)
#{;
# if (this.returnCreateScrap() &&
# (_documentStatus == DocumentStatus::PackingSlip ||
# (_documentStatus == DocumentStatus::Invoice && !this.isReturnLineScrapped())))
# {
# this.returnLineScrap();
# }
#
# if (this.returnCreateReplacement())
# {
# if (ReturnReplaceItemRef::existOrigSalesLine(this.SalesId, this.LineNum))
# {
# this.createReplacement();
# }
# else
# { // Replacement order setup is missing for return order number %1, line number %2.
# throw error(strfmt("@SYS123029", this.salesTable().ReturnItemNum, this.LineNum));
# }
# }
#
# this.setReturnLineStatus(_documentStatus);
#}
#
ENDSOURCE
SOURCE #ReturnUpdateBasedOnDispCode
#public void returnUpdateBasedOnDispcode()
#{
# SalesTable salesTable;
# boolean scrap;
# ;
# scrap = ReturnDispositionCode::find(this.ReturnDispositionCodeId).DispositionAction == DispositionAction::CreditOnly ? NoYes::Yes : NoYes::No;
#
# if (this.ReturnAllowReservation && scrap)
# {
# this.ReturnAllowReservation = !scrap;
# }
#
# if (!this.interCompanySalesLineExist())
# {
# this.RemainSalesPhysical = scrap ? this.ExpectedRetQty : 0;
# this.SalesQty = scrap ? this.ExpectedRetQty : 0;
# this.RemainInventPhysical = scrap ? this.ExpectedRetQty : 0;
# this.QtyOrdered = scrap ? this.ExpectedRetQty : 0;
# this.Scrap = scrap;
# }
#
# this.ReturnArrivalDate = this.ReturnStatus == ReturnStatusLine::Awaiting && !this.ReturnArrivalDate && scrap ? systemdateget() : dateNull();
# this.ReturnStatus = scrap ? ReturnStatusLine::Received : ReturnStatusLine::Awaiting;
#
# salesTable = this.salesTable(true);
# salesTable.ReturnStatus = scrap ? ReturnStatusHeader::Open : ReturnStatusHeader::Created;
# salesTable.update();
#}
ENDSOURCE
SOURCE #SalesPurchTable
#SalesPurchTable salesPurchTable()
#{
# return this.salesTable();
#}
ENDSOURCE
SOURCE #SalesQtyModified
#void salesQtyModified()
#{
# this.initSalesQty();
#
# this.LineAmount = this.calcLineAmount();
#
# InventMovement::bufferSetTransQtyUnit(this);
#
# this.setInventDeliverNow();
# InventMovement::bufferSetRemainQty(this);
#}
ENDSOURCE
SOURCE #SalesTable
#SalesTable salesTable(boolean update = false)
#{
# return SalesTable::find(this.SalesId, update);
#}
ENDSOURCE
SOURCE #salesTableName
#// PBa
#//BP Deviation Documented
#display Name salesTableName()
#{
# return this.salesTable().SalesName;
#}
ENDSOURCE
SOURCE #setAddress
#void setAddress(Address address)
#{
# if (address.Name)
# this.DeliveryName = address.Name;
#
# this.DeliveryAddress = address.Address;
# this.DeliveryZipCode = address.ZipCode;
# this.DeliveryCountryRegionId = address.CountryRegionId;
# this.DeliveryState = address.State;
# this.DeliveryCounty = address.County;
# this.DeliveryStreet = address.Street;
# this.DeliveryCity = address.City;
# this.AddressRefRecId = address.RecId;
# this.AddressRefTableId = address.TableId;
#
# this.setListCode();
# this.setTaxGroup(TaxSales::custTaxGroup(this.deliveryTerm(), this.TaxGroup, address));
#}
ENDSOURCE
SOURCE #SetAddressFromProjTable
#void setAddressFromProjTable(ProjTable _projTable)
#{;
#
# this.DeliveryName = _projTable.DlvName;
# this.DeliveryAddress = _projTable.DlvAddr;
# this.DeliveryStreet = _projTable.DeliveryStreet;
# this.DeliveryZipCode = _projTable.DlvZipCode;
# this.DeliveryCity = _projTable.DeliveryCity;
# this.DeliveryCountryRegionId = _projTable.DlvCountryRegionId;
# this.DeliveryCounty = _projTable.DlvCounty;
# this.DeliveryState = _projTable.DlvState;
#}
ENDSOURCE
SOURCE #setAddressFromSalesLine
#void setAddressFromSalesLine(SalesLine salesLine)
#{;
# this.DeliveryAddress = salesLine.DeliveryAddress;
# this.DeliveryName = salesLine.DeliveryName;
# this.DeliveryStreet = salesLine.DeliveryStreet;
# this.DeliveryZipCode = salesLine.DeliveryZipCode;
# this.DeliveryCity = salesLine.DeliveryCity;
# this.DeliveryCounty = salesLine.DeliveryCounty;
# this.DeliveryState = salesLine.DeliveryState;
# this.DeliveryCountryRegionId = salesLine.DeliveryCountryRegionId;
# this.AddressRefRecId = salesLine.RecId;
# this.AddressRefTableId = salesLine.TableId;
#}
ENDSOURCE
SOURCE #setAddressFromSalesTable
#void setAddressFromSalesTable(SalesTable salesTable = this.salesTable())
#{;
# this.DeliveryAddress = salesTable.DeliveryAddress;
# this.DeliveryName = salesTable.DeliveryName;
# this.DeliveryStreet = salesTable.DeliveryStreet;
# this.DeliveryZipCode = salesTable.DeliveryZipCode;
# this.DeliveryCity = salesTable.DeliveryCity;
# this.DeliveryCounty = salesTable.DeliveryCounty;
# this.DeliveryState = salesTable.DeliveryState;
# this.DeliveryCountryRegionId = salesTable.DeliveryCountryRegionId;
# this.AddressRefRecId = salesTable.RecId;
# this.AddressRefTableId = salesTable.TableId;
#}
ENDSOURCE
SOURCE #setDeliveryDateControlType
#///
#/// Sets the delivery date control type for the current sales line.
#///
#///
#/// The inventory dimension to use for finding the delivery date control type.
#///
#void setDeliveryDateControlType(InventDimId _inventDimId = this.InventDimId)
#{
# SalesDeliveryDateControlType deliveryDateControlType;
# SalesATPTimeFence atpTimeFence;
# SalesATPInclPlannedOrders atpInclPlannedOrders;
# boolean isItemSpecific;
# ;
#
# [deliveryDateControlType, atpTimeFence, atpInclPlannedOrders,isItemSpecific] = SalesATPCalculation::findSalesOrderSettings(this.ItemId, _inventDimId);
# deliveryDateControlType = isItemSpecific ? deliveryDateControlType : this.salesTable().DeliveryDateControlType;
# if (deliveryDateControlType == SalesDeliveryDateControlType::ATP &&
# this.inventTable().inventItemType().isServiceItem())
# deliveryDateControlType = SalesDeliveryDateControlType::None;
#
# this.DeliveryDateControlType = deliveryDateControlType;
#}
ENDSOURCE
SOURCE #SetInventDeliverNow
#void setInventDeliverNow()
#{
# this.InventDeliverNow = UnitConvert::qty(this.SalesDeliverNow,
# this.SalesUnit,
# this.inventTable().inventUnitId(),
# this.ItemId);
#}
ENDSOURCE
SOURCE #setInventDimId
#///
#/// Applies the InventDimId parameter to the SalesLine.inventDimId field and defaults values based on the new inventory dimensions.
#///
#///
#/// The InventDimId value that should be applied to the SalesLine.InventDimId field.
#///
#///
#/// The InventDim record buffer related to the InventDimId parameters; optional.
#///
#public void setInventDimId(InventDimId _inventDimId, InventDim _inventDim = InventDim::find(_inventDimId))
#{
# InventDim currentInventDim = this.InventDimId == _inventDimId ? _inventDim : this.inventDim();
# ;
# this.InventDimId = _inventDimId;
# this.linkInventDim2Dimension(_inventDim, currentInventDim);
#}
ENDSOURCE
SOURCE #setInventDimIdFromInventDim
#///
#/// Finds or create an InventDimId for the InventDim parameter and applies the found InventDimId to the SalesLine.inventDimId field.
#///
#///
#/// An InventDim record buffer that should be referenced by the current SalesLine record buffer.
#///
#public void setInventDimIdFromInventDim(InventDim _inventDim)
#{
# InventDim inventDim;
# ;
# inventDim = InventDim::findOrCreate(_inventDim);
# this.setInventDimId(inventDim.InventDimId, inventDim);
#}
ENDSOURCE
SOURCE #setInventSumLogTTS
#void setInventSumLogTTS()
#{
# if (this.Reservation == ItemReservation::Explosion)
# appl.inventUpdateOnhandGlobal().inventUpdateOnhand().parmSkipInventSumLogTTS(true); // Skip inventSumLogTTS because reqTrans(es) deleted and inserted directly
# else
# appl.inventUpdateOnhandGlobal().inventUpdateOnhand().parmSkipInventSumLogTTS(false); // to make sure that inventSumLogTTS is not skipped, if it was skipped earlier
#}
ENDSOURCE
SOURCE #setListCode
#void setListCode()
#{;
#// this.listcode = EUSalesList::resolveListCode(this.deliveryCountry, this.payer().country);
#}
ENDSOURCE
SOURCE #SetPriceAgreement
#client server void setPriceAgreement(InventDim inventDim)
#{
# this.SalesPurchLine::setPriceAgreement(inventDim);
#}
ENDSOURCE
SOURCE #SetPriceDisc
#void setPriceDisc(InventDim inventDim)
#{
# this.setPriceAgreement(inventDim);
# this.LineAmount = this.calcLineAmountForced();
#}
ENDSOURCE
SOURCE #setProjLinePropertyId
#server void setProjLinePropertyId()
#{
# ;
# this.ProjLinePropertyId = ProjLinePropertySetup::findLinePropertyId(this.ProjId,this.ProjCategoryId);
#}
ENDSOURCE
SOURCE #setReturnLineStatus
#void setReturnLineStatus(DocumentStatus _documentStatus)
#{;
# switch (_documentStatus)
# {
# case DocumentStatus::PackingSlip :
# if (this.ReturnStatus == ReturnStatusLine::Registered)
# {
# this.ReturnStatus = ReturnStatusLine::Received;
# this.doUpdate();
# }
# else if (this.ReturnStatus == ReturnStatusLine::Awaiting
# && InventTrans::findTransId(this.InventTransId).StatusReceipt == StatusReceipt::Received)
# {
# this.ReturnStatus = ReturnStatusLine::Received;
# this.doUpdate();
# SalesTable::returnUpdatedHeaderStatus(this.SalesId,_documentStatus);
# }
# break;
#
# case DocumentStatus::Invoice :
# if (this.ReturnStatus == ReturnStatusLine::Registered || this.ReturnStatus == ReturnStatusLine::Received )
# {
# this.ReturnStatus = ReturnStatusLine::Invoiced;
# this.ReturnClosedDate = systemdateget();
# this.doUpdate();
# SalesTable::returnUpdatedHeaderStatus(this.SalesId, _documentStatus);
# }
# else
# {
# throw error(strfmt("@SYS120281", enum2str(ReturnStatusLine::Registered), enum2str(ReturnStatusLine::Received)));
# }
# break;
# }
#}
ENDSOURCE
SOURCE #SetSalesStatus
#void setSalesStatus()
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.setSalesStatus(this);
#}
ENDSOURCE
SOURCE #setTaxGroup
#void setTaxGroup(TaxGroup _taxGroup)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.setTaxGroup(_taxGroup);
#}
ENDSOURCE
SOURCE #setTaxItemGroup
#void setTaxItemGroup(TaxItemGroup _taxItemGroup)
#{
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# salesLineType.setTaxItemGroup(_taxItemGroup);
#
#}
ENDSOURCE
SOURCE #setThirdPartyAddressFromSalesTable
#void setThirdPartyAddressFromSalesTable(SalesTable salesTable = this.salesTable())
#{
# Address fromTPAddress;
# ;
#
# if (this.RecId)
# {
# fromTPAddress = Address::find(salesTable.TableId, salesTable.RecId, AddressType::ShipCarrierThirdPartyShipping);
# if (fromTPAddress)
# {
# Address::copyThirdPartyAddress(fromTPAddress, this.TableId, this.RecId);
# }
# }
#}
ENDSOURCE
SOURCE #taxDate
#TransDate taxDate(TransDate transDate)
#{
# return TaxParameters::find().TaxCalculationDateType == TaxCalculationDateType::DeliveryDate ? this.deliveryDate(transDate) : transDate;
#}
ENDSOURCE
SOURCE #taxPcsPrice
#PriceCur taxPcsPrice(TransDate transDate = systemdateget())
#{
# return this.SalesPurchLine::taxPcsPrice(transDate);
#}
ENDSOURCE
SOURCE #timeZoneSite
#//BP Deviation documented
#display Timezone timeZoneSite()
#{
# return InventSite::timeZoneSite(InventDim::find(this.InventDimId).InventSiteId);
#}
ENDSOURCE
SOURCE #TPAddress
#Addressing tpAddress()
#{
# return Address::find(this.TableId, this.RecId, AddressType::ShipCarrierThirdPartyShipping).Address;
#}
ENDSOURCE
SOURCE #Type
#SalesLineType type()
#{
# return SalesLineType::construct(this);
#}
ENDSOURCE
SOURCE #unitConvertInvent2Sales
#SalesQty unitConvertInvent2Sales(InventQty _inventQty)
#{
# return UnitConvert::qty(_inventQty,
# this.inventTable().inventUnitId(),
# this.SalesUnit,
# this.ItemId);
#}
#
ENDSOURCE
SOURCE #Update
#public void update(boolean dropInvent = false,
# Common childBuffer = null)
#{
# SalesLineType salesLineType;
# ;
#
# this.setInventSumLogTTS();
# salesLineType = this.type();
# salesLineType.update(dropInvent, childBuffer);
#}
ENDSOURCE
SOURCE #updateBlanketOrder
#server void updateBlanketOrder(SalesQty _salesQty)
#{
# SalesLine salesLineBlanketOrder;
# ;
# if (this.BlanketRefTransId && _salesQty)
# {
# ttsbegin;
#
# salesLineBlanketOrder = SalesLine::findInventTransId(this.BlanketRefTransId, true);
# if (salesLineBlanketOrder.RecId && salesLineBlanketOrder.SalesType == SalesType::Blanket)
# {
# salesLineBlanketOrder.RemainSalesPhysical += _salesQty;
# salesLineBlanketOrder.update();
# }
# ttscommit;
# }
#}
ENDSOURCE
SOURCE #useWMSOrder
#NoYes useWMSOrder()
#{
# InventItemLocation inventItemLocation = InventItemLocation::find(this.ItemId, this.InventDimId);
# ;
# return inventItemLocation.useWMSOrder(this.inventDim());
#}
ENDSOURCE
SOURCE #ValidateDelete
#boolean validateDelete(boolean _interCompanyForce = false)
#{
# boolean ok = true;
# SalesLineType salesLineType;
# ;
#
# ok = super();
#
# if (ok)
# {
# salesLineType = this.type();
# ok = salesLineType.validateDelete(_interCompanyForce);
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId fieldId)
#{
# boolean ok = true;
# ;
#
# if(!this.AddressMap::validatePostalCode(fieldId))
# {
# return false;
# }
#
# ok = super(fieldId);
#
# ok = ok && this.validateField_Server(fieldId);
#
# return ok;
#}
ENDSOURCE
SOURCE #validateField_Server
#server boolean validateField_Server(fieldId fieldId)
#{
# boolean ok;
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# ok = salesLineType.validateField(fieldId);
#
# return ok;
#}
ENDSOURCE
SOURCE #validateModifyItemDim
#public boolean validateModifyItemDim(InventDim _inventDim,
# fieldId _dimFieldId,
# InventDimGroupId _dimGroupId)
#{
# ;
# return this.type().validateModifyItemDim(_inventDim,_dimFieldId,_dimGroupId);
#}
ENDSOURCE
SOURCE #ValidateWrite
#boolean validateWrite(boolean _skipCreditLimitCheck = false)
#{
# boolean ok = true;
# ;
#
# ok = super();
#
# ok = ok && this.validateWrite_server(_skipCreditLimitCheck);
#
# return ok;
#}
#
ENDSOURCE
SOURCE #validateWrite_server
#server boolean validateWrite_server(boolean _skipCreditLimitCheck = false)
#{
# boolean ok = true;
# SalesLineType salesLineType;
# ;
#
# salesLineType = this.type();
# ok = salesLineType.validateWrite(_skipCreditLimitCheck);
# // _skipCreditLimitCheck is passed as true from the SalesQuickQuote form
#
# if (ok)
# {
# ok = appl.dimensionSetValidation().checkDimension(this, fieldnum(SalesLine, Dimension), true, false, true);
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #warningForReference
#boolean warningForReference()
#{
# str warningTxt;
# ;
#
# if (this.InventRefId)
# {
# warningTxt = this.referenceWarningTxt();
# if (warningTxt)
# {
# return Box::yesNo(warningTxt+'\n\n'+strfmt("@SYS27060"),DialogButton::Yes) == DialogButton::Yes;
# }
# }
#
# return true;
#}
ENDSOURCE
SOURCE #changeReturnOrderType
#///
#/// Creates or deletes inventory transactions related to Return orders.
#///
#///
#/// Identifies SalesLines
#///
#///
#/// WMSJournalTrans table buffer
#///
#///
#/// Flag controlling whether inventory transactions should be created or deleted
#///
#///
#/// By default Return order lines are created without corresponding inventory trans actions. This method creates the transactions when
#/// they're needed for item arrival purpose and deletes them if they're crated by mistake.
#///
#///
#/// The specified Sales Order line could not be found. The operation is aborted.
#///
#///
#/// The specified Sales order could not be found. The operation is aborted.
#///
#///
#/// The specified Sale order is not of type Return order. The operation is aborted.
#///
#///
#///
#///
#///
#///
#///
#
#static void changeReturnOrderType(InventTransId _inventTransId, WMSJournalTrans _wmsJournalTrans = null, boolean _reverse = false)
#{
# #OCCRetryCount
# SalesTable salesTable;
# SalesLine salesLine;
# SalesLine salesLineMore;
# InventTrans inventTrans, inventTransMore;
# WMSJournalTrans wmsJournalTrans;
# ;
#
# if ((SalesLine::findInventTransId(_inventTransId).returnJournal() && !InventTrans::findTransId(_inventTransId).RecId) || _reverse)
# {
# try
# {
# ttsbegin;
#
# if (_inventTransId)
# {
# salesLine = SalesLine::findInventTransId(_inventTransId, true);
# }
# else
# {
# salesLine = SalesLine::findInventTransId(_wmsJournalTrans.InventTransId, true);
# }
#
# if (!salesLine && !_reverse)
# {
# //The specified Sales Order line could not be found. The operation is aborted.
# throw error("@SYS115232");
# }
#
# salesTable = SalesTable::find(salesLine.SalesId, true);
#
# if (!salesTable && !_reverse)
# {
# //The specified Sales order could not be found. The operation is aborted.
# throw error("@SYS115230");
# }
#
# if (salesTable.returnJournal() || _reverse)
# {
# if (_reverse && salesLine)
# {
# select firstonly inventTrans where inventTrans.InventTransId == _inventTransId &&
# inventTrans.StatusReceipt != StatusReceipt::Ordered;
#
# if(!inventTrans)
# {
# select firstonly wmsJournalTrans where wmsJournalTrans.InventTransId == _wmsJournalTrans.InventTransId &&
# wmsJournalTrans.RecId != _wmsJournalTrans.RecId;
# }
#
# if (!wmsJournalTrans && !inventTrans)
# {
# salesLine.RemainSalesPhysical = 0;
# salesLine.SalesQty = 0;
# salesLine.RemainInventPhysical = 0;
# salesLine.QtyOrdered = 0;
# salesLine.update();
#
#
# select firstonly RecId from salesLineMore where salesLineMore.SalesId == salesLine.SalesId &&
# salesLineMore.LineNum != salesLine.LineNum &&
# salesLineMore.RecId != salesLine.RecId
# exists join inventTransMore where inventTransMore.InventTransId == salesLineMore.InventTransId;
#
# if (!salesLineMore.RecId)
# {
# salesTable.ReturnStatus = ReturnStatusHeader::Created;
# salesTable.update();
# }
# }
# }
# else
# if (salesLine)
# {
# salesLine.SalesQty = salesLine.ExpectedRetQty;
# salesLine.QtyOrdered = salesLine.calcQtyOrdered(salesLine.ExpectedRetQty);
# salesLine.RemainInventPhysical = salesLine.QtyOrdered;
# salesLine.RemainSalesPhysical = salesLine.SalesQty;
# salesLine.LineAmount = salesLine.returnLineAmount();
# salesLine.update();
#
# if (salesTable.SalesType != SalesType::ReturnItem)
# {
# salesTable.SalesType = SalesType::ReturnItem;
# salesTable.update();
# }
# }
# }
# else
# {
# //The specified Sale order is not of type Return order. The operation is aborted.
# throw error("@SYS115231" );
# }
# ttscommit;
#
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
# }
#}
#
#
ENDSOURCE
SOURCE #exist
#static boolean exist(SalesId salesId,
# LineNum lineNum = naReal())
#{
# if (!salesId)
# return false;
#
# if (lineNum == naReal())
# {
# return (select firstonly RecId from salesLine
# index hint SalesLineIdx
# where salesLine.SalesId == salesId).RecId != 0;
# }
#
# return (select firstonly RecId from salesLine
# index hint SalesLineIdx
# where salesLine.SalesId == salesId &&
# salesLine.LineNum == lineNum).RecId != 0;
#}
#
ENDSOURCE
SOURCE #existDifferentCurrency
#server static boolean existDifferentCurrency(SalesId salesId, CurrencyCode currencyCode)
#{
# if (!salesId || !currencyCode)
# return false;
#
# return (select firstonly RecId from salesLine
# index hint SalesLineIdx
# where salesLine.SalesId == salesId &&
# salesLine.CurrencyCode != currencyCode).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#static SalesLine find(SalesId salesId,
# LineNum lineNum = 0,
# boolean update = false)
#{
# SalesLine salesLine;
# ;
#
# if (salesId)
# {
# if (update)
# salesLine.selectForUpdate(update);
#
# if (lineNum)
# {
# select firstonly salesLine
# index hint SalesLineIdx
# where salesLine.SalesId == salesId &&
# salesLine.LineNum == lineNum;
# }
# else
# {
# select firstonly salesLine
# index hint SalesLineIdx
# where salesLine.SalesId == salesId;
# }
# }
#
# return salesLine;
#}
#
ENDSOURCE
SOURCE #findInventTransId
#static SalesLine findInventTransId(InventTransId _transId,
# boolean _update = false )
#{
# SalesLine salesLine;
# ;
#
# if (_transId)
# {
# if (_update)
# salesLine.selectForUpdate(_update);
#
# select firstonly salesLine
# index hint TransIdIdx
# where salesLine.InventTransId == _transId;
# }
#
# return salesLine;
#}
ENDSOURCE
SOURCE #findRecId
#static SalesLine findRecId(recId recId,
# boolean update = false)
#{
# SalesLine salesLine;
# ;
# if (update)
# salesLine.selectForUpdate(update);
#
# select salesLine
# where salesLine.RecId == recId;
#
# return salesLine;
#}
ENDSOURCE
SOURCE #highestSalesStatus
#static SalesStatus highestSalesStatus(SalesId salesId)
#{
# SalesLine salesLine;
# ;
#
# select maxof(SalesStatus) from salesLine
# where salesLine.SalesId == salesId &&
# salesLine.SalesStatus > SalesStatus::None;
#
# if (salesLine)
# return salesLine.SalesStatus;
#
# return SalesStatus::Backorder;
#}
ENDSOURCE
SOURCE #isTaxExist
#static boolean isTaxExist(SalesIdBase _salesID, LineNum _lineNum, TaxCode _taxCode)
#{
# SalesLine salesLineloc;
# TaxOnItem taxOnItem;
# boolean taxExist = false;
# ;
#
# if (_salesID && _lineNum)
# {
# select SalesId, LineNum, TaxItemGroup
# from salesLineloc
# where salesLineloc.SalesId == _salesID
# && salesLineloc.LineNum == _lineNum;
# }
#
# if (salesLineloc)
# {
# while select TaxItemGroup, TaxCode
# from taxOnItem
# where taxOnItem.TaxItemGroup == salesLineloc.TaxItemGroup
# && taxExist == false
# {
# if (taxOnItem.TaxCode == _taxCode)
# {
# taxExist = true;
# }
# }
# }
#
# return taxExist;
#}
ENDSOURCE
SOURCE #isTaxUnrealized
#static boolean isTaxUnrealized(SalesIdBase _salesID)
#{
# SalesLine salesLineloc;
# TaxGroupData taxGroupData;
# boolean taxUnrealized = false;
# ;
#
# while select TaxGroup, SalesId
# from salesLineloc
# where salesLineloc.SalesId == _salesID
# {
# while select firstonly TaxCode, TaxGroup
# from taxGroupData
# where taxGroupData.TaxGroup == salesLineloc.TaxGroup
# && taxUnrealized == false
# {
# if (TaxTable::find(taxGroupData.TaxCode).UnrealizedTax == true)
# {
# taxUnrealized = true;
# }
# }
# }
#
# return taxUnrealized;
#}
#
#
#
ENDSOURCE
SOURCE #lastLineNum
#static LineNum lastLineNum(SalesId salesId)
#{
# return (select maxof(LineNum) from salesLine
# index hint SalesLineIdx
# where salesLine.SalesId == salesId).LineNum;
#}
ENDSOURCE
SOURCE #lowestSalesStatus
#static SalesStatus lowestSalesStatus(SalesId salesId)
#{
# SalesLine salesLine;
# ;
#
# select minof(SalesStatus) from salesLine
# where salesLine.SalesId == salesId &&
# salesLine.SalesStatus > SalesStatus::None;
#
# if (salesLine)
# return salesLine.SalesStatus;
#
# return SalesStatus::Backorder;
#}
ENDSOURCE
SOURCE #modifySalesqty
#server static void modifySalesQty(SalesLine _salesLine,
# InventDim _inventDim)
#{
# SalesReceiptDateRequested receiptDateRequestedOrig = _salesLine.ReceiptDateRequested;
# SalesReceiptDateConfirmed receiptDateConfirmedOrig = _salesLine.ReceiptDateConfirmed;
# SalesShippingDateRequested shippingDateRequestedOrig = _salesLine.ShippingDateRequested;
# SalesShippingDateConfirmed shippingDateConfirmedOrig = _salesLine.ShippingDateConfirmed;
# ;
# if (!_salesLine.interCompanyIsBeingUpdated())
# {
# InventMovement::setMinMaxQty(_salesLine);
#
# _salesLine.SalesPurchLine::resetPriceAgreement();
# _salesLine.initSalesQty();
# _salesLine.setPriceDisc(_inventDim);
# _salesLine.calcPackingUnitQty(_inventDim);
#
# InventMovement::bufferSetTransQtyUnit(_salesLine);
#
# _salesLine.setInventDeliverNow();
#
# if (_salesLine.ReceiptDateRequested != receiptDateRequestedOrig ||
# _salesLine.ReceiptDateConfirmed != receiptDateConfirmedOrig ||
# _salesLine.ShippingDateRequested != shippingDateRequestedOrig ||
# _salesLine.ShippingDateConfirmed != shippingDateConfirmedOrig)
# {
# if (Box::yesNo("@SYS88260",DialogButton::Yes) == DialogButton::No)
# {
# _salesLine.ReceiptDateRequested = receiptDateRequestedOrig;
# _salesLine.ReceiptDateConfirmed = receiptDateConfirmedOrig;
# _salesLine.ShippingDateRequested = shippingDateRequestedOrig;
# _salesLine.ShippingDateConfirmed = shippingDateConfirmedOrig;
# }
# }
# }
# else
# {
# _salesLine.SalesQty = _salesLine.orig().SalesQty;
# }
#}
ENDSOURCE
SOURCE #remainReturnLotQtyAllCreditNote
#static SalesOrderedQty remainReturnLotQtyAllCreditNote(InventTransId _inventTransId, ItemId _itemId)
#{
# SalesLine salesLine;
# InventTrans inventTransSales, inventTransReturn;
# SalesQty retQty;
# Set recIdSet = new Set(Types::Int64);
# ;
#
# // Finds CreditNotes lines with no inventory transactions - meaning the scrap flag is set.
# while select salesLine where (salesLine.SalesType == SalesType::ReturnItem ||
# (salesLine.SalesType == SalesType::Sales && salesLine.SalesQty < 0)) &&
# salesLine.InventTransIdReturn == _inventTransId
# notexists join inventTransSales where inventTransSales.InventTransId == salesLine.InventTransId &&
# inventTransSales.InventTransIdReturn == _inventTransId
# {
# retQty += salesLine.SalesQty ? abs(salesLine.calcQtyOrdered(salesLine.SalesQty)) : 0 ;
# retQty += salesLine.ExpectedRetQty ? abs(salesLine.calcQtyOrdered(salesLine.ExpectedRetQty)) : 0;
# }
#
#
# //InventTrans related to both CreditNotes and ReturnOrders (with and without salesLines).
# while select InventTransId from inventTransSales
# where inventTransSales.InventTransId == _inventTransId &&
# inventTransSales.InventTransIdReturn
# join Qty, RecId from inventTransReturn
# where inventTransReturn.InventTransId == inventTransSales.InventTransIdReturn &&
# inventTransReturn.Qty > 0
# {
# if (!recIdSet.in(inventTransReturn.RecId))
# {
# recIdSet.add(inventTransReturn.RecId);
# retQty += abs(inventTransReturn.Qty);
# }
# }
#
# return retQty;
#}
ENDSOURCE
SOURCE #splitReturnLine
#///
#/// Splits a return order line into two return order lines. .
#///
#///
#/// Inventory transaction Id that identifies original return order line.
#///
#///
#/// Quantity for a new return order line. Original line is updated with a difference, so that quantity on original return order line is split between original and a new return order line.
#///
#///
#/// Inventory transaction Id for a new return order line.
#///
#///
#/// Split can be done on return order line only. The quantity for Returned item must be negative. Split quantity should be negaive as well. Total qty on both lines, original and a new one, cannot exceed qty on original return line before split.
#///
#///
#/// The specified Sales Order line, referenced by inventory transaction Id, could not be found. The operation is aborted.
#///
#///
#/// The specified Sales Order could not be found. The operation is aborted.
#///
#///
#/// The specified Sale order is not of type Return order. The operation is aborted.
#///
#///
#/// An update conflict exception occurred and the action was not registered. Try to register the action again.
#///
#///
#/// Update conflicts occurred.
#///
#public static InventTransId splitReturnLine(InventTransId _inventTransId, SalesQty _newQtyOrdered)
#{
# #OCCRetryCount
#
# SalesTable salesTable;
# SalesLine origLine, origLineUpdate, newLine;
# SalesQty newExpectedRetQty;
# InventTable inventTable;
#
# boolean checkReturnQty(SalesQty _qty, SalesQty _origQty)
# {
# boolean ret = true;
# ;
#
# if( _qty >= 0)
# {
# // The quantity for Returned item must be negative.
# ret = checkFailed("@SYS98119");
# }
#
# if(abs(_qty) >= abs(_origQty))
# {
# // Return qty %1 cannot be exceeded.
# ret = checkFailed(strfmt("@SYS116394",_origQty));
# }
#
# return ret;
# }
#
# ;
#
# try
# {
# if (_inventTransId)
# {
# origLine = SalesLine::findInventTransId(_inventTransId);
# }
#
# if (!origLine)
# {
# //The specified Sales Order line could not be found. The operation is aborted.
# throw error("@SYS115232");
# }
#
# salesTable = SalesTable::find(origLine.SalesId);
#
# if (!salesTable)
# {
# //The specified Sales order could not be found. The operation is aborted.
# throw error("@SYS115230");
# }
#
# if (salesTable.returnJournal())
# {
# if(checkReturnQty(_newQtyOrdered, origLine.QtyOrdered))
# {
# inventTable = InventTable::find(origLine.ItemId);
# newExpectedRetQty = UnitConvert::qty(_newQtyOrdered,
# inventTable.inventUnitId(),
# origLine.SalesUnit,
# origLine.ItemId);
#
# ttsbegin;
# // create a new return line
# newLine.clear();
# newLine.initFromSalesTable(salesTable);
# newLine.initFromSalesLine(origLine,true,true);
# newLine.InventTransIdReturn = origLine.InventTransIdReturn;
# newLine.ReturnStatus = origLine.ReturnStatus;
# newLine.ExpectedRetQty = newExpectedRetQty;
# newLine.SalesQty = 0;
# newLine.QtyOrdered = 0;
# newLine.LineAmount = newLine.returnLineAmount();
# newLine.modifiedField(fieldnum(SalesLine,ExpectedRetQty));
# newLine.createLine(NoYes::No, // Validate
# NoYes::No, // initFromSalesTable
# NoYes::No, // initFromInventTable
# NoYes::No, // calcInventQty
# NoYes::Yes, // searchMarkup
# NoYes::No // searchPrice
# );
#
# // update an original splitted line
# origLineUpdate = SalesLine::findInventTransId(origLine.InventTransId,true);
#
# origLineUpdate.ExpectedRetQty -= newLine.ExpectedRetQty;
# origLineUpdate.modifiedField(fieldnum(SalesLine,ExpectedRetQty));
#
# origLineUpdate.SalesQty = origLineUpdate.ExpectedRetQty;
# origLineUpdate.QtyOrdered = origLineUpdate.QtyOrdered -_newQtyOrdered;
# origLineUpdate.RemainSalesPhysical = origLineUpdate.SalesQty;
# origLineUpdate.RemainInventPhysical = origLineUpdate.QtyOrdered;
# origLineUpdate.LineAmount = origLineUpdate.returnLineAmount();
# origLineUpdate.update();
# ttscommit;
#
# }
# }
# else
# {
# //The specified Sales order is not of type Return order. The operation is aborted.
# throw error("@SYS115231" );
# }
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
# return newLine.InventTransId;
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : CustBankAccount unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #CustBankAccount
Id 50
PROPERTIES
Name #CustBankAccount
Label #@SYS24208
FormRef #CustBankAccounts
TitleField1 #AccountID
TitleField2 #Name
ConfigurationKey #LedgerBasic
SecurityKey #CustTables
AOSAuthorization #CreateReadUpdateDelete
CacheLookup #Found
TableGroup #Main
PrimaryIndex #AccountIdx
ClusterIndex #AccountIdx
DeveloperDocumentation #@SYS127230
ENDPROPERTIES
FIELDS
FIELD #AccountID
Id 1
STRING
PROPERTIES
Name #AccountID
Mandatory #Yes
AllowEdit #No
Table #CustBankAccount
ExtendedDataType
ARRAY
#CustBankAccountId
#
ENDARRAY
ENDPROPERTIES
FIELD #CustDomNumber_BE
Id 2
STRING
PROPERTIES
Name #CustDomNumber_BE
Table #CustBankAccount
ExtendedDataType
ARRAY
#CustDomNumber_BE
#
ENDARRAY
StringSize #15
ENDPROPERTIES
FIELD #Name
Id 3
STRING
PROPERTIES
Name #Name
HelpText #@SYS24871
Table #CustBankAccount
ExtendedDataType
ARRAY
#Name
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #Address
Id 4
STRING
PROPERTIES
Name #Address
AllowEditOnCreate #No
AllowEdit #No
Table #CustBankAccount
ExtendedDataType
ARRAY
#Addressing
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #ZipCode
Id 5
STRING
PROPERTIES
Name #ZipCode
Table #CustBankAccount
ExtendedDataType
ARRAY
#AddressZipCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #County
Id 6
STRING
PROPERTIES
Name #County
Table #CustBankAccount
ExtendedDataType
ARRAY
#AddressCountyId
#
ENDARRAY
ENDPROPERTIES
FIELD #CountryRegionId
Id 7
STRING
PROPERTIES
Name #CountryRegionId
Table #CustBankAccount
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #AccountNum
Id 8
STRING
PROPERTIES
Name #AccountNum
Table #CustBankAccount
ExtendedDataType
ARRAY
#BankAccount
#
ENDARRAY
StringSize #34
ENDPROPERTIES
FIELD #BankCIN
Id 9
STRING
PROPERTIES
Name #BankCIN
Table #CustBankAccount
ExtendedDataType
ARRAY
#BankCIN
#
ENDARRAY
StringSize #1
ENDPROPERTIES
FIELD #BankAccountType
Id 10
ENUM
PROPERTIES
Name #BankAccountType
Table #CustBankAccount
EnumType #BankAccountType
ENDPROPERTIES
FIELD #RegistrationNum
Id 15
STRING
PROPERTIES
Name #RegistrationNum
Table #CustBankAccount
ExtendedDataType
ARRAY
#BankRegNum
#
ENDARRAY
ENDPROPERTIES
FIELD #Phone
Id 16
STRING
PROPERTIES
Name #Phone
HelpText #@SYS24869
Table #CustBankAccount
ExtendedDataType
ARRAY
#Phone
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #TeleFax
Id 17
STRING
PROPERTIES
Name #TeleFax
HelpText #@SYS24866
Table #CustBankAccount
ExtendedDataType
ARRAY
#TeleFax
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ContactPerson
Id 18
STRING
PROPERTIES
Name #ContactPerson
HelpText #@SYS13368
Table #CustBankAccount
ExtendedDataType
ARRAY
#PersonName
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #Email
Id 19
STRING
PROPERTIES
Name #Email
Table #CustBankAccount
ExtendedDataType
ARRAY
#Email
#
ENDARRAY
StringSize #80
ENDPROPERTIES
FIELD #State
Id 20
STRING
PROPERTIES
Name #State
Table #CustBankAccount
ExtendedDataType
ARRAY
#AddressStateId
#
ENDARRAY
ENDPROPERTIES
FIELD #URL
Id 21
STRING
PROPERTIES
Name #URL
Table #CustBankAccount
ExtendedDataType
ARRAY
#URL
#
ENDARRAY
StringSize #255
ENDPROPERTIES
FIELD #Telex
Id 22
STRING
PROPERTIES
Name #Telex
Table #CustBankAccount
ExtendedDataType
ARRAY
#Telex
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CellularPhone
Id 23
STRING
PROPERTIES
Name #CellularPhone
Table #CustBankAccount
ExtendedDataType
ARRAY
#PhoneMobile
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PhoneLocal
Id 24
STRING
PROPERTIES
Name #PhoneLocal
Table #CustBankAccount
ExtendedDataType
ARRAY
#PhoneLocal
#
ENDARRAY
ENDPROPERTIES
FIELD #CustAccount
Id 25
STRING
PROPERTIES
Name #CustAccount
Mandatory #Yes
AllowEdit #No
Table #CustBankAccount
ExtendedDataType
ARRAY
#CustAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #BankAccountValidationMethod
Id 26
ENUM
PROPERTIES
Name #BankAccountValidationMethod
Table #CustBankAccount
EnumType #BankAccountValidationMethod
ENDPROPERTIES
FIELD #BankGroupId
Id 29
STRING
PROPERTIES
Name #BankGroupId
Table #CustBankAccount
ExtendedDataType
ARRAY
#BankGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #CustPaymentTextCode
Id 30
STRING
PROPERTIES
Name #CustPaymentTextCode
Table #CustBankAccount
ExtendedDataType
ARRAY
#CustPaymTextCode
#
ENDARRAY
ENDPROPERTIES
FIELD #SWIFTNo
Id 32
STRING
PROPERTIES
Name #SWIFTNo
Table #CustBankAccount
ExtendedDataType
ARRAY
#SWIFTNo
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #MsgToBank
Id 33
STRING
PROPERTIES
Name #MsgToBank
Table #CustBankAccount
ExtendedDataType
ARRAY
#BankMsgToBank
#
ENDARRAY
StringSize #255
ENDPROPERTIES
FIELD #ExchRate
Id 34
REAL
PROPERTIES
Name #ExchRate
Table #CustBankAccount
ExtendedDataType
ARRAY
#CrossExchRate
#
ENDARRAY
ENDPROPERTIES
FIELD #ExchRateRef
Id 35
STRING
PROPERTIES
Name #ExchRateRef
Table #CustBankAccount
ExtendedDataType
ARRAY
#ExchRateRef
#
ENDARRAY
StringSize #11
ENDPROPERTIES
FIELD #City
Id 36
STRING
PROPERTIES
Name #City
Table #CustBankAccount
ExtendedDataType
ARRAY
#AddressCity
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #Street
Id 37
STRING
PROPERTIES
Name #Street
Table #CustBankAccount
ExtendedDataType
ARRAY
#AddressStreet
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #BankContractAccount
Id 38
STRING
PROPERTIES
Name #BankContractAccount
Table #CustBankAccount
ExtendedDataType
ARRAY
#GiroContractAccount
#
ENDARRAY
StringSize #11
ENDPROPERTIES
FIELD #Pager
Id 39
STRING
PROPERTIES
Name #Pager
Table #CustBankAccount
ExtendedDataType
ARRAY
#Pager
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SMS
Id 40
STRING
PROPERTIES
Name #SMS
Table #CustBankAccount
ExtendedDataType
ARRAY
#SMS
#
ENDARRAY
StringSize #80
ENDPROPERTIES
FIELD #DEL_RefZipCode
Id 42
INT64
PROPERTIES
Name #DEL_RefZipCode
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #SysDeletedObjects40
Table #CustBankAccount
ExtendedDataType
ARRAY
#RefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #BankCodeType
Id 43
ENUM
PROPERTIES
Name #BankCodeType
Table #CustBankAccount
EnumType #BankCodeType
ENDPROPERTIES
FIELD #BankIBAN
Id 44
STRING
PROPERTIES
Name #BankIBAN
Table #CustBankAccount
ExtendedDataType
ARRAY
#BankIBAN
#
ENDARRAY
StringSize #34
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#AccountID
#Name
#Address
#RegistrationNum
#AccountNum
#ContactPerson
ENDGROUPFIELDS
ENDGROUP
GROUP #Address
PROPERTIES
Name #Address
Label #@SYS9362
ENDPROPERTIES
GROUPFIELDS
#Street
#ZipCode
#City
#County
#State
#CountryRegionId
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressDisplay
PROPERTIES
Name #AddressDisplay
Label #@SYS9362
ENDPROPERTIES
GROUPFIELDS
#Address
ENDGROUPFIELDS
ENDGROUP
GROUP #Administration
PROPERTIES
Name #Administration
Label #@SYS9853
ENDPROPERTIES
GROUPFIELDS
#BankGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #ContactInfo
PROPERTIES
Name #ContactInfo
Label #@SYS21663
ENDPROPERTIES
GROUPFIELDS
#ContactPerson
#Phone
#PhoneLocal
#CellularPhone
#Pager
#TeleFax
#Email
#SMS
#URL
#Telex
ENDGROUPFIELDS
ENDGROUP
GROUP #Description
PROPERTIES
Name #Description
Label #@SYS7576
ENDPROPERTIES
GROUPFIELDS
#Name
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#AccountID
#CustAccount
#BankCodeType
#RegistrationNum
#AccountNum
#BankCIN
#SWIFTNo
#BankIBAN
#CustDomNumber_BE
#BankAccountType
ENDGROUPFIELDS
ENDGROUP
GROUP #Overview
PROPERTIES
Name #Overview
Label #@SYS9039
ENDPROPERTIES
GROUPFIELDS
#AccountID
#Name
#BankGroupId
#RegistrationNum
#AccountNum
#BankCIN
#BankAccountValidationMethod
#BankContractAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #Payment
PROPERTIES
Name #Payment
Label #@SYS828
ENDPROPERTIES
GROUPFIELDS
#CustPaymentTextCode
#MsgToBank
#ExchRateRef
#ExchRate
ENDGROUPFIELDS
ENDGROUP
GROUP #PaymentShow
PROPERTIES
Name #PaymentShow
Label #@SYS828
ENDPROPERTIES
GROUPFIELDS
#CustPaymentTextCode
#MsgToBank
#ExchRateRef
#editExchRate
ENDGROUPFIELDS
ENDGROUP
GROUP #Setup
PROPERTIES
Name #Setup
Label #@SYS2186
ENDPROPERTIES
GROUPFIELDS
#BankAccountValidationMethod
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#AccountIdx
Id 1
PROPERTIES
Name #AccountIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#CustAccount
#AccountID
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #AddressCounty
PROPERTIES
Name #AddressCounty
Table #AddressCounty
EntityRelationshipRole #@SYS127231
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #CountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #State
RelatedField #StateId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #County
RelatedField #CountyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #AddressState
PROPERTIES
Name #AddressState
Table #AddressState
EntityRelationshipRole #@SYS127232
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #CountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #State
RelatedField #StateId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CustBankAccount
PROPERTIES
Name #CustBankAccount
Table #CustBankAccount
Validate #No
EntityRelationshipRole #@SYS123434
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountID
RelatedField #AccountID
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #CustAccount
RelatedField #CustAccount
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #bankAccountValidation
#Bank bankAccountValidation()
#{
# return this.BankAccountMap::bankAccountValidation();
#}
ENDSOURCE
SOURCE #editExchRate
#//BP Deviation Documented
#public edit CrossExchRate editExchRate(boolean set, CrossExchRate _exchRate)
#{
# if (set)
# {
# this.ExchRate = ExchRates::setExchRate(_exchRate);
# }
# else
# {
# _exchRate = ExchRates::displayExchRate(this.ExchRate);
# }
#
# return _exchRate;
#}
ENDSOURCE
SOURCE #initFromBankGroup
#void initFromBankGroup(BankGroup _bankGroup)
#{
# ;
# this.BankAccountMap::initFromBankGroup(_bankGroup);
#}
ENDSOURCE
SOURCE #initValue
#void initValue()
#{
# super();
#
# this.BankAccountMap::initValue();
#}
ENDSOURCE
SOURCE #modifiedField
#//CarlosGranados
#public void modifiedField(fieldId _fieldId)
#{
#
# CustTable custTable;
# ;
# super(_fieldId);
#
# this.BankAccountMap::modifiedField(_fieldId);
#
# switch (_fieldId) {
#
# case fieldnum(CustBankAccount,AccountNum) :
# ttsbegin;
# custTable = CustTable::find(this.CustAccount,true);
# custTable.CGranCustBankAccount = this.AccountNum;
# custTable.doUpdate();
#
# ttscommit;
#
# }
#}
ENDSOURCE
SOURCE #validateField
#public boolean validateField(fieldId _fieldId)
#{
# boolean ret;
# ;
#
# if(!this.AddressMap::validatePostalCode(_fieldId))
# {
# return false;
# }
# ret = super(_fieldId);
# if (ret)
# {
# switch (_fieldId)
# {
# case (fieldnum(CustBankAccount, BankIBAN)) :
# if (Bank::validateIBAN(this.BankIBAN))
# {
# this.BankIBAN = strupr(this.BankIBAN);
# ret = true;
# }
# else
# {
# ret = false;
# }
# break;
# }
# }
# return ret;
#}
ENDSOURCE
SOURCE #validateWrite
#public boolean validateWrite()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = this.BankAccountMap::validateWrite();
# }
#
# ret = ret && Bank_BE::checkDom(this.CustDomNumber_BE);
#
# return ret;
#}
ENDSOURCE
SOURCE #checkBankAccountReference
#static boolean checkBankAccountReference(CustAccount _custAccount,
# CustBankAccountId _custBankAccountId,
# CompanyId _company = curext())
#{
# CompanyId companyId;
# ;
#
# if (_custBankAccountId)
# {
# if (!_company)
# {
# companyId = curext();
# }
# else
# {
# companyId = _company;
#
# if (! xDataArea::exist(companyId))
# {
# return checkFailed(strfmt("@SYS10666", companyId));
# }
# }
#
# changecompany(companyId)
# {
# if (!CustBankAccount::find(_custAccount, _custBankAccountId))
# {
# return checkFailed(strfmt("@SYS27061", _custBankAccountId));
# }
# }
# }
# return true;
#}
ENDSOURCE
SOURCE #checkExist
#public static boolean checkExist(CustAccount _custAccount, CustBankAccountId _custBankAccountId )
#{
# boolean ret = true;
# ;
#
# if (!CustBankAccount::exist(_custAccount, _custBankAccountId))
# {
# ret = checkFailed(strfmt(CustBankAccount::txtNotExist(), _custAccount, _custBankAccountId));
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #exist
#public static boolean exist(CustAccount _custAccount, CustBankAccountId _custBankAccountId )
#{
# boolean found;
# ;
#
# found = (select firstonly
# RecId
# from
# custBankAccount
# where
# custBankAccount.CustAccount == _custAccount &&
# custBankAccount.AccountID == _custBankAccountId).RecId != 0;
#
# return found;
#}
ENDSOURCE
SOURCE #find
#public static CustBankAccount find(
# CustAccount _custAccount,
# CustBankAccountId _custBankAccountId ,
# boolean _forupdate = false,
# ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
#{
# CustBankAccount custBankAccount;
# ;
#
# custBankAccount.selectForUpdate(_forupdate);
# if (_forupdate && _concurrencyModel != ConcurrencyModel::Auto)
# {
# custBankAccount.concurrencyModel(_concurrencyModel);
# }
#
# select firstonly
# custBankAccount
# where
# custBankAccount.CustAccount == _custAccount &&
# custBankAccount.AccountID == _custBankAccountId;
#
# return custBankAccount;
#}
ENDSOURCE
SOURCE #findByCompany
#///
#/// Finds a CustBankAccount record within the given company.
#///
#///
#/// The company in which to look for the record.
#///
#///
#/// The customer account ID.
#///
#///
#/// The bank account ID.
#///
#///
#/// Determines if the returned CustBankAccount record is selected for update.
#///
#///
#/// The concurrency model to use.
#///
#///
#/// Returns the VendBankAccount record if found.
#///
#
#public static CustBankAccount findByCompany(
# CompanyId _companyId,
# CustAccount _custAccount,
# CustBankAccountId _custBankAccountId ,
# boolean _forupdate = false,
# ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
#{
# CustBankAccount custBankAccount;
# ;
#
# changecompany (_companyId)
# {
# custBankAccount = CustBankAccount::find(_custAccount, _custBankAccountId, _forupdate, _concurrencyModel);
# }
#
#
# return custBankAccount;
#}
ENDSOURCE
SOURCE #lookupBankAccount
#client static void lookupBankAccount(FormStringControl _ctrl,
# CustAccount _custAccount,
# CompanyId _company = curext())
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(CustBankAccount), _ctrl);
# Query query = new Query();
# QueryBuildDataSource qbds;
# CompanyId companyId;
# ;
#
# if (!_company)
# {
# companyId = curext();
# }
# else
# {
# companyId = _company;
#
# if (! xDataArea::exist(companyId))
# {
# throw error(strfmt("@SYS10666", companyId));
# }
# }
#
# changecompany(companyId)
# {
# sysTableLookup.addLookupfield(fieldnum(CustBankAccount, CustAccount));
# sysTableLookup.addLookupfield(fieldnum(CustBankAccount, AccountID), true);
# sysTableLookup.addLookupfield(fieldnum(CustBankAccount, Name));
#
# qbds = query.addDataSource(tablenum(CustBankAccount));
# qbds.addRange(fieldnum(CustBankAccount, CustAccount)).value(queryValue(_custAccount));
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
# }
#}
ENDSOURCE
SOURCE #txtNotExist
#static TxtNotExist txtNotExist()
#{
# return "@SYS9779";
#}
#
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : SalesTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #SalesTable
Id 366
PROPERTIES
Name #SalesTable
Label #@SYS25193
SearchLinkRefName #EPSalesTableInfo
TitleField1 #SalesId
TitleField2 #SalesName
ConfigurationKey #LogisticsBasic
SecurityKey #CustTables
CacheLookup #NotInTTS
CreateRecIdIndex #Yes
TableGroup #WorksheetHeader
PrimaryIndex #SalesIdx
ClusterIndex #SalesIdx
AnalysisVisibility #High
ModifiedBy #Yes
CreatedDateTime #Yes
CreatedBy #Yes
DeveloperDocumentation #@SYS124484
ENDPROPERTIES
FIELDS
FIELD #SalesId
Id 1
STRING
PROPERTIES
Name #SalesId
Mandatory #Yes
AllowEdit #No
Table #SalesTable
ExtendedDataType
ARRAY
#SalesIdBase
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SalesName
Id 2
STRING
PROPERTIES
Name #SalesName
Table #SalesTable
ExtendedDataType
ARRAY
#SalesName
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #Reservation
Id 3
ENUM
PROPERTIES
Name #Reservation
Table #SalesTable
EnumType #ItemReservation
ENDPROPERTIES
FIELD #CustAccount
Id 4
STRING
PROPERTIES
Name #CustAccount
HelpText #@SYS15261
Mandatory #Yes
Table #SalesTable
ExtendedDataType
ARRAY
#CustAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InvoiceAccount
Id 5
STRING
PROPERTIES
Name #InvoiceAccount
HelpText #@SYS518
Mandatory #Yes
Table #SalesTable
ExtendedDataType
ARRAY
#CustInvoiceAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DeliveryDate
Id 6
DATE
PROPERTIES
Name #DeliveryDate
Table #SalesTable
ExtendedDataType
ARRAY
#SalesShippingDate
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryAddress
Id 7
STRING
PROPERTIES
Name #DeliveryAddress
Label #@SYS7924
HelpText #@SYS27762
AllowEditOnCreate #No
AllowEdit #No
Table #SalesTable
ExtendedDataType
ARRAY
#Addressing
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #URL
Id 8
STRING
PROPERTIES
Name #URL
Table #SalesTable
ExtendedDataType
ARRAY
#URL
#
ENDARRAY
StringSize #255
ENDPROPERTIES
FIELD #PurchOrderFormNum
Id 9
STRING
PROPERTIES
Name #PurchOrderFormNum
Table #SalesTable
ExtendedDataType
ARRAY
#CustPurchaseOrder
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SalesTaker
Id 10
STRING
PROPERTIES
Name #SalesTaker
Label #@SYS4466
HelpText #@SYS2451
Table #SalesTable
ExtendedDataType
ARRAY
#EmplId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SalesGroup
Id 11
STRING
PROPERTIES
Name #SalesGroup
Table #SalesTable
ExtendedDataType
ARRAY
#CommissSalesGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #FreightSlipType
Id 12
ENUM
PROPERTIES
Name #FreightSlipType
Table #SalesTable
ExtendedDataType
ARRAY
#CustFreightSlipType
#
ENDARRAY
EnumType #FreightSlipType
ENDPROPERTIES
FIELD #DocumentStatus
Id 13
ENUM
PROPERTIES
Name #DocumentStatus
AllowEditOnCreate #No
AllowEdit #No
Table #SalesTable
EnumType #DocumentStatus
ENDPROPERTIES
FIELD #InterCompanyOriginalSalesId
Id 14
STRING
PROPERTIES
Name #InterCompanyOriginalSalesId
Table #SalesTable
ExtendedDataType
ARRAY
#InterCompanyOriginalSalesId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CurrencyCode
Id 15
STRING
PROPERTIES
Name #CurrencyCode
HelpText #@SYS15068
Mandatory #Yes
Table #SalesTable
ExtendedDataType
ARRAY
#CustCurrencyCode
#
ENDARRAY
StringSize #3
ENDPROPERTIES
FIELD #Payment
Id 16
STRING
PROPERTIES
Name #Payment
Label #@SYS828
HelpText #@SYS8004
Table #SalesTable
ExtendedDataType
ARRAY
#CustPaymTermId
#
ENDARRAY
ENDPROPERTIES
FIELD #CashDisc
Id 17
STRING
PROPERTIES
Name #CashDisc
HelpText #@SYS851
Table #SalesTable
ExtendedDataType
ARRAY
#CustCashDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxGroup
Id 18
STRING
PROPERTIES
Name #TaxGroup
Table #SalesTable
ExtendedDataType
ARRAY
#TaxGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #LineDisc
Id 19
STRING
PROPERTIES
Name #LineDisc
HelpText #@SYS7237
Table #SalesTable
ExtendedDataType
ARRAY
#CustLineDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #CustGroup
Id 20
STRING
PROPERTIES
Name #CustGroup
HelpText #@SYS16729
Mandatory #Yes
Table #SalesTable
ExtendedDataType
ARRAY
#CustGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #DiscPercent
Id 21
REAL
PROPERTIES
Name #DiscPercent
Table #SalesTable
ExtendedDataType
ARRAY
#SalesEndDiscPct
#
ENDARRAY
ENDPROPERTIES
FIELD #InterCompanyOriginalCustAccount
Id 22
STRING
PROPERTIES
Name #InterCompanyOriginalCustAccount
Table #SalesTable
ExtendedDataType
ARRAY
#InterCompanyOriginalCustAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Dimension
Id 23
STRING
PROPERTIES
Name #Dimension
Table #SalesTable
ExtendedDataType
ARRAY
#Dimension
#
ENDARRAY
ENDPROPERTIES
FIELD #PriceGroupId
Id 24
STRING
PROPERTIES
Name #PriceGroupId
Table #SalesTable
ExtendedDataType
ARRAY
#CustPriceGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #MultiLineDisc
Id 25
STRING
PROPERTIES
Name #MultiLineDisc
Table #SalesTable
ExtendedDataType
ARRAY
#CustMultiLineDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #EndDisc
Id 26
STRING
PROPERTIES
Name #EndDisc
Table #SalesTable
ExtendedDataType
ARRAY
#CustEndDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #CustomerRef
Id 27
STRING
PROPERTIES
Name #CustomerRef
Table #SalesTable
ExtendedDataType
ARRAY
#CustRef
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #CountyOrigDest
Id 28
STRING
PROPERTIES
Name #CountyOrigDest
Table #SalesTable
AnalysisVisibility #Low
ExtendedDataType
ARRAY
#AddressCountyOrigDest
#
ENDARRAY
ENDPROPERTIES
FIELD #Listcode
Id 29
ENUM
PROPERTIES
Name #Listcode
Table #SalesTable
ExtendedDataType
ARRAY
#ListcodeId
#
ENDARRAY
EnumType #Listcode
ENDPROPERTIES
FIELD #DlvTerm
Id 30
STRING
PROPERTIES
Name #DlvTerm
HelpText #@SYS2036
Table #SalesTable
ExtendedDataType
ARRAY
#CustDlvTermId
#
ENDARRAY
ENDPROPERTIES
FIELD #DlvMode
Id 31
STRING
PROPERTIES
Name #DlvMode
HelpText #@SYS1529
Table #SalesTable
ExtendedDataType
ARRAY
#CustDlvModeId
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchId
Id 32
STRING
PROPERTIES
Name #PurchId
HelpText #@SYS10442
Table #SalesTable
ExtendedDataType
ARRAY
#PurchId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SalesStatus
Id 33
ENUM
PROPERTIES
Name #SalesStatus
AllowEditOnCreate #No
AllowEdit #No
Table #SalesTable
EnumType #SalesStatus
ENDPROPERTIES
FIELD #MarkupGroup
Id 34
STRING
PROPERTIES
Name #MarkupGroup
HelpText #@SYS5822
Table #SalesTable
ExtendedDataType
ARRAY
#CustMarkupGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #SalesType
Id 35
ENUM
PROPERTIES
Name #SalesType
Table #SalesTable
EnumType #SalesType
ENDPROPERTIES
FIELD #SalesPoolId
Id 36
STRING
PROPERTIES
Name #SalesPoolId
Table #SalesTable
ExtendedDataType
ARRAY
#SalesPoolId
#
ENDARRAY
ENDPROPERTIES
FIELD #PostingProfile
Id 37
STRING
PROPERTIES
Name #PostingProfile
Table #SalesTable
ExtendedDataType
ARRAY
#CustPostingProfile
#
ENDARRAY
ENDPROPERTIES
FIELD #TransactionCode
Id 38
STRING
PROPERTIES
Name #TransactionCode
Table #SalesTable
ExtendedDataType
ARRAY
#IntrastatTransactionCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #InterCompanyAutoCreateOrders
Id 39
ENUM
PROPERTIES
Name #InterCompanyAutoCreateOrders
Table #SalesTable
ExtendedDataType
ARRAY
#InterCompanyAutoCreateOrders
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #InterCompanyDirectDelivery
Id 40
ENUM
PROPERTIES
Name #InterCompanyDirectDelivery
Table #SalesTable
ExtendedDataType
ARRAY
#InterCompanyDirectDelivery
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #InterCompanyDirectDeliveryOrig
Id 41
ENUM
PROPERTIES
Name #InterCompanyDirectDeliveryOrig
Table #SalesTable
ExtendedDataType
ARRAY
#InterCompanyDirectDelivery
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #DeliveryZipCode
Id 42
STRING
PROPERTIES
Name #DeliveryZipCode
HelpText #@SYS17884
Table #SalesTable
ExtendedDataType
ARRAY
#AddressZipCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryCounty
Id 43
STRING
PROPERTIES
Name #DeliveryCounty
HelpText #@SYS17885
Table #SalesTable
ExtendedDataType
ARRAY
#AddressCountyId
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryCountryRegionId
Id 44
STRING
PROPERTIES
Name #DeliveryCountryRegionId
HelpText #@SYS17886
Table #SalesTable
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #SettleVoucher
Id 45
ENUM
PROPERTIES
Name #SettleVoucher
Table #SalesTable
ExtendedDataType
ARRAY
#SalesSettlementType
#
ENDARRAY
EnumType #SettlementType
ENDPROPERTIES
FIELD #DeliveryState
Id 46
STRING
PROPERTIES
Name #DeliveryState
Table #SalesTable
ExtendedDataType
ARRAY
#AddressStateId
#
ENDARRAY
ENDPROPERTIES
FIELD #EnterpriseNumber
Id 47
STRING
PROPERTIES
Name #EnterpriseNumber
Table #SalesTable
ExtendedDataType
ARRAY
#TaxEnterpriseNumber
#
ENDARRAY
StringSize #50
ENDPROPERTIES
FIELD #InterCompanyAllowIndirectCreation
Id 48
ENUM
PROPERTIES
Name #InterCompanyAllowIndirectCreation
AllowEditOnCreate #No
AllowEdit #No
Table #SalesTable
ExtendedDataType
ARRAY
#InterCompanyAllowIndirectCreation
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #InterCompanyAllowIndirectCreationOrig
Id 49
ENUM
PROPERTIES
Name #InterCompanyAllowIndirectCreationOrig
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #SalesTable
ExtendedDataType
ARRAY
#InterCompanyAllowIndirectCreation
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #DeliveryName
Id 50
STRING
PROPERTIES
Name #DeliveryName
Label #@SYS22058
HelpText #@SYS17217
GroupPrompt #@SYS7399
Table #SalesTable
ExtendedDataType
ARRAY
#CustName
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #OneTimeCustomer
Id 51
ENUM
PROPERTIES
Name #OneTimeCustomer
Table #SalesTable
ExtendedDataType
ARRAY
#OneTimeCustomer
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #CovStatus
Id 52
INT
PROPERTIES
Name #CovStatus
Table #SalesTable
ExtendedDataType
ARRAY
#CovStatus
#
ENDARRAY
ENDPROPERTIES
FIELD #CommissionGroup
Id 53
STRING
PROPERTIES
Name #CommissionGroup
Label #@SYS11904
Table #SalesTable
ExtendedDataType
ARRAY
#CommissCustomerGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #PaymentSched
Id 54
STRING
PROPERTIES
Name #PaymentSched
Table #SalesTable
ExtendedDataType
ARRAY
#PaymSchedId
#
ENDARRAY
StringSize #30
ENDPROPERTIES
FIELD #InterCompanyOrigin
Id 55
ENUM
PROPERTIES
Name #InterCompanyOrigin
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #SalesTable
EnumType #InterCompanyOrigin
ENDPROPERTIES
FIELD #Email
Id 56
STRING
PROPERTIES
Name #Email
Table #SalesTable
ExtendedDataType
ARRAY
#Email
#
ENDARRAY
StringSize #80
ENDPROPERTIES
FIELD #FreightZone
Id 57
STRING
PROPERTIES
Name #FreightZone
Table #SalesTable
ExtendedDataType
ARRAY
#CustFreightZoneId
#
ENDARRAY
ENDPROPERTIES
FIELD #ReturnItemNum
Id 58
STRING
PROPERTIES
Name #ReturnItemNum
Table #SalesTable
ExtendedDataType
ARRAY
#SalesReturnItemNum
#
ENDARRAY
ENDPROPERTIES
FIELD #CashDiscPercent
Id 59
REAL
PROPERTIES
Name #CashDiscPercent
Table #SalesTable
ExtendedDataType
ARRAY
#DiscPct
#
ENDARRAY
ENDPROPERTIES
FIELD #ContactPersonId
Id 60
STRING
PROPERTIES
Name #ContactPersonId
HelpText #@SYS26087
Table #SalesTable
ExtendedDataType
ARRAY
#ContactPersonId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Deadline
Id 65
DATE
PROPERTIES
Name #Deadline
Table #SalesTable
ExtendedDataType
ARRAY
#SalesDeadline
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjId
Id 66
STRING
PROPERTIES
Name #ProjId
AllowEdit #No
Table #SalesTable
ExtendedDataType
ARRAY
#ProjId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventLocationId
Id 67
STRING
PROPERTIES
Name #InventLocationId
Table #SalesTable
ExtendedDataType
ARRAY
#SalesInventLocationId
#
ENDARRAY
ENDPROPERTIES
FIELD #AddressRefTableId
Id 69
INT
PROPERTIES
Name #AddressRefTableId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #SalesTable
ExtendedDataType
ARRAY
#AddressRefTableId
#
ENDARRAY
ENDPROPERTIES
FIELD #VATNum
Id 70
STRING
PROPERTIES
Name #VATNum
Table #SalesTable
ExtendedDataType
ARRAY
#VATNumJournal
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Port
Id 71
STRING
PROPERTIES
Name #Port
Table #SalesTable
ExtendedDataType
ARRAY
#IntrastatPortId
#
ENDARRAY
ENDPROPERTIES
FIELD #InclTax
Id 80
ENUM
PROPERTIES
Name #InclTax
Table #SalesTable
ExtendedDataType
ARRAY
#InclTax
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #EInvoiceLineSpec
Id 81
ENUM
PROPERTIES
Name #EInvoiceLineSpec
Table #SalesTable
ExtendedDataType
ARRAY
#EInvoiceLineSpecific
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #NumberSequenceGroup
Id 82
STRING
PROPERTIES
Name #NumberSequenceGroup
Table #SalesTable
ExtendedDataType
ARRAY
#NumberSequenceGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #FixedExchRate
Id 83
REAL
PROPERTIES
Name #FixedExchRate
Table #SalesTable
ExtendedDataType
ARRAY
#SalesFixedExchRate
#
ENDARRAY
ENDPROPERTIES
FIELD #LanguageId
Id 84
STRING
PROPERTIES
Name #LanguageId
HelpText #@SYS8305
Mandatory #Yes
Table #SalesTable
ExtendedDataType
ARRAY
#CustLanguageId
#
ENDARRAY
StringSize #7
ENDPROPERTIES
FIELD #AutoSummaryModuleType
Id 85
ENUM
PROPERTIES
Name #AutoSummaryModuleType
Label #@SYS57738
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #SalesTable
EnumType #ModuleCustSales
ENDPROPERTIES
FIELD #GiroType
Id 86
ENUM
PROPERTIES
Name #GiroType
Table #SalesTable
ExtendedDataType
ARRAY
#PaymentStubInvoiceId
#
ENDARRAY
EnumType #PaymentStub
ENDPROPERTIES
FIELD #SalesOriginId
Id 87
STRING
PROPERTIES
Name #SalesOriginId
Table #SalesTable
ExtendedDataType
ARRAY
#SalesOriginId
#
ENDARRAY
ENDPROPERTIES
FIELD #Estimate
Id 88
REAL
PROPERTIES
Name #Estimate
Table #SalesTable
ExtendedDataType
ARRAY
#SalesEstimateGross
#
ENDARRAY
ENDPROPERTIES
FIELD #Touched
Id 89
ENUM
PROPERTIES
Name #Touched
SaveContents #No
Visible #No
Table #SalesTable
ExtendedDataType
ARRAY
#TradeTouched
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Transport
Id 90
STRING
PROPERTIES
Name #Transport
Table #SalesTable
ExtendedDataType
ARRAY
#IntrastatTransport
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_PrintModuleType
Id 91
ENUM
PROPERTIES
Name #DEL_PrintModuleType
Label #@SYS54502
Visible #No
ConfigurationKey #SysDeletedObjects41
Table #SalesTable
EnumType #DEL_ModuleCustSalesParameters
ENDPROPERTIES
FIELD #PaymMode
Id 92
STRING
PROPERTIES
Name #PaymMode
Table #SalesTable
ExtendedDataType
ARRAY
#CustPaymMode
#
ENDARRAY
ENDPROPERTIES
FIELD #PaymSpec
Id 93
STRING
PROPERTIES
Name #PaymSpec
Table #SalesTable
ExtendedDataType
ARRAY
#CustPaymSpec
#
ENDARRAY
ENDPROPERTIES
FIELD #FixedDueDate
Id 94
DATE
PROPERTIES
Name #FixedDueDate
Table #SalesTable
ExtendedDataType
ARRAY
#SalesFixedDueDate
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryCity
Id 95
STRING
PROPERTIES
Name #DeliveryCity
Table #SalesTable
ExtendedDataType
ARRAY
#AddressCity
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #DeliveryStreet
Id 96
STRING
PROPERTIES
Name #DeliveryStreet
Table #SalesTable
ExtendedDataType
ARRAY
#AddressStreet
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #ExportReason
Id 97
STRING
PROPERTIES
Name #ExportReason
Table #SalesTable
ExtendedDataType
ARRAY
#SalesExportReason
#
ENDARRAY
StringSize #30
ENDPROPERTIES
FIELD #StatProcId
Id 104
STRING
PROPERTIES
Name #StatProcId
Table #SalesTable
ExtendedDataType
ARRAY
#IntrastatProcId
#
ENDARRAY
ENDPROPERTIES
FIELD #BankCentralBankPurposeText
Id 105
STRING
PROPERTIES
Name #BankCentralBankPurposeText
ConfigurationKey #CRSENorway
Table #SalesTable
ExtendedDataType
ARRAY
#BankCentralBankPurposeText
#
ENDARRAY
StringSize #140
ENDPROPERTIES
FIELD #DEL_RefDlvZipCode
Id 106
INT64
PROPERTIES
Name #DEL_RefDlvZipCode
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #SysDeletedObjects40
Table #SalesTable
ExtendedDataType
ARRAY
#RefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #InterCompanyCompanyId
Id 107
STRING
PROPERTIES
Name #InterCompanyCompanyId
AllowEditOnCreate #No
AllowEdit #No
Table #SalesTable
ExtendedDataType
ARRAY
#InterCompanyCompanyId
#
ENDARRAY
StringSize #4
ENDPROPERTIES
FIELD #InterCompanyPurchId
Id 108
STRING
PROPERTIES
Name #InterCompanyPurchId
Table #SalesTable
ExtendedDataType
ARRAY
#InterCompanyPurchId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InterCompanyOrder
Id 109
ENUM
PROPERTIES
Name #InterCompanyOrder
Table #SalesTable
ExtendedDataType
ARRAY
#InterCompanyCustomer
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #DlvReason
Id 111
STRING
PROPERTIES
Name #DlvReason
HelpText #@SYS79297
Table #SalesTable
ExtendedDataType
ARRAY
#DlvReasonId
#
ENDARRAY
ENDPROPERTIES
FIELD #QuotationId
Id 112
STRING
PROPERTIES
Name #QuotationId
Table #SalesTable
ExtendedDataType
ARRAY
#QuotationId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DEL_DeliveryDateControl
Id 113
ENUM
PROPERTIES
Name #DEL_DeliveryDateControl
ConfigurationKey #SysDeletedObjects41
Table #SalesTable
EnumType #NoYes
ENDPROPERTIES
FIELD #ReceiptDateRequested
Id 114
DATE
PROPERTIES
Name #ReceiptDateRequested
Table #SalesTable
ExtendedDataType
ARRAY
#SalesReceiptDateRequested
#
ENDARRAY
ENDPROPERTIES
FIELD #ReceiptDateConfirmed
Id 115
DATE
PROPERTIES
Name #ReceiptDateConfirmed
Table #SalesTable
ExtendedDataType
ARRAY
#SalesReceiptDateConfirmed
#
ENDARRAY
ENDPROPERTIES
FIELD #ShippingDateRequested
Id 116
DATE
PROPERTIES
Name #ShippingDateRequested
Mandatory #Yes
Table #SalesTable
ExtendedDataType
ARRAY
#SalesShippingDateRequested
#
ENDARRAY
ENDPROPERTIES
FIELD #ShippingDateConfirmed
Id 117
DATE
PROPERTIES
Name #ShippingDateConfirmed
Table #SalesTable
ExtendedDataType
ARRAY
#SalesShippingDateConfirmed
#
ENDARRAY
ENDPROPERTIES
FIELD #BankCentralBankPurposeCode
Id 118
STRING
PROPERTIES
Name #BankCentralBankPurposeCode
ConfigurationKey #CRSENorway
Table #SalesTable
ExtendedDataType
ARRAY
#BankCentralBankPurposeCode
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_CorrectiveReason
Id 119
STRING
PROPERTIES
Name #DEL_CorrectiveReason
Visible #No
ConfigurationKey #SysDeletedObjects40
Table #SalesTable
ExtendedDataType
ARRAY
#CustVendCorrectiveReason
#
ENDARRAY
StringSize #(Memo)
ENDPROPERTIES
FIELD #DEL_CorrectedInvoiceId
Id 120
STRING
PROPERTIES
Name #DEL_CorrectedInvoiceId
Visible #No
ConfigurationKey #SysDeletedObjects40
Table #SalesTable
ExtendedDataType
ARRAY
#CustVendCorrectedInvoiceId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DEL_ParentSalesId
Id 121
STRING
PROPERTIES
Name #DEL_ParentSalesId
Visible #No
ConfigurationKey #SysDeletedObjects40
Table #SalesTable
ExtendedDataType
ARRAY
#SalesIdBase
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #EInvoiceAccountCode
Id 122
STRING
PROPERTIES
Name #EInvoiceAccountCode
Table #SalesTable
ExtendedDataType
ARRAY
#EInvoiceAccountCode
#
ENDARRAY
StringSize #35
ENDPROPERTIES
FIELD #ItemTagging
Id 124
ENUM
PROPERTIES
Name #ItemTagging
Table #SalesTable
ExtendedDataType
ARRAY
#RFIDItemTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #CaseTagging
Id 125
ENUM
PROPERTIES
Name #CaseTagging
Table #SalesTable
ExtendedDataType
ARRAY
#RFIDCaseTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #PalletTagging
Id 126
ENUM
PROPERTIES
Name #PalletTagging
Table #SalesTable
ExtendedDataType
ARRAY
#RFIDPalletTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #AddressRefRecId
Id 127
INT64
PROPERTIES
Name #AddressRefRecId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #SalesTable
ExtendedDataType
ARRAY
#AddressRefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #SkipUpdate
Id 128
ENUM
PROPERTIES
Name #SkipUpdate
SaveContents #No
Visible #No
Table #SalesTable
EnumType #InterCompanySkipUpdate
ENDPROPERTIES
FIELD #CustInvoiceId
Id 130
STRING
PROPERTIES
Name #CustInvoiceId
Table #SalesTable
ExtendedDataType
ARRAY
#CustInvoiceId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventSiteId
Id 131
STRING
PROPERTIES
Name #InventSiteId
Table #SalesTable
ExtendedDataType
ARRAY
#InventSiteId
#
ENDARRAY
ENDPROPERTIES
FIELD #CreditCardCustRefId
Id 135
INT64
PROPERTIES
Name #CreditCardCustRefId
Label #@SYS71999
HelpText #@SYS117745
ConfigurationKey #CreditCard
Table #SalesTable
ExtendedDataType
ARRAY
#RefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #ShipCarrierAccount
Id 136
STRING
PROPERTIES
Name #ShipCarrierAccount
ConfigurationKey #ShipCarrier
Table #SalesTable
ExtendedDataType
ARRAY
#ShipCarrierAccount
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #ShipCarrierId
Id 137
STRING
PROPERTIES
Name #ShipCarrierId
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #ShipCarrier
Table #SalesTable
ExtendedDataType
ARRAY
#ShipCarrierId
#
ENDARRAY
ENDPROPERTIES
FIELD #ShipCarrierFuelSurcharge
Id 138
ENUM
PROPERTIES
Name #ShipCarrierFuelSurcharge
ConfigurationKey #ShipCarrier
Table #SalesTable
ExtendedDataType
ARRAY
#ShipCarrierFuelSurcharge
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ShipCarrierBlindShipment
Id 139
ENUM
PROPERTIES
Name #ShipCarrierBlindShipment
ConfigurationKey #ShipCarrier
Table #SalesTable
ExtendedDataType
ARRAY
#ShipCarrierBlindShipment
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #CreditCardProcessorTransactionId
Id 140
STRING
PROPERTIES
Name #CreditCardProcessorTransactionId
Table #SalesTable
ExtendedDataType
ARRAY
#CreditCardProcessorTransactionId
#
ENDARRAY
StringSize #48
ENDPROPERTIES
FIELD #ShipCarrierDeliveryContact
Id 141
STRING
PROPERTIES
Name #ShipCarrierDeliveryContact
Label #@SYS116731
HelpText #@SYS117746
ConfigurationKey #ShipCarrier
Table #SalesTable
ExtendedDataType
ARRAY
#Name
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #CreditCardApprovalAmount
Id 142
REAL
PROPERTIES
Name #CreditCardApprovalAmount
Label #@SYS116984
HelpText #@SYS117747
ConfigurationKey #CreditCard
Table #SalesTable
ExtendedDataType
ARRAY
#AmountMST
#
ENDARRAY
ENDPROPERTIES
FIELD #CreditCardAuthorization
Id 143
STRING
PROPERTIES
Name #CreditCardAuthorization
ConfigurationKey #CreditCard
Table #SalesTable
ExtendedDataType
ARRAY
#CreditCardAuthorization
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ReturnDeadline
Id 144
DATE
PROPERTIES
Name #ReturnDeadline
Table #SalesTable
ExtendedDataType
ARRAY
#ReturnDeadline
#
ENDARRAY
ENDPROPERTIES
FIELD #ReturnReplacementId
Id 145
STRING
PROPERTIES
Name #ReturnReplacementId
AllowEditOnCreate #No
AllowEdit #No
Table #SalesTable
ExtendedDataType
ARRAY
#ReturnReplacementId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ReturnStatus
Id 146
ENUM
PROPERTIES
Name #ReturnStatus
AllowEditOnCreate #No
AllowEdit #No
Table #SalesTable
EnumType #ReturnStatusHeader
ENDPROPERTIES
FIELD #ReturnReasonCodeId
Id 147
STRING
PROPERTIES
Name #ReturnReasonCodeId
Table #SalesTable
ExtendedDataType
ARRAY
#ReturnReasonCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #CreditCardAuthorizationError
Id 148
ENUM
PROPERTIES
Name #CreditCardAuthorizationError
Label #@SYS117748
HelpText #@SYS117749
ConfigurationKey #CreditCard
Table #SalesTable
ExtendedDataType
ARRAY
#NoYesId
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ShipCarrierAccountCode
Id 152
STRING
PROPERTIES
Name #ShipCarrierAccountCode
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #ShipCarrier
Table #SalesTable
ExtendedDataType
ARRAY
#ShipCarrierAccountCode
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ReturnReplacementCreated
Id 154
ENUM
PROPERTIES
Name #ReturnReplacementCreated
AllowEditOnCreate #No
AllowEdit #No
Table #SalesTable
ExtendedDataType
ARRAY
#ReturnReplacementCreated
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ShipCarrierDlvType
Id 158
ENUM
PROPERTIES
Name #ShipCarrierDlvType
Table #SalesTable
EnumType #ShipCarrierDlvType
ENDPROPERTIES
FIELD #ATPInclPlannedOrders
Id 165
ENUM
PROPERTIES
Name #ATPInclPlannedOrders
Visible #No
Table #SalesTable
ExtendedDataType
ARRAY
#SalesATPInclPlannedOrders
#
ENDARRAY
EnumType #boolean
ENDPROPERTIES
FIELD #ATPTimeFence
Id 166
INT
PROPERTIES
Name #ATPTimeFence
Visible #No
Table #SalesTable
ExtendedDataType
ARRAY
#SalesATPTimeFence
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryDateControlType
Id 167
ENUM
PROPERTIES
Name #DeliveryDateControlType
Table #SalesTable
EnumType #SalesDeliveryDateControlType
ENDPROPERTIES
FIELD #ShipCarrierExpeditedShipment
Id 168
ENUM
PROPERTIES
Name #ShipCarrierExpeditedShipment
Table #SalesTable
ExtendedDataType
ARRAY
#ShipCarrierExpeditedShipment
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ShipCarrierResidential
Id 169
ENUM
PROPERTIES
Name #ShipCarrierResidential
Table #SalesTable
ExtendedDataType
ARRAY
#ShipCarrierResidentialDest
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #SalesResponsible
Id 8001
STRING
PROPERTIES
Name #SalesResponsible
Label #@SYS81476
HelpText #@SYS81035
Table #SalesTable
ExtendedDataType
ARRAY
#EmplId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SalesUnitId
Id 8002
STRING
PROPERTIES
Name #SalesUnitId
Table #SalesTable
ExtendedDataType
ARRAY
#smmSalesUnitId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #smmSalesAmountTotal
Id 8003
REAL
PROPERTIES
Name #smmSalesAmountTotal
Table #SalesTable
ExtendedDataType
ARRAY
#smmSalesAmountTotal
#
ENDARRAY
ENDPROPERTIES
FIELD #smmCampaignId
Id 8004
STRING
PROPERTIES
Name #smmCampaignId
Table #SalesTable
ExtendedDataType
ARRAY
#smmCampaignId
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#SalesId
#SalesName
#CustAccount
#InvoiceAccount
#SalesStatus
ENDGROUPFIELDS
ENDGROUP
GROUP #AccountsReceivable
PROPERTIES
Name #AccountsReceivable
Label #@SYS25196
ENDPROPERTIES
GROUPFIELDS
#CustAccount
#InvoiceAccount
#OneTimeCustomer
#ContactPersonId
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressDisplay
PROPERTIES
Name #AddressDisplay
Label #@SYS9362
ENDPROPERTIES
GROUPFIELDS
#DeliveryAddress
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressLookup
PROPERTIES
Name #AddressLookup
Label #@SYS88672
ENDPROPERTIES
GROUPFIELDS
#SalesId
#CustAccount
#InvoiceAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressReference
PROPERTIES
Name #AddressReference
Label #@SYS88679
ENDPROPERTIES
GROUPFIELDS
#AddressRefTableId
#AddressRefRecId
ENDGROUPFIELDS
ENDGROUP
GROUP #Administration
PROPERTIES
Name #Administration
Label #@SYS9853
ENDPROPERTIES
GROUPFIELDS
#SalesTaker
#SalesPoolId
#LanguageId
#SalesUnitId
#SalesResponsible
#SalesOriginId
ENDGROUPFIELDS
ENDGROUP
GROUP #Campaign
PROPERTIES
Name #Campaign
Label #@SYS80187
ENDPROPERTIES
GROUPFIELDS
#smmCampaignId
ENDGROUPFIELDS
ENDGROUP
GROUP #CarrierInfo
PROPERTIES
Name #CarrierInfo
Label #@SYS50722
ENDPROPERTIES
GROUPFIELDS
#ShipCarrierId
#ShipCarrierAccountCode
#ShipCarrierAccount
#ShipCarrierFuelSurcharge
#ShipCarrierExpeditedShipment
#ShipCarrierResidential
ENDGROUPFIELDS
ENDGROUP
GROUP #CarrierIssues
PROPERTIES
Name #CarrierIssues
Label #@SYS116986
ENDPROPERTIES
GROUPFIELDS
#SalesId
#CustAccount
#InvoiceAccount
#SalesStatus
#CurrencyCode
ENDGROUPFIELDS
ENDGROUP
GROUP #Commission
PROPERTIES
Name #Commission
Label #@SYS2489
ENDPROPERTIES
GROUPFIELDS
#SalesGroup
#CommissionGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #ContactInfo
PROPERTIES
Name #ContactInfo
Label #@SYS21663
ENDPROPERTIES
GROUPFIELDS
#URL
#Email
ENDGROUPFIELDS
ENDGROUP
GROUP #CreditCard
PROPERTIES
Name #CreditCard
Label #@SYS101746
ENDPROPERTIES
GROUPFIELDS
#editCreditCard
#CreditCardAuthorization
#CreditCardApprovalAmount
ENDGROUPFIELDS
ENDGROUP
GROUP #Currency
PROPERTIES
Name #Currency
Label #@SYS7572
ENDPROPERTIES
GROUPFIELDS
#CurrencyCode
#FixedExchRate
ENDGROUPFIELDS
ENDGROUP
GROUP #CurrencyShow
PROPERTIES
Name #CurrencyShow
Label #@SYS7572
ENDPROPERTIES
GROUPFIELDS
#CurrencyCode
#editFixedExchRate
ENDGROUPFIELDS
ENDGROUP
GROUP #CustInvoice
PROPERTIES
Name #CustInvoice
Label #@SYS14204
ENDPROPERTIES
GROUPFIELDS
#CustInvoiceId
ENDGROUPFIELDS
ENDGROUP
GROUP #Customer
PROPERTIES
Name #Customer
Label #@SYS11779
ENDPROPERTIES
GROUPFIELDS
#CustAccount
#OneTimeCustomer
ENDGROUPFIELDS
ENDGROUP
GROUP #Delivery
PROPERTIES
Name #Delivery
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#ReceiptDateRequested
#ShippingDateRequested
#ReceiptDateConfirmed
#ShippingDateConfirmed
#DeliveryDateControlType
#DlvMode
#DlvTerm
#DlvReason
#ExportReason
#ShipCarrierBlindShipment
ENDGROUPFIELDS
ENDGROUP
GROUP #DeliveryAddition
PROPERTIES
Name #DeliveryAddition
Label #@SYS88262
ENDPROPERTIES
GROUPFIELDS
#DlvTerm
#ShipCarrierAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #DeliveryAddress
PROPERTIES
Name #DeliveryAddress
Label #@SYS7924
ENDPROPERTIES
GROUPFIELDS
#DeliveryName
#DeliveryStreet
#DeliveryZipCode
#DeliveryCity
#DeliveryCounty
#DeliveryState
#DeliveryCountryRegionId
#ShipCarrierDeliveryContact
ENDGROUPFIELDS
ENDGROUP
GROUP #Dimension
PROPERTIES
Name #Dimension
Label #@SYS5951
ENDPROPERTIES
GROUPFIELDS
#Dimension
ENDGROUPFIELDS
ENDGROUP
GROUP #Discount
PROPERTIES
Name #Discount
Label #@SYS11829
ENDPROPERTIES
GROUPFIELDS
#LineDisc
#MultiLineDisc
#EndDisc
#DiscPercent
ENDGROUPFIELDS
ENDGROUP
GROUP #DiscountMiscCharges
PROPERTIES
Name #DiscountMiscCharges
Label #@SYS22031
ENDPROPERTIES
GROUPFIELDS
#PriceGroupId
#MultiLineDisc
#EndDisc
#DiscPercent
#LineDisc
#MarkupGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #EInvoice
PROPERTIES
Name #EInvoice
Label #@SYS100769
ENDPROPERTIES
GROUPFIELDS
#EInvoiceLineSpec
#EInvoiceAccountCode
ENDGROUPFIELDS
ENDGROUP
GROUP #Emails
PROPERTIES
Name #Emails
Label #@SYS96646
ENDPROPERTIES
GROUPFIELDS
#Email
ENDGROUPFIELDS
ENDGROUP
GROUP #EPMiniPage
PROPERTIES
Name #EPMiniPage
Label #@SYS108232
ENDPROPERTIES
GROUPFIELDS
#SalesId
#SalesName
#SalesStatus
#ContactPersonId
#smmSalesAmountTotal
ENDGROUPFIELDS
ENDGROUP
GROUP #ExternalReference
PROPERTIES
Name #ExternalReference
Label #@SYS21697
ENDPROPERTIES
GROUPFIELDS
#PurchOrderFormNum
#CustomerRef
#ReturnItemNum
ENDGROUPFIELDS
ENDGROUP
GROUP #ForeignTrade
PROPERTIES
Name #ForeignTrade
Label #@SYS27650
ENDPROPERTIES
GROUPFIELDS
#TransactionCode
#Transport
#Port
#StatProcId
#Listcode
#CountyOrigDest
ENDGROUPFIELDS
ENDGROUP
GROUP #GiroMoneyTransferSlip
PROPERTIES
Name #GiroMoneyTransferSlip
Label #@SYS2723
ENDPROPERTIES
GROUPFIELDS
#GiroType
ENDGROUPFIELDS
ENDGROUP
GROUP #HeaderToLineUpdate
PROPERTIES
Name #HeaderToLineUpdate
Label #@SYS62436
ENDPROPERTIES
GROUPFIELDS
#CustAccount
#SalesGroup
#TaxGroup
#Dimension
#InventLocationId
#Reservation
#TransactionCode
#Port
#StatProcId
#PriceGroupId
#LineDisc
#MarkupGroup
#DeliveryDate
#LanguageId
#Transport
#DlvMode
#ShipCarrierAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#SalesId
ENDGROUPFIELDS
ENDGROUP
GROUP #Intercompany
PROPERTIES
Name #Intercompany
Label #@SYS75319
ENDPROPERTIES
GROUPFIELDS
#InterCompanyOrder
#InterCompanyCompanyId
#InterCompanyPurchId
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompanyAdmin
PROPERTIES
Name #InterCompanyAdmin
Label #@SYS74106
ENDPROPERTIES
GROUPFIELDS
#InterCompanyAutoCreateOrders
#InterCompanyDirectDelivery
#interCompanyOriginDisplay
#InterCompanyAllowIndirectCreation
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompanyOriginal
PROPERTIES
Name #InterCompanyOriginal
Label #@SYS93838
ENDPROPERTIES
GROUPFIELDS
#InterCompanyOriginalSalesId
#InterCompanyOriginalCustAccount
#InterCompanyDirectDeliveryOrig
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompanyReturn
PROPERTIES
Name #InterCompanyReturn
Label #@SYS120343
ENDPROPERTIES
GROUPFIELDS
#ReturnReplacementCreated
ENDGROUPFIELDS
ENDGROUP
GROUP #Inventory
PROPERTIES
Name #Inventory
Label #@SYS981
ENDPROPERTIES
GROUPFIELDS
#InventSiteId
#InventLocationId
ENDGROUPFIELDS
ENDGROUP
GROUP #NotificationToTheCentralBank
PROPERTIES
Name #NotificationToTheCentralBank
Label #@SYS67156
ENDPROPERTIES
GROUPFIELDS
#BankCentralBankPurposeCode
#BankCentralBankPurposeText
ENDGROUPFIELDS
ENDGROUP
GROUP #Other
PROPERTIES
Name #Other
Label #@SYS1284
ENDPROPERTIES
GROUPFIELDS
#CreditCardCustRefId
#CreditCardProcessorTransactionId
#CreditCardAuthorizationError
#ShipCarrierDlvType
ENDGROUPFIELDS
ENDGROUP
GROUP #Overview
PROPERTIES
Name #Overview
Label #@SYS9039
ENDPROPERTIES
GROUPFIELDS
#SalesId
#CustAccount
#InvoiceAccount
#SalesType
#SalesStatus
#CurrencyCode
#ProjId
#salesIdBlanket
#qualityOrderStatusDisplay
ENDGROUPFIELDS
ENDGROUP
GROUP #Payment
PROPERTIES
Name #Payment
Label #@SYS828
ENDPROPERTIES
GROUPFIELDS
#Payment
#FixedDueDate
#PaymMode
#PaymSpec
#PaymentSched
#CashDisc
#CashDiscPercent
#editCreditCard
ENDGROUPFIELDS
ENDGROUP
GROUP #Posting
PROPERTIES
Name #Posting
Label #@SYS5943
ENDPROPERTIES
GROUPFIELDS
#PostingProfile
#SettleVoucher
#NumberSequenceGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #Project
PROPERTIES
Name #Project
Label #@SYS4534
ENDPROPERTIES
GROUPFIELDS
#ProjId
ENDGROUPFIELDS
ENDGROUP
GROUP #Quotation
PROPERTIES
Name #Quotation
Label #@SYS5864
ENDPROPERTIES
GROUPFIELDS
#QuotationId
ENDGROUPFIELDS
ENDGROUP
GROUP #Reservation
PROPERTIES
Name #Reservation
Label #@SYS7669
ENDPROPERTIES
GROUPFIELDS
#Reservation
ENDGROUPFIELDS
ENDGROUP
GROUP #Return
PROPERTIES
Name #Return
Label #@SYS24700
ENDPROPERTIES
GROUPFIELDS
#ReturnReasonCodeId
#ReturnStatus
ENDGROUPFIELDS
ENDGROUP
GROUP #ReturnItemNum
PROPERTIES
Name #ReturnItemNum
Label #@SYS104082
ENDPROPERTIES
GROUPFIELDS
#ReturnItemNum
#CustAccount
#ReturnStatus
ENDGROUPFIELDS
ENDGROUP
GROUP #ReturnListPage
PROPERTIES
Name #ReturnListPage
Label #@SYS9039
ENDPROPERTIES
GROUPFIELDS
#ReturnItemNum
#CustAccount
#InvoiceAccount
#ReturnReasonCodeId
#ReturnDeadline
#ReturnStatus
ENDGROUPFIELDS
ENDGROUP
GROUP #ReturnOrder
PROPERTIES
Name #ReturnOrder
Label #@SYS105841
ENDPROPERTIES
GROUPFIELDS
#ReturnItemNum
#SalesId
#ReturnReasonCodeId
#ReturnDeadline
#CurrencyCode
#CustAccount
#InvoiceAccount
#editContactPersonName
#ContactPersonId
ENDGROUPFIELDS
ENDGROUP
GROUP #ReturnReplacement
PROPERTIES
Name #ReturnReplacement
Label #@SYS84714
ENDPROPERTIES
GROUPFIELDS
#ReturnReplacementId
#ReturnReplacementCreated
ENDGROUPFIELDS
ENDGROUP
GROUP #RFIDTagging
PROPERTIES
Name #RFIDTagging
Label #@SYS90171
ENDPROPERTIES
GROUPFIELDS
#ItemTagging
#CaseTagging
#PalletTagging
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesAmountTotal
PROPERTIES
Name #SalesAmountTotal
Label #@SYS23862
ENDPROPERTIES
GROUPFIELDS
#smmSalesAmountTotal
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesOrderTable
PROPERTIES
Name #SalesOrderTable
Label #@SYS12847
ENDPROPERTIES
GROUPFIELDS
#ReturnItemNum
#CovStatus
#SalesName
#SalesType
#MarkupGroup
#DocumentStatus
#CustGroup
#PostingProfile
#SettleVoucher
#SalesStatus
#Reservation
#PurchId
#Deadline
#Estimate
#Touched
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTax
PROPERTIES
Name #SalesTax
Label #@SYS5878
ENDPROPERTIES
GROUPFIELDS
#TaxGroup
#VATNum
#EnterpriseNumber
#InclTax
ENDGROUPFIELDS
ENDGROUP
GROUP #Status
PROPERTIES
Name #Status
Label #@SYS25587
ENDPROPERTIES
GROUPFIELDS
#SalesStatus
#DocumentStatus
#Deadline
ENDGROUPFIELDS
ENDGROUP
GROUP #SummaryNumber
PROPERTIES
Name #SummaryNumber
Label #*** OUTDATED ***
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #SummaryOrder
PROPERTIES
Name #SummaryOrder
Label #@SYS24079
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #SummaryUpdate
PROPERTIES
Name #SummaryUpdate
Label #@SYS57755
ENDPROPERTIES
GROUPFIELDS
#CustAccount
#InvoiceAccount
#SalesType
#CurrencyCode
#FixedExchRate
#ContactPersonId
#LanguageId
#Dimension
#SalesPoolId
#PostingProfile
#NumberSequenceGroup
#VATNum
#InclTax
#SalesGroup
#CommissionGroup
#DlvMode
#DlvTerm
#FreightZone
#FreightSlipType
#PriceGroupId
#MultiLineDisc
#EndDisc
#DiscPercent
#LineDisc
#CashDisc
#Payment
#PaymentSched
#TransactionCode
#Listcode
#InventLocationId
#PaymMode
#PaymSpec
#FixedDueDate
#InterCompanyCompanyId
#InterCompanyOriginalCustAccount
#InterCompanyDirectDeliveryOrig
ENDGROUPFIELDS
ENDGROUP
GROUP #SummaryUpdateParameters
PROPERTIES
Name #SummaryUpdateParameters
Label #@SYS57738
ENDPROPERTIES
GROUPFIELDS
#AutoSummaryModuleType
ENDGROUPFIELDS
ENDGROUP
GROUP #SummaryUpdateShow
PROPERTIES
Name #SummaryUpdateShow
Label #@SYS57755
ENDPROPERTIES
GROUPFIELDS
#CustAccount
#InvoiceAccount
#SalesType
#CurrencyCode
#FixedExchRate
#ContactPersonId
#LanguageId
#Dimension
#SalesPoolId
#PostingProfile
#NumberSequenceGroup
#VATNum
#InclTax
#SalesGroup
#CommissionGroup
#DlvMode
#DlvTerm
#FreightZone
#FreightSlipType
#PriceGroupId
#MultiLineDisc
#EndDisc
#DiscPercent
#LineDisc
#CashDisc
#Payment
#PaymentSched
#TransactionCode
#Listcode
#InventLocationId
#PaymMode
#PaymSpec
#FixedDueDate
ENDGROUPFIELDS
ENDGROUP
GROUP #Transport
PROPERTIES
Name #Transport
Label #@SYS3843
ENDPROPERTIES
GROUPFIELDS
#FreightZone
#FreightSlipType
ENDGROUPFIELDS
ENDGROUP
GROUP #WebCategoryBrowsing
PROPERTIES
Name #WebCategoryBrowsing
Label #@SYS74258
ENDPROPERTIES
GROUPFIELDS
#SalesStatus
ENDGROUPFIELDS
ENDGROUP
GROUP #WebCategoryBrowsingReturn
PROPERTIES
Name #WebCategoryBrowsingReturn
Label #@SYS74258
ENDPROPERTIES
GROUPFIELDS
#ReturnStatus
ENDGROUPFIELDS
ENDGROUP
GROUP #WebDelivery
PROPERTIES
Name #WebDelivery
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#DeliveryName
#DeliveryAddress
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#SalesIdx
Id 1
PROPERTIES
Name #SalesIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#SalesId
ENDINDEXFIELDS
#CustIdx
Id 2
PROPERTIES
Name #CustIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#CustAccount
#SalesId
ENDINDEXFIELDS
#ProjIdIdx
Id 3
PROPERTIES
Name #ProjIdIdx
ConfigurationKey #ProjBasic
ENDPROPERTIES
INDEXFIELDS
#ProjId
#SalesId
ENDINDEXFIELDS
#StatusCustAccIdx
Id 5
PROPERTIES
Name #StatusCustAccIdx
ENDPROPERTIES
INDEXFIELDS
#SalesStatus
#CustAccount
ENDINDEXFIELDS
#InvoiceAccStatusIdx
Id 6
PROPERTIES
Name #InvoiceAccStatusIdx
ENDPROPERTIES
INDEXFIELDS
#InvoiceAccount
#SalesStatus
ENDINDEXFIELDS
#ReturnNumIdx
Id 7
PROPERTIES
Name #ReturnNumIdx
ConfigurationKey #ReturnItem
ENDPROPERTIES
INDEXFIELDS
#ReturnItemNum
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #AddressCounty
PROPERTIES
Name #AddressCounty
Table #AddressCounty
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryCountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryState
RelatedField #StateId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryCounty
RelatedField #CountyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #AddressState
PROPERTIES
Name #AddressState
Table #AddressState
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryCountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryState
RelatedField #StateId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #Common
PROPERTIES
Name #Common
Table #Common
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #AddressRefRecId
RelatedField #RecId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AddressRefTableId
RelatedField #TableId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CountyOrigDest
PROPERTIES
Name #CountyOrigDest
Table #AddressCounty
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #CountyOrigDest
RelatedField #CountyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CreditCard
PROPERTIES
Name #CreditCard
Table #CreditCardCust
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #CreditCardCustRefId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CustPaymModeSpec
PROPERTIES
Name #CustPaymModeSpec
Table #CustPaymModeSpec
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #PaymMode
RelatedField #PaymMode
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #PaymSpec
RelatedField #Specification
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #MarkupGroup
PROPERTIES
Name #MarkupGroup
Table #MarkupGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #1
Table #MarkupGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #MarkupGroup
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchTable
PROPERTIES
Name #PurchTable
Table #PurchTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #SalesTable
Field #InterCompanyOrder
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #SalesTable
Field #InterCompanyCompanyId
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #SalesTable
Field #InterCompanyPurchId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #PurchId
RelatedField #PurchId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchTableInterCompany
PROPERTIES
Name #PurchTableInterCompany
Table #PurchTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #SalesTable
Field #InterCompanyOrder
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InterCompanyCompanyId
RelatedField #dataAreaId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InterCompanyPurchId
RelatedField #PurchId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
#PrintMgmtDocInstance
PROPERTIES
Table #PrintMgmtDocInstance
DeleteAction #Cascade
ENDPROPERTIES
#TaxWorkRegulation
PROPERTIES
Table #TaxWorkRegulation
DeleteAction #Cascade
ENDPROPERTIES
#CustPaymSched
PROPERTIES
Table #CustPaymSched
DeleteAction #Cascade
ENDPROPERTIES
#DocuRef
PROPERTIES
Table #DocuRef
DeleteAction #Cascade
ENDPROPERTIES
#InterCompanyPurchSalesReference
PROPERTIES
Table #InterCompanyPurchSalesReference
DeleteAction #Cascade
ENDPROPERTIES
#LedgerCov
PROPERTIES
Table #LedgerCov
DeleteAction #Cascade
ENDPROPERTIES
#MarkupTrans
PROPERTIES
Table #MarkupTrans
DeleteAction #Cascade
ENDPROPERTIES
#SalesJournalAutoSummary
PROPERTIES
Table #SalesJournalAutoSummary
DeleteAction #Cascade
ENDPROPERTIES
#CustVendCreditInvoicingTable
PROPERTIES
Table #CustVendCreditInvoicingTable
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #AccountClearing
#//BP Deviation documented
#display LedgerAccount accountClearing()
#{
# SalesTableType salesTableType;
# ;
#
# salesTableType = this.type();
# return salesTableType.accountClearing();
#}
ENDSOURCE
SOURCE #AccountCust
#//BP Deviation documented
#display LedgerAccount accountCust()
#{
# SalesTableType salesTableType;
# ;
#
# salesTableType = this.type();
# return salesTableType.accountCust();
#}
ENDSOURCE
SOURCE #aifEndpointActionValueMap
#AifEndpointActionValueMap aifEndpointActionValueMap(boolean _forUpdate = false)
#{
# #InterCompany
# AifActionId defaultSalesOrderAction = #DefaultSalesOrderAction;
# AifEndpointActionValueMap aifEndpointActionValueMap;
#;
# if (this.DataAreaId != curext())
# {
# changecompany(this.DataAreaId)
# {
# aifEndpointActionValueMap = AifEndpointActionValueMap::find(AifEndpointConstraint::findInterCompanyEndpointId(CustTable::find(this.CustAccount)),defaultSalesOrderAction);
# }
# }
# else
# {
# aifEndpointActionValueMap = AifEndpointActionValueMap::find(AifEndpointConstraint::findInterCompanyEndpointId(CustTable::find(this.CustAccount)),defaultSalesOrderAction);
# }
#
# return aifEndpointActionValueMap;
#}
#
ENDSOURCE
SOURCE #AmountDelivered
#//BP Deviation documented
#server display AmountCur amountDelivered()
#{
# SalesLine salesLine;
# AmountCur amountCur = 0;
# ;
#
# while select salesLine
# index hint SalesLineIdx
# where salesLine.SalesId == this.SalesId
# {
# amountCur += salesLine.calcLineAmountExclTax(salesLine.SalesQty - salesLine.RemainSalesPhysical);
# }
#
# return amountCur;
#}
ENDSOURCE
SOURCE #AmountInvoiced
#//BP Deviation documented
#server display AmountCur amountInvoiced()
#{
# CustInvoiceJour custInvoiceJour;
# ;
#
# select sum(InvoiceAmount) from custInvoiceJour
# where custInvoiceJour.RefNum == RefNum::SalesOrder &&
# custInvoiceJour.SalesId == this.SalesId;
#
# return custInvoiceJour.InvoiceAmount;
#}
ENDSOURCE
SOURCE #amountMST
#AmountMST amountMST(AmountCur _amountCur, TransDate _exchRateDate = systemdateget())
#{
# return Currency::mstAmount(_amountCur, this.CurrencyCode, _exchRateDate, this.fixedEuroTriangulation(), this.fixedExchRate(), this.fixedExchRateSecondary());
#}
ENDSOURCE
SOURCE #amountOrderedNotInvoiced
#//BP Deviation documented
#server display AmountCur amountOrderedNotInvoiced()
#{
# SalesLine salesLine;
# AmountCur ordered;
# ;
#
# while select salesLine
# index SalesLineIdx
# where salesLine.SalesId == this.SalesId
# {
# ordered += salesLine.calcLineAmountExclTax(salesLine.RemainSalesPhysical+salesLine.RemainSalesFinancial);
# }
#
# return ordered;
#}
ENDSOURCE
SOURCE #AmountRemainSalesFinancial
#//BP Deviation documented
#server display AmountCur amountRemainSalesFinancial()
#{
# SalesLine salesLine;
# AmountCur amountCur = 0;
# ;
#
# while select salesLine
# index hint SalesLineIdx
# where salesLine.SalesId == this.SalesId
# {
# amountCur += salesLine.calcLineAmountExclTax(salesLine.RemainSalesFinancial);
# }
#
# return amountCur;
#}
ENDSOURCE
SOURCE #AmountRemainSalesPhysical
#//BP Deviation documented
#server display AmountCur amountRemainSalesPhysical()
#{
# SalesLine salesLine;
# AmountCur amountCur = 0;
# ;
#
# while select salesLine
# index hint SalesLineIdx
# where salesLine.SalesId == this.SalesId
# {
# amountCur += salesLine.calcLineAmountExclTax(salesLine.RemainSalesPhysical);
# }
#
# return amountCur;
#}
ENDSOURCE
SOURCE #AxSalesTable
#public AxSalesTable axSalesTable()
#{
# AxSalesTable axSalesTable = AxSalesTable::newSalesTable(this);
# return axSalesTable;
#}
#
ENDSOURCE
SOURCE #calcEstimateForced
#boolean calcEstimateForced()
#{
# this.Touched = NoYes::Yes;
#
# if (this.validateWrite())
# {
# this.update();
# }
# else
# {
# this.reread();
# return false;
# }
#
# return true;
#}
#
ENDSOURCE
SOURCE #canBeDirectlyInvoiced
#///
#/// Determines if the sales order can be directly invoiced via the Process Shipment feature.
#///
#///
#/// true if the sales order has a payment term of COD or Credit card; otherwise, false.
#///
#///
#/// The Process shipment button is used for COD and credit card transactions.
#/// If the payment type is a credit card, the button will process the credit card and post the invoice.
#/// If the payment type is COD, the button with post the invoice.
#/// The Invoice button is used to post all other transactions (not COD or credit card).
#/// If the Process Shipment feature was used, the Invoice button will print the invoice again.
#///
#boolean canBeDirectlyInvoiced()
#{
# boolean canBeInvoiced = false;
# PaymTerm paymTerm;
# ;
#
# paymTerm = this.payment();
# if (paymTerm.CreditCardPaymentType == CreditCardPaymentType::CreditCard ||
# paymTerm.PaymMethod == NetCurrent::COD)
# {
# canBeInvoiced = true;
# }
#
# return canBeInvoiced;
#}
ENDSOURCE
SOURCE #cancelPreAuthorization
#boolean cancelPreAuthorization()
#{
# CreditCardAuthTrans creditCardAuthTrans2Cancel;
# ;
#
# if (!this.RecId)
# {
# return true;
# }
#
# creditCardAuthTrans2Cancel = CreditCardAuthTrans::findValidPreApproval(this.SalesId);
# if (!creditCardAuthTrans2Cancel)
# {
# return true;
# }
# if (Box::okCancel("@SYS116762", DialogButton::Cancel)== DialogButton::Ok)
# {
# return CreditCardProcess::doVoidAuth(creditCardAuthTrans2Cancel);
# }
# else
# {
# return false;
# }
#
# return true;
#}
ENDSOURCE
SOURCE #canCustomerBeUpdated
#boolean canCustomerBeUpdated(DocumentStatus _documentStatus)
#{
# return CustTable::canCustomerBeUpdated(this.CustAccount, this.InvoiceAccount, _documentStatus);
#}
#
ENDSOURCE
SOURCE #canXMLBeSent
#public boolean canXMLBeSent()
#{
# boolean ret;
# AifActionId actionId;
# AifEndpointList endpointList;
# AifConstraint aifConstraint = new AifConstraint();
# AifConstraintList aifConstraintList = new AifConstraintList();
# ;
#
# actionId = AifSendService::getDefaultSendAction(classnum(ReturnReturnOrderOutService),AifSendActionType::SendByKey);
#
# if(actionId)
# {
# aifConstraint.parmType(AifConstraintType::Customer) ;
# aifConstraint.parmId(this.CustAccount) ;
# aifConstraintList.addConstraint(aifConstraint) ;
#
# endpointList = AifSendService::getEligibleEndpoints(actionId, aifConstraintList);
# if(endpointList.getEndpointCount()>0)
# {
# ret = true;
# }
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #CGranNameCust
#//CarlosGranados:Obtengo el nombre del cliente del pedido de ventas
#display str CGranNameCust() {
#
# return CustTable::find(this.InvoiceAccount).Name;
#}
ENDSOURCE
SOURCE #CheckAccount
#boolean checkAccount()
#{
# CustVendorBlocked blockLevel = CustTable::blocked(this.CustAccount);
# ;
#
# switch (blockLevel)
# {
# case CustVendorBlocked::All:
# return checkFailed(strfmt("@SYS18389", this.CustAccount, enum2str(blockLevel)));
# case CustVendorBlocked::Invoice:
# warning(strfmt("@SYS18389", this.CustAccount, enum2str(blockLevel)));
# break;
# }
#
# return true;
#}
ENDSOURCE
SOURCE #checkAgainstCreditLimit
#boolean checkAgainstCreditLimit(Common _salesLineOrTable = this, SalesTotals _salesTotals = null)
#{
# boolean ret = true;
# CustCreditLimit custCreditLimit;
#
# if (this.isCreditCheckEligible())
# {
# setprefix(strfmt("@SYS76767", this.SalesId));
#
# custCreditLimit = CustCreditLimit::construct(_salesLineOrTable, _salesTotals);
#
# ret = custCreditLimit.check();
#
# // when checking for credit limit excess during order entry, the user is always able to continue
# // regardless of whether Warning or Error is chosen.
# ret = true;
#
# this.Touched = NoYes::No;
# }
#
# return ret;
#
#}
#
ENDSOURCE
SOURCE #checkAndUpdateAvailableDlvDates
#server boolean checkAndUpdateAvailableDlvDates()
#{
# boolean ret;
# ;
# ret = SalesCalcAvailableDlvDates::validateWritePrompt(this, false, true);
# this.doUpdate();
# return ret;
#}
ENDSOURCE
SOURCE #CheckCashPayment
#boolean checkCashPayment()
#{
# if (PaymTerm::isCashAccount(this.Payment) && this.PaymentSched )
# {
# return checkFailed(strfmt("@SYS25074"));
# }
# return true;
#}
ENDSOURCE
SOURCE #checkContactPerson
#boolean checkContactPerson()
#{
# ContactPerson contactPerson;
# ;
# if (this.ContactPersonId)
# {
# contactPerson = ContactPerson::find(this.ContactPersonId);
# if (contactPerson.CustAccount != this.CustAccount)
# {
# // Contact person "%1 - %2" must be attached to the customer "%3".
# return checkFailed(strfmt("@SYS92800",this.ContactPersonId,contactPerson.Name,this.CustAccount));
# }
# }
# return true;
#}
#
ENDSOURCE
SOURCE #CheckCreditCard
#public boolean checkCreditCard()
#{
# CreditCardPaymentType paymType = this.payment().CreditCardPaymentType;
# ;
#
# if (!CustParameters::useCreditCardModule())
# {
# return true;
# }
#
# if (paymType == CreditCardPaymentType::CreditCard && !this.CreditCardCustRefId )
# {
# //"The credit card number must be specfied."
# return checkFailed("@SYS116746");
# }
#
# if (paymType != CreditCardPaymentType::CreditCard && this.CreditCardCustRefId )
# {
# //'The payment type must be credit card, since the credit card number has been specified."
# return checkFailed("@SYS116747");
# }
#
# if (paymType == CreditCardPaymentType::CreditCard &&
# this.CreditCardCustRefId &&
# !CreditCard::checkExpireDate(CreditCardCust::find(this.CreditCardCustRefId).ExpiryDate))
# {
# //'Credit card is expired.'
# return checkFailed("@SYS116750");
# }
#
# return true;
#}
ENDSOURCE
SOURCE #checkCreditCardPaymentType
#public boolean checkCreditCardPaymentType()
#{
# ;
#
# if (!this.type().canHaveCreditCard() &&
# this.payment().CreditCardPaymentType == CreditCardPaymentType::CreditCard)
# {
# return checkFailed(strfmt("@SYS127403", this.SalesType));
# }
#
# return true;
#}
ENDSOURCE
SOURCE #checkCreditLimit
#void checkCreditLimit(SalesTotals _salesTotals = null)
#{
# ;
# SalesTableType::checkAgainstCreditLimit(this, _salesTotals);
#}
#
ENDSOURCE
SOURCE #CheckCurrencyCode
#client server
#void checkCurrencyCode()
#{
# if (this)
# {
# if (this.CurrencyCode != this.orig().CurrencyCode &&
# SalesLine::existDifferentCurrency(this.SalesId,this.CurrencyCode))
# {
# warning("@SYS15290");
#
# this.CurrencyCode = this.orig().CurrencyCode;
# }
#
# if (this.CurrencyCode != this.orig().CurrencyCode &&
# MarkupTrans::existDifferentCurrency(this.TableId, this.RecId, this.CurrencyCode))
# {
# warning("@SYS24528");
#
# this.CurrencyCode = this.orig().CurrencyCode;
# }
# }
#}
ENDSOURCE
SOURCE #checkDelete
#boolean checkDelete(boolean _useWarning = true)
#{
# return this.type().checkDelete(_useWarning);
#}
ENDSOURCE
SOURCE #checkDelivery
#boolean checkDelivery()
#{
# ;
#
# if (!this.DlvMode)
# {
# // "Mode of delivery must be specified."
# return checkFailed(strfmt("@SYS116733"));
# }
#
# if (!this.DlvTerm)
# {
# // "Delivery term must be specified."
# return checkFailed(strfmt("@SYS116734"));
# }
#
# if (!this.ShipCarrierId)
# {
# // "Carrier must be specified."
# return checkFailed("@SYS116735");
# }
#
# return true;
#}
ENDSOURCE
SOURCE #checkIfUpdate
#server container checkIfUpdate()
#{
# container checkIfUpdate;
#;
# if (this.DataAreaId != curext())
# {
# changecompany(this.DataAreaId)
# {
# checkIfUpdate = this.type().checkIfUpdate();
# }
# }
# else
# {
# checkIfUpdate = this.type().checkIfUpdate();
# }
# return checkIfUpdate;
#}
ENDSOURCE
SOURCE #checkInvoiceAccount
#boolean checkInvoiceAccount()
#{
# CustVendorBlocked blockLevel = CustTable::blocked(this.InvoiceAccount);
# ;
# switch (blockLevel)
# {
# case CustVendorBlocked::All:
# return checkFailed(strfmt("@SYS79283", this.InvoiceAccount, enum2str(blockLevel)));
# case CustVendorBlocked::Invoice:
# warning(strfmt(strfmt("@SYS79283", this.InvoiceAccount, enum2str(blockLevel))));
# break;
# }
# return true;
#}
ENDSOURCE
SOURCE #CheckPayment
#boolean checkPayment()
#{
# PaymTerm paymTerm;
# ;
#
# paymTerm = this.payment();
# if (paymTerm.PaymMethod == NetCurrent::COD && !this.returnJournal())
# {
# if (!this.DlvMode)
# {
# return checkFailed(strfmt("@SYS24563"));
# }
#
# if (this.PaymentSched)
# {
# return checkFailed(strfmt("@SYS24623"));
# }
# }
#
# if (this.PaymentSched && this.FixedDueDate)
# {
# return checkFailed("@SYS69828");
# }
#
# if (paymTerm.CreditCardPaymentType == CreditCardPaymentType::CreditCard)
# {
# if (!CreditCardProcessors::validateCurrencyForUSDProviders(this.CurrencyCode) || !this.checkPaymMode())
# {
# // The active credit card processor only supports USD as a currency.
# return checkFailed("@SYS124613");
# }
#
# if (this.PaymentSched)
# {
# return checkFailed("@SYS27358");
# }
# }
#
# return true;
#}
ENDSOURCE
SOURCE #checkPaymMode
#///
#/// Checks whether the payment mode is valid.
#///
#///
#/// true if the payment mode is valid; otherwise, false.
#///
#public boolean checkPaymMode()
#{
# boolean ok = true;
# CustPaymModeTable custPaymModeTable;
# CustParameters custParameters;
# ;
#
# if (this.payment().CreditCardPaymentType == CreditCardPaymentType::CreditCard)
# {
# custPaymModeTable = CustPaymModeTable::find(this.PaymMode);
#
# if (custPaymModeTable.offsetAccount() != ''
# && !CreditCardProcessors::validateAccountForUSDProviders(custPaymModeTable.paymACType(), custPaymModeTable.offsetAccount()))
# {
# ok = false;
# }
# else if (custPaymModeTable.offsetAccount() == '')
# {
# custParameters = CustParameters::find();
#
# if (!CreditCardProcessors::validateAccountForUSDProviders(custParameters.CreditCardPostingAccountType, custParameters.CreditCardPostingAccount))
# {
# ok = false;
# }
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkReservation
#boolean checkReservation()
#{
# SalesLine salesLine;
# boolean ok = true;
# ;
# select firstonly salesLine
# index hint SalesLineIdx
# where salesLine.SalesId == this.SalesId
# && salesLine.InventRefTransId != '';
# if (salesLine
# && this.Reservation == ItemReservation::Explosion)
# ok = checkFailed("@SYS105404");
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckUpdate
#boolean checkUpdate(boolean useWarning = true,
# boolean _interCompanyCheck = true)
#{
# return this.type().checkUpdate(useWarning,_interCompanyCheck);
#}
#
ENDSOURCE
SOURCE #clearAddressReference
#public void clearAddressReference()
#{
# this.AddressRefRecId = 0;
# this.AddressRefTableId = 0;
#}
ENDSOURCE
SOURCE #ClearingPeriod
#ClearingPeriod clearingPeriod()
#{
# return this.custTable_InvoiceAccount().clearingPeriod();
#}
#
ENDSOURCE
SOURCE #contactPerson
#ContactPerson contactPerson(boolean _forUpdate = false)
#{
# return ContactPerson::find(this.ContactPersonId, _forUpdate);
#}
ENDSOURCE
SOURCE #ContactPersonName
#//BP Deviation documented
#display ContactPersonName contactPersonName()
#{
# return ContactPerson::name(this.ContactPersonId);
#}
ENDSOURCE
SOURCE #contributionMargin
#//BP Deviation documented
#server display ContributionMarginMST contributionMargin()
#{
# SalesTotals salesTotals;
# ContributionMarginMST contributionMargin;
# ;
#
# salesTotals = SalesTotals::construct(this, SalesUpdate::All);
# salesTotals.prepareBalanceCalculation();
# salesTotals.prepareCostValueCalculation();
# salesTotals.calc();
#
# contributionMargin = Currency::mstAmount(salesTotals.totalBalance() - salesTotals.totalEndDisc(), this.CurrencyCode);
# contributionMargin -= salesTotals.totalCostValue();
#
# return contributionMargin;
#}
ENDSOURCE
SOURCE #convertCurrencyCode
#server void convertCurrencyCode(CurrencyCode currencyCode, TradeCurencyConversion tradeCurencyConversion = TradeCurencyConversion::ExchRate)
#{
# SalesLine salesLine;
# MarkupTrans markupTrans;
#
# ttsbegin;
#
# while select forupdate salesLine
# where salesLine.SalesId == this.SalesId
# {
# salesLine.convertCurrencyCode(currencyCode, tradeCurencyConversion);
# salesLine.doUpdate();
# }
#
# while select forupdate markupTrans
# index hint TableRecIdIdx
# where markupTrans.TransTableId == this.TableId &&
# markupTrans.TransRecId == this.RecId
# {
# markupTrans.convertCurrencyCode(currencyCode);
# markupTrans.doUpdate();
# }
#
# CustPaymSched::deleteCustPaymSched(this.TableId, this.RecId);
#
# if (this.FixedExchRate)
# info(strfmt("@SYS78763", this.SalesId));
#
# this.FixedExchRate = 0;
#
# this.CurrencyCode = currencyCode;
#
# ttscommit;
#}
ENDSOURCE
SOURCE #copyAddressToLine
#server void copyAddressToLine(DialogButton copyAddress,
# SalesTable salesTable)
#{
# SalesLine salesLine;
# ;
#
# if (copyAddress == DialogButton::Cancel)
# return;
#
# ttsbegin;
#
# while select forupdate salesLine
# where salesLine.SalesId == this.SalesId &&
# (copyAddress == DialogButton::YesToAll ||
# salesLine.DeliveryAddress == salesTable.orig().DeliveryAddress)
# {
# salesLine.setAddressFromSalesTable(this);
# salesLine.DeliveryDateControlType = SalesDeliveryDateControlType::None;
# salesLine.write();
# }
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #copyDimension
#///
#/// Returns a dimension set that can be applied to the SalesTable.dimension field.
#/// The method ensures that potential linked dimensions are not overwritten.
#///
#///
#/// A dimension set that should be applied to the SalesTable.dimension field.
#///
#///
#/// A dimensionCopy object previously instantiated using the current SalesTable buffer; optional.
#///
#///
#/// Dimension set that can be applied to the SalesTable.dimension field.
#///
#public Dimension copyDimension(Dimension _dimension, DimensionCopy _dimensionCopy = DimensionCopy::newFromTable(this))
#{
# return _dimensionCopy.copy(_dimension);
#}
#
ENDSOURCE
SOURCE #CopyPaymentSched
#server void copyPaymentSched(CustInvoiceJour custInvoiceJour)
#{
# CustPaymSched custPaymSched;
# CustVendPaymSched custVendPaymSched;
# ;
#
# ttsbegin;
#
# select custPaymSched
# where custPaymSched.ExtTableId == this.TableId &&
# custPaymSched.ExtRecId == this.RecId;
#
# if (custPaymSched.RecId)
# {
# custVendPaymSched = CustVendPaymSched::construct(SysModule::Cust, custInvoiceJour);
# custVendPaymSched.copyCustVendPaymSched(custPaymSched);
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #copyRMALines
#void copyRMALines(SalesTable _returnTable, NoYes _copyRMALines = NoYes::No)
#{
# SalesLine salesLine;
# SalesLine replacementLine;
# SalesTable returnTable = SalesTable::findRecId(_returnTable.RecId, true);
# ;
#
# ttsbegin;
#
# if (_copyRMALines == NoYes::Yes && returnTable.returnJournal())
# {
# while select salesLine where salesLine.SalesId == returnTable.SalesId && salesLine.ReturnStatus != ReturnStatusLine::Canceled
# {
# replacementLine.clear();
#
# replacementLine.SalesType = SalesType::Sales;
#
# // copy from return line
# replacementLine.initFromSalesLine(salesLine);
# // update with replacement sales order information
# replacementLine.initFromSalesTable(this);
#
# replacementLine.SalesQty = -salesLine.ExpectedRetQty;
# replacementLine.SalesPrice = Currency::curPrice2CurPrice(replacementLine.SalesPrice, salesLine.CurrencyCode, replacementLine.CurrencyCode);
# replacementLine.LineAmount = Currency::curAmount2CurAmount(replacementLine.LineAmount, salesLine.CurrencyCode, replacementLine.CurrencyCode);
#
# SalesCalcAvailableDlvDates::initDateFields(replacementLine);
#
# replacementLine.LineAmount = replacementLine.calcLineAmount();
#
# replacementLine.createLine(true,false, true, true, false, false, this.Reservation == ItemReservation::Automatic, true);
# }
# }
#
# returnTable.ReturnReplacementId = this.SalesId;
# returnTable.update();
#
# ttscommit;
#}
#
#
#
#
ENDSOURCE
SOURCE #copyThirdPartyAddressFromCust
#///
#/// Copies address to the SalesTable buffer.
#///
#///
#/// When customer has third party info, user is prompted if need copy to sales order.
#///
#void copyThirdPartyAddressFromCust()
#{
# CustTable fromCustTable;
# Address fromTPAddress;
# Address toTPAddress;
# SalesLine toSalesLine;
# Addressing oldThirdPartyBillingAddr;
# ;
#
# fromCustTable = this.custTable_CustAccount();
# fromTPAddress = Address::find(fromCustTable.TableId, fromCustTable.RecId, AddressType::ShipCarrierThirdPartyShipping);
# toTPAddress = Address::find(this.TableId, this.RecId, AddressType::ShipCarrierThirdPartyShipping, true);
#
# oldThirdPartyBillingAddr = toTPAddress.Address;
#
# if (toTPAddress)
# {
# ttsbegin;
# toTPAddress.delete();
#
# // Delete the third party addresses referenced by the sales lines
# delete_from toTPAddress
# exists join toSalesLine
# where toSalesLine.SalesId == this.SalesId
# && toTPAddress.AddrTableId == toSalesLine.TableId
# && toTPAddress.AddrRecId == toSalesLine.RecId
# && toTPAddress.Type == AddressType::ShipCarrierThirdPartyShipping;
#
# // Update the sales lines delivery information
# toSalesLine.skipDataMethods(true);
# update_recordset toSalesLine setting
# DeliveryName = fromCustTable.Name,
# ShipCarrierAccount = fromCustTable.ShipCarrierAccount,
# ShipCarrierAccountCode = fromCustTable.ShipCarrierAccountCode,
# ShipCarrierId = fromCustTable.ShipCarrierId,
# DlvMode = fromCustTable.DlvMode
# where toSalesLine.SalesId == this.SalesId
# notexists join toTPAddress
# where toTPAddress.AddrTableId == toSalesLine.TableId
# && toTPAddress.AddrRecId == toSalesLine.RecId
# && toTPAddress.Type == AddressType::ShipCarrierThirdPartyShipping;
#
# ttscommit;
# }
#
# if (!fromTPAddress)
# {
# return;
# }
#
# if (SalesParameters::find().PromptTransfer)
# {
# if (DialogButton::Yes == Box::yesNo("@SYS116932", DialogButton::Yes))
# {
# Address::copyThirdPartyAddress(fromTPAddress, this.TableId, this.RecId);
# ttsbegin;
# this.ShipCarrierAccount = fromTPAddress.ShipCarrierAccount;
# this.ShipCarrierAccountCode = fromTPAddress.ShipCarrierAccountCode;
# this.ShipCarrierId = fromTPAddress.ShipCarrierId;
# if (fromTPAddress.DlvTerm == '')
# {
# this.DlvTerm = fromCustTable.DlvTerm;
# }
# else
# {
# this.DlvTerm = fromTPAddress.DlvTerm;
# }
#
# if (fromTPAddress.DlvMode == '')
# {
# this.DlvMode = fromCustTable.DlvMode;
# }
# else
# {
# this.DlvMode = fromTPAddress.DlvMode;
# }
# this.ShipCarrierBlindShipment = fromTPAddress.ShipCarrierBlindShipment;
# this.ShipCarrierFuelSurcharge = fromCustTable.ShipCarrierFuelSurcharge;
# this.ShipCarrierResidential = fromTPAddress.ShipCarrierResidential;
#
# if (this.RecId)
# {
# this.update();
# }
# ttscommit;
#
# if (this.tpAddress() != oldThirdPartyBillingAddr && SalesLine::exist(this.SalesId))
# {
# if (SalesTable::promptCopyThirdPartyBillingAddress() == DialogButton::Yes)
# {
# this.copyThirdPartyBillingAddressToLine();
# }
# }
# }
# }
#}
ENDSOURCE
SOURCE #copyThirdPartyBillingAddressToLine
#server void copyThirdPartyBillingAddressToLine()
#{
# CustTable fromCustTable;
# SalesLine salesLine;
# Address fromTPAddress;
# ;
#
# fromCustTable = this.custTable_CustAccount();
# fromTPAddress = Address::find(this.TableId, this.RecId, AddressType::ShipCarrierThirdPartyShipping);
# ttsbegin;
#
# while select forupdate salesLine
# where salesLine.SalesId == this.SalesId
# {
# Address::copyThirdPartyAddress(fromTPAddress, salesLine.TableId, salesLine.RecId);
# salesLine.DeliveryName = fromCustTable.Name;
# salesLine.ShipCarrierAccount = fromTPAddress.ShipCarrierAccount;
# salesLine.ShipCarrierAccountCode = fromTPAddress.ShipCarrierAccountCode;
# salesLine.ShipCarrierId = fromTPAddress.ShipCarrierId;
# if (fromTPAddress.DlvMode == '')
# {
# salesLine.DlvMode = fromCustTable.DlvMode;
# }
# else
# {
# salesLine.DlvMode = fromTPAddress.DlvMode;
# }
# salesLine.update();
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #createCarrierInfoAndThirdPartyAddress
#///
#/// Initializes third party shipping address and carrier info.
#///
#void createCarrierInfoAndThirdPartyAddress()
#{
# Address tpAddr;
# CustTable custTable;
# DlvMode dlvMode;
# ;
#
# if (isConfigurationkeyEnabled(configurationkeynum(ShipCarrier)) &&
# !Address::find(this.TableId, this.RecId, AddressType::ShipCarrierThirdPartyShipping) )
# {
# custTable = CustTable::find(this.CustAccount);
# tpAddr = Address::find(custTable.TableId, custTable.RecId, AddressType::ShipCarrierThirdPartyShipping);
#
# //if the delivery mode has not been changed in create form,
# //and the customer has those info, copy from custTable
# if (this.DlvMode == custTable.DlvMode && tpAddr)
# {
# tpAddr.AddrTableId = this.TableId;
# tpAddr.AddrRecId = this.RecId;
# tpAddr.insert();
# }
# //otherwise, copy carrierID from dlvMode
# else
# {
# dlvMode = DlvMode::find(this.DlvMode);
# if (dlvMode && dlvMode.ShipCarrierId)
# {
# tpAddr.AddrTableId = this.TableId;
# tpAddr.AddrRecId = this.RecId;
# tpAddr.ShipCarrierId = dlvMode.ShipCarrierId;
# tpAddr.insert();
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #createMarkupTrans
#server void createMarkupTrans()
#{;
# if (this.markupAllowed())
# {
# Markup::insertMarkupTrans(HeadingLine::Heading,
# ModuleInventCustVend::Cust,
# this,
# this.CustAccount,
# this.MarkupGroup,
# this.CurrencyCode,
# this.LanguageId,
# '',
# this.MarkupGroup);
# }
#}
ENDSOURCE
SOURCE #CreateOneTimeAccount
#client server void createOneTimeAccount()
#{
# this.CustAccount = CustTable::createOneTimeAccount(this);
# this.initFromCustTable();
#
# if (!this.InvoiceAccount)
# this.InvoiceAccount = this.CustAccount;
#}
ENDSOURCE
SOURCE #CreatePaymentSched
#server void createPaymentSched()
#{
# CustVendPaymSched custVendPaymSched;
# SalesTotals salesTotals = SalesTotals::construct(this, SalesUpdate::All);
# ;
#
# salesTotals.prepareTotalAmountCalculation();
# salesTotals.calc();
#
# custVendPaymSched = CustVendPaymSched::construct(SysModule::Cust,this);
# custVendPaymSched.setSalesTotals(salesTotals);
# custVendPaymSched.createPaymSched(PaymSched::find(this.PaymentSched));
#}
ENDSOURCE
SOURCE #createReplacementOrderAllowed
#public boolean createReplacementOrderAllowed()
#{
# boolean ret = false;
# ;
# if (this.isInterCompanyOrder()
# && this.InterCompanyDirectDeliveryOrig)
# {
# ret = false;
# }
# else if (this.ReturnStatus == ReturnStatusHeader::Created
# && !this.ReturnReplacementId
# && this.existSalesLine()
# && !this.interCompanyReplacementRegistered())
# {
# ret = true;
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #createReturnMarkupTrans
#server void createReturnMarkupTrans()
#{;
# if (this.markupAllowed())
# {
# Markup::insertReturnMarkupTrans(HeadingLine::Heading,
# ModuleInventCustVend::Cust,
# this,
# this.CustAccount,
# this.MarkupGroup,
# this.LanguageId);
# }
#}
#
ENDSOURCE
SOURCE #creditCardAuthorizationCode
#///
#/// Returns the authorization code that came from the credit card processor.
#///
#///
#/// The authorization code returned by the credit card processor.
#///
#
#//BP Deviation Documented
#public display CreditCardAuthorization creditCardAuthorizationCode()
#{
# ;
#
# return CreditCardAuthTrans::findValidPreApproval(this.SalesId).Authorization;
#}
#
ENDSOURCE
SOURCE #creditCardBypassCreditLimit
#boolean creditCardBypassCreditLimit()
#{
# boolean ret;
# ;
# ret = this.payment().CreditCardCreditCheck == CreditCardCreditCheck::ByPass;
# return ret;
#}
ENDSOURCE
SOURCE #creditCardPreauthorizationAmount
#///
#/// Returns the preauthorization amount charged to the credit card.
#///
#///
#/// The preauthorization amount for the credit card.
#///
#
#//BP Deviation Documented
#public display CreditCardPreauthorizationAmount creditCardPreauthorizationAmount()
#{
# ;
#
# return CreditCardAuthTrans::findValidPreApproval(this.SalesId).ApprovalAmountCur;
#}
ENDSOURCE
SOURCE #customerEmail
#//BP Deviation documented
#display Email customerEmail()
#{
# return this.custTable_CustAccount().Email;
#}
#
ENDSOURCE
SOURCE #CustomerName
#//BP Deviation documented
#display CustName customerName()
#{
# return this.custTable_CustAccount().Name;
#}
#
ENDSOURCE
SOURCE #customerPhone
#//BP Deviation documented
#display Phone customerPhone()
#{
# return this.custTable_CustAccount().Phone;
#}
#
ENDSOURCE
SOURCE #custTable_CustAccount
#CustTable custTable_CustAccount(boolean _forUpdate = false)
#{
# return CustTable::find(this.CustAccount, _forUpdate);
#}
ENDSOURCE
SOURCE #custTable_InvoiceAccount
#CustTable custTable_InvoiceAccount(boolean _forUpdate = false)
#{
# return CustTable::find(this.InvoiceAccount, _forUpdate);
#}
ENDSOURCE
SOURCE #delete
#public void delete()
#{
# SalesTableType salesTableType;
# ;
#
# salesTableType = this.type();
# salesTableType.delete();
#
# TradeBLWIJournalPurposeCodes::deleteRecord(this.RecId, TradeBLWITypeOfForm::SalesTable);
#
# // Update the CRM transaction log
# smmTransLog::initTrans(this, smmLogAction::delete);
#}
ENDSOURCE
SOURCE #deliveryAddress
#public Address deliveryAddress()
#{
# Address address;
# ;
# address.CountryRegionId = this.DeliveryCountryRegionId;
# address.County = this.DeliveryCounty;
# address.Email = this.Email;
# address.Name = this.DeliveryName;
# address.State = this.DeliveryState;
# address.url = this.url;
# address.ZipCode = this.DeliveryZipCode;
# address.Street = this.DeliveryStreet;
# address.City = this.DeliveryCity;
# address.Address = this.DeliveryAddress;
#
# return address;
#}
#
ENDSOURCE
SOURCE #deliveryDate
#//BP Deviation documented
#display DlvDate deliveryDate(DlvDate _blankDate = dateNull())
#
#{
# if (this.ShippingDateConfirmed || this.ShippingDateRequested)
# return this.ShippingDateConfirmed ? this.ShippingDateConfirmed : this.ShippingDateRequested;
#
# if (prmisdefault(_blankDate))
# {
# return InventOrderEntryDeadlineTable::effectiveOrderDate(this.InventSiteId,CustTable::find(this.CustAccount).OrderEntryDeadlineGroupId);
# }
# return _blankDate;
#}
ENDSOURCE
SOURCE #dlvModeMandatory
#boolean dlvModeMandatory()
#{;
# if (this.SalesType == SalesType::ReturnItem)
#{
# return false;
# }
#
# if (this.payment().PaymMethod == NetCurrent::COD)
# {
# return true;
# }
#
# return false;
#}
#
ENDSOURCE
SOURCE #editContactPersonName
#//BP Deviation documented
#client server
#edit ContactPersonName editContactPersonName(boolean _set, ContactPersonName _name)
#{
# ContactPersonName name = _name;
# ContactPerson contactPerson;
# ContactPersonId contactPersonId;
#
# if (_set)
# {
# if (name)
# {
# contactPersonId = this.ContactPersonId;
# contactPerson = ContactPerson::find(_name);
# this.ContactPersonId = contactPerson.ContactPersonId;
# if (this.ContactPersonId)
# {
# name = contactPerson.Name;
# }
# else
# {
# select contactPerson
# where contactPerson.CustAccount == this.CustAccount &&
# contactPerson.Name like name;
# if (contactPerson)
# {
# this.ContactPersonId=contactPerson.ContactPersonId;
# name=contactPerson.Name;
# }
# }
# if (contactPersonId != this.ContactPersonId)
# {
# if (this.checkContactPerson())
# {
# this.initFromContactInfo();
# if (this.dataSource())
# this.dataSource().refresh();
# }
# else
# {
# this.ContactPersonId = contactPersonId;
# }
#
# }
# }
# else
# {
# this.ContactPersonId='';
# }
# }
# else
# {
# name = this.contactPersonName();
# }
#
# return name;
#}
#
#
ENDSOURCE
SOURCE #editCreditCard
#//BP deviation documented
#client server edit CreditCardNumber editCreditCard(boolean _set, TempStr _refCCId)
#{
# RecId recId = str2int64(_refCCId);
# CreditCardNumber creditCardNumber;
# ;
#
# if (_set)
# {
# if (this.validateField(fieldnum(SalesTable, CreditCardCustRefId)))
# {
# if (recId)
# {
# this.CreditCardCustRefId = CreditCardCust::find(recId).RecId;
# if (this.CreditCardCustRefId)
# {
# creditCardNumber = CreditCard::creditCardNumber(this.CreditCardCustRefId);
# }
# }
# else
# {
# this.CreditCardCustRefId = 0;
# }
#
# return creditCardNumber;
# }
# }
#
# if (this.CreditCardCustRefId)
# {
# // Double check to make sure the record hasn't been deleted
# this.CreditCardCustRefId = CreditCardCust::find(this.CreditCardCustRefId).RecId;
# if (this.CreditCardCustRefId)
# {
# creditCardNumber = CreditCard::creditCardNumber(this.CreditCardCustRefId);
# }
# else
# {
# this.CreditCardCustRefId = 0;
# }
# }
# else
# {
# this.CreditCardCustRefId = 0;
# }
#
# return creditCardNumber;
#}
#
ENDSOURCE
SOURCE #editFixedExchRate
#//BP Deviation documented
#public edit SalesFixedExchRate editFixedExchRate(boolean set, SalesFixedExchRate _exchRate)
#{
# if (set)
# {
# this.FixedExchRate = ExchRates::setExchRate(_exchRate);
# }
# else
# {
# _exchRate = ExchRates::displayExchRate(this.FixedExchRate);
# }
#
# return _exchRate;
#}
ENDSOURCE
SOURCE #euroTriangulation
#EUROTriangulation euroTriangulation(date _date = systemdateget())
#{
# if (this.SettleVoucher == SettlementType::SelectedTransact && SalesParameters::find().UseSettleExchRate)
# {
# if (this.settleExchRate())
# {
# return NoYes::No;
# }
# }
#
# if (this.FixedExchRate)
# {
# return NoYes::No;
# }
#
# return Currency::triangulation(this.CurrencyCode, _date);
#}
ENDSOURCE
SOURCE #exchRate
#CustExchRate exchRate(date _date = systemdateget(), boolean throwOnError = false)
#{
# CustExchRate exchRate = 0;
# ;
# if (this.SettleVoucher == SettlementType::SelectedTransact && SalesParameters::find().UseSettleExchRate)
# {
# exchRate = this.settleExchRate(throwOnError);
# }
#
# if (!exchRate)
# {
# if (this.FixedExchRate)
# {
# exchRate = this.FixedExchRate;
# }
# else
# {
# exchRate = Currency::exchRate(this.CurrencyCode, _date);
# }
# }
#
# return exchRate;
#}
ENDSOURCE
SOURCE #exchRateSecondary
#ExchrateSecondary exchRateSecondary(date _date = systemdateget())
#{
# ExchRate exchRateSecondary;
# ;
#
# if (this.SettleVoucher == SettlementType::SelectedTransact &&
# SalesParameters::find().UseSettleExchRate &&
# (SpecTrans::getSpecTransCount(this.company(), this.TableId, this.RecId) > 0))
# {
# exchRateSecondary = 0;
# }
# else if (this.FixedExchRate)
# {
# exchRateSecondary = 0;
# }
# else
# {
# exchRateSecondary = Currency::exchRateSecond(this.CurrencyCode, _date);
# }
#
# return exchRateSecondary;
#}
ENDSOURCE
SOURCE #existDirectDelivery
#boolean existDirectDelivery()
#{
# SalesLine salesLine;
# ;
#
# select firstonly salesLine where
# salesLine.SalesId == this.SalesId &&
# salesLine.InventRefId != '' &&
# salesLine.DeliveryType == TradeLineDlvType::DropShip;
#
# return salesLine.RecId != 0;
#}
ENDSOURCE
SOURCE #existingJournals
#server container existingJournals()
#{
# return[this.lastQuotation(),
# this.lastConfirm(),
# this.lastPickingList(),
# this.lastPackingSlip(),
# this.lastInvoice()];
#}
ENDSOURCE
SOURCE #existInterCompanyPurch
#boolean existInterCompanyPurch()
#{
# InterCompanyPurchSalesReference interCompanyPurchSalesReference;
#;
# select firstonly RecId from interCompanyPurchSalesReference
# index hint SalesPurchIdx
# where interCompanyPurchSalesReference.SalesId == this.SalesId;
#
# return interCompanyPurchSalesReference.RecId ? true : false;
#}
ENDSOURCE
SOURCE #existInterCompanySales
#boolean existInterCompanySales(boolean _checkOnlyOne = false)
#{
# InterCompanyPurchSalesReference interCompanyPurchSalesReference;
# PurchTable purchTable;
#;
# select forceplaceholders firstonly RecId from interCompanyPurchSalesReference
# index hint SalesPurchIdx
# where interCompanyPurchSalesReference.SalesId == this.SalesId
# join RecId from purchTable
# index hint PurchIdx
# where purchTable.PurchId == interCompanyPurchSalesReference.PurchId
# && purchTable.InterCompanyOrder
# && (!_checkOnlyOne
# || ( _checkOnlyOne && purchTable.InterCompanyOriginalSalesId == this.SalesId));
#
# return purchTable.RecId ? true : false;
#}
ENDSOURCE
SOURCE #existMarkedSettlement
#boolean existMarkedSettlement(fieldId _fieldId)
#{
# if (this.SettleVoucher && SpecTrans::getSpecTransCount(this.DataAreaId, this.TableId, this.RecId))
# {
# switch(_fieldId)
# {
# case fieldnum(SalesTable, CustAccount): error("@SYS99928");
# break;
#
# case fieldnum(SalesTable, InvoiceAccount): error("@SYS100001");
# break;
#
# default: return false;
# }
# return true;
# }
#
# return false;
#}
ENDSOURCE
SOURCE #existNonCanceledLines
#public boolean existNonCanceledLines()
#{
# SalesLine salesLine;
# ;
#
# select firstonly salesLine where salesLine.SalesId == this.SalesId && salesLine.ReturnStatus != ReturnStatusLine::Canceled;
#
# return salesLine.RecId != 0;
#}
ENDSOURCE
SOURCE #existRegisteredReceivedInvoicedLines
#public boolean existRegisteredReceivedInvoicedLines()
#{
# boolean ret;
# SalesLine salesLine;
# InterCompanyPurchSalesReference interCompanyPurchSalesReference;
# PurchTable purchTable;
# SalesTable salesTable;
# ;
# select firstonly salesLine
# where salesLine.SalesId == this.SalesId
# && (salesLine.ReturnStatus == ReturnStatusLine::Registered
# || salesLine.ReturnStatus == ReturnStatusLine::Quarantine
# || salesLine.ReturnStatus == ReturnStatusLine::Received
# || salesLine.ReturnStatus == ReturnStatusLine::Invoiced);
#
# ret = salesLine.RecId != 0;
#
# if (!ret)
# {
# while select interCompanyPurchSalesReference
# where interCompanyPurchSalesReference.SalesId == this.SalesId
# join purchTable
# where purchTable.PurchId == interCompanyPurchSalesReference.PurchId
# && purchTable.InterCompanyOrder
# {
# changecompany(purchTable.InterCompanyCompanyId)
# {
# salesTable = null;
# salesTable = SalesTable::find(purchTable.InterCompanySalesId);
# ret = salesTable.existRegisteredReceivedInvoicedLines();
# }
# if (ret)
# break;
# }
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #existSalesLine
#boolean existSalesLine()
#{
# Query query;
# QueryRun queryRun;
# SalesLine salesLine;
# ;
# query = this.querySalesLine();
# query.dataSourceTable(tablenum(SalesLine)).firstOnly(true);
#
# queryRun = new QueryRun(query);
# while (queryRun.next())
# {
# if (queryRun.changed(tablenum(SalesLine)))
# {
# salesLine = queryRun.get(tablenum(SalesLine));
# if (salesLine.RecId)
# {
# break;
# }
# }
# }
#
# return salesLine.RecId != 0;
#}
ENDSOURCE
SOURCE #existShippedNotInvoiced
#public boolean existShippedNotInvoiced()
#{
# SalesLine salesLine;
# InventTrans inventTrans;
# ;
#
# select firstonly RecId from inventTrans
# where (inventTrans.StatusIssue == StatusIssue::Deducted) ||
# (inventTrans.StatusReceipt == StatusReceipt::Received)
# join salesLine
# where (salesLine.InventTransId == inventTrans.InventTransId) &&
# (salesLine.SalesId == this.SalesId);
#
# return (inventTrans.RecId!= 0);
#}
ENDSOURCE
SOURCE #fieldChanged
#boolean fieldChanged(fieldId fieldId)
#{
# boolean ok = false;
# ;
#
# if (!this.RecId)
# ok = true;
#
# if (this.orig().(fieldId) != this.(fieldId))
# ok = true;
#
# return ok;
#}
ENDSOURCE
SOURCE #fixedEuroTriangulation
#UnknownNoYes fixedEuroTriangulation()
#{
# if (this.SettleVoucher == SettlementType::SelectedTransact && SalesParameters::find().UseSettleExchRate)
# {
# if (this.settleExchRate())
# {
# return UnknownNoYes::No;
# }
# }
#
# if (this.FixedExchRate)
# {
# return UnknownNoYes::No;
# }
#
# return UnknownNoYes::Unknown;
#}
ENDSOURCE
SOURCE #fixedExchRate
#CustExchRate fixedExchRate(boolean throwOnError = false)
#{
# ExchRate exchRate = 0;
# ;
# if (this.SettleVoucher == SettlementType::SelectedTransact && SalesParameters::find().UseSettleExchRate)
# {
# exchRate = this.settleExchRate(throwOnError);
# }
#
# if (!exchRate)
# {
# exchRate = this.FixedExchRate;
# }
#
# return exchRate;
#}
ENDSOURCE
SOURCE #fixedExchRateSecondary
#ExchrateSecondary fixedExchRateSecondary()
#{
#/*
#// Should always return zero
# return (this.FixedExchRate ? 0 : 0);
#*/
# return (0);
#}
#
ENDSOURCE
SOURCE #hasCODPaymentMethod
#///
#/// Checks if the sales order's payment method is COD.
#///
#///
#/// true if the payment method is COD; otherwise, false.
#///
#public boolean hasCODPaymentMethod()
#{
# ;
#
# return this.payment().PaymMethod == NetCurrent::COD;
#}
ENDSOURCE
SOURCE #initDefaultReturnAddress
#public void initDefaultReturnAddress()
#{
# CompanyInfo companyInfo = CompanyInfo::find();
# Address address = Address::find(companyInfo.TableId, companyInfo.RecId, AddressType::Delivery);
# ;
#
# if (address)
# {
# this.setAddress(address);
# }
# else
# {
# this.DeliveryName = companyInfo.Name;
# this.DeliveryAddress = companyInfo.Address;
# this.DeliveryZipCode = companyInfo.ZipCode;
# this.DeliveryCountryRegionId = companyInfo.CountryRegionId;
# this.DeliveryState = companyInfo.State;
# this.DeliveryCounty = companyInfo.County;
# this.DeliveryStreet = companyInfo.Street;
# this.DeliveryCity = companyInfo.City;
# this.AddressRefRecId = companyInfo.RecId;
# this.AddressRefTableId = companyInfo.TableId;
# }
#}
ENDSOURCE
SOURCE #initFromContactInfo
#void initFromContactInfo()
#{
# ContactPerson contactPerson = this.contactPerson();
#
# if (this.ContactPersonId && contactPerson.Email)
# this.Email = contactPerson.Email;
# else
# this.Email = this.custTable_CustAccount().Email;
#
# if (this.ContactPersonId && contactPerson.url)
# this.url = contactPerson.url;
#}
#
ENDSOURCE
SOURCE #initFromCustConfirmJour
#void initFromCustConfirmJour(CustConfirmJour custConfirmJour)
#{
# this.DlvTerm = custConfirmJour.DlvTerm;
# this.DlvMode = custConfirmJour.DlvMode;
# this.LanguageId = custConfirmJour.LanguageId;
# this.Payment = custConfirmJour.Payment;
# this.CashDisc = custConfirmJour.CashDiscCode;
# this.CurrencyCode = custConfirmJour.CurrencyCode;
# this.Dimension = this.copyDimension(custConfirmJour.Dimension);
# this.InclTax = custConfirmJour.InclTax;
#}
ENDSOURCE
SOURCE #initFromCustInvoiceJour
#void initFromCustInvoiceJour(CustInvoiceJour custInvoiceJour)
#{
# this.LanguageId = custInvoiceJour.LanguageId;
# this.Payment = custInvoiceJour.Payment;
# this.NumberSequenceGroup = custInvoiceJour.NumberSequenceGroup;
# this.CashDisc = custInvoiceJour.CashDiscCode;
#
# if(TaxParameters::find().CashDiscOnInvoice)
# this.CashDiscPercent = custInvoiceJour.CashDiscPercent;
#
# this.CurrencyCode = custInvoiceJour.CurrencyCode;
# this.DlvTerm = custInvoiceJour.DlvTerm;
# this.DlvMode = custInvoiceJour.DlvMode;
# this.Dimension = this.copyDimension(custInvoiceJour.Dimension);
# this.InclTax = custInvoiceJour.InclTax;
# this.SalesOriginId = custInvoiceJour.SalesOriginId;
# this.setShipCarrierInformation(null, null, custInvoiceJour);
#}
ENDSOURCE
SOURCE #initFromCustPackingSlipJour
#void initFromCustPackingSlipJour(CustPackingSlipJour custPackingSlipJour)
#{;
# this.LanguageId = custPackingSlipJour.LanguageId;
# this.DlvTerm = custPackingSlipJour.DlvTerm;
# this.DlvMode = custPackingSlipJour.DlvMode;
# this.DlvReason = custPackingSlipJour.DlvReason;
# this.Dimension = this.copyDimension(custPackingSlipJour.Dimension);
# this.setShipCarrierInformation(null, custPackingSlipJour);
#}
ENDSOURCE
SOURCE #initFromCustQuotationJour
#void initFromCustQuotationJour(CustQuotationJour custQuotationJour)
#{
# this.DlvTerm = custQuotationJour.DlvTerm;
# this.DlvMode = custQuotationJour.DlvMode;
# this.LanguageId = custQuotationJour.LanguageId;
# this.Payment = custQuotationJour.Payment;
# this.CashDisc = custQuotationJour.CashDiscCode;
# this.CurrencyCode = custQuotationJour.CurrencyCode;
# this.Dimension = this.copyDimension(custQuotationJour.Dimension);
# this.InclTax = custQuotationJour.InclTax;
#}
ENDSOURCE
SOURCE #InitFromCustTable
#server void initFromCustTable()
#{
# Address address;
# CustTable custTable = this.custTable_CustAccount();
# CustTable custTable_InvoiceAccount;
# CustParameters custParameters;
# DlvMode dlvMode;
# boolean useInvoiceAccount = false;
# ;
# custParameters = CustParameters::find();
#
# this.CustAccount = custTable.AccountNum;
# this.SalesName = custTable.Name;
# this.DeliveryName = custTable.Name;
#
# this.DeliveryAddress = custTable.Address;
# this.DeliveryZipCode = custTable.ZipCode;
# this.DeliveryCounty = custTable.County;
# this.DeliveryCountryRegionId = custTable.CountryRegionId;
# this.DeliveryState = custTable.State;
# this.DeliveryStreet = custTable.Street;
# this.DeliveryCity = custTable.City;
# this.AddressRefRecId = custTable.RecId;
# this.AddressRefTableId = custTable.TableId;
#
# this.setTaxGroup(TaxSales::custTaxGroup(custTable.DlvTerm, custTable.TaxGroup));
# this.InclTax = custTable.InclTax;
# this.PriceGroupId = custTable.PriceGroup;
# this.LineDisc = custTable.LineDisc;
# this.MultiLineDisc = custTable.MultiLineDisc;
# this.EndDisc = custTable.EndDisc;
# this.MarkupGroup = custTable.MarkupGroup;
# this.url = custTable.url;
# this.Email = custTable.Email;
# this.FreightZone = custTable.FreightZone;
# this.SalesGroup = custTable.SalesGroup;
# this.CommissionGroup = custTable.CommissionGroup;
# this.InventLocationId = custTable.InventLocation;
# this.setInventSiteId(custTable.InventSiteId);
#
# this.LanguageId = custTable.LanguageId;
#
# this.CurrencyCode = custTable.Currency;
# this.InvoiceAccount = custTable.InvoiceAccount ? custTable.InvoiceAccount
# : custTable.AccountNum;
# custTable_InvoiceAccount = this.custTable_InvoiceAccount();
# this.vatNum = custTable.vatNum;
# this.EnterpriseNumber = custTable.EnterpriseNumber;
# this.NumberSequenceGroup = custTable_InvoiceAccount.NumberSequenceGroup;
#
# switch(custParameters.UseFiscalInvoiceAccount)
# {
# case UseFiscalInvoiceAccount::Always:
# useInvoiceAccount = true;
# break;
# case UseFiscalInvoiceAccount::Ask:
# if(this.CustAccount != this.InvoiceAccount)
# {
# if (Box::yesNo("@SYS112098"+'\n\n'+this.InvoiceAccount+'\n\n'+CustTable::promptAddress(this.InvoiceAccount, AddressType::Delivery),DialogButton::Yes)==DialogButton::Yes)
# {
# useInvoiceAccount = true;
# }
# }
# break;
# case UseFiscalInvoiceAccount::Never:
# break;
# }
#
# if(useInvoiceAccount)
# {
# this.vatNum = custTable_InvoiceAccount.vatNum;
# this.setTaxGroup(TaxSales::custTaxGroup(custTable_InvoiceAccount.DlvTerm, custTable_InvoiceAccount.TaxGroup));
# if(custParameters.CustNameFromVATNum)
# {
# this.setNameUsingVATNum(custTable_InvoiceAccount.vatNum,
# custTable_InvoiceAccount.CountryRegionId,
# custTable_InvoiceAccount.Name,
# custParameters);
# }
# }
# else
# {
# if(custParameters.CustNameFromVATNum)
# {
# this.setNameUsingVATNum(this.vatNum,
# this.DeliveryCountryRegionId,
# this.DeliveryName,
# custParameters);
# }
# }
#
# this.initFromCustTableMandatoryFields();
#
# this.Dimension = this.copyDimension(custTable.Dimension);
# this.DlvTerm = custTable.DlvTerm;
# this.DlvMode = custTable.DlvMode;
# this.DlvReason = custTable.DlvReason;
# this.CashDisc = custTable.CashDisc;
# dlvMode = DlvMode::find(custTable.DlvMode);
# if (this.DlvMode)
# {
# this.ShipCarrierId = dlvMode.ShipCarrierId;
# this.ShipCarrierAccountCode = dlvMode.ShipCarrierAccountCode;
# this.ShipCarrierDlvType = dlvMode.ShipCarrierDlvType;
# }
#
# if(custTable.CashDisc)
# this.CashDiscPercent = CashDisc::find(custTable.CashDisc).Percent;
#
# this.Payment = custTable.PaymTermId;
# this.initFromPayment();
# if (custTable.PaymSched)
# {
# this.PaymentSched = custTable.PaymSched;
# }
# this.PaymMode = custTable.PaymMode;
# this.PaymSpec = custTable.PaymSpec;
#
# this.PostingProfile = CustParameters::find().PostingProfile;
# this.CashDisc = custTable.CashDisc;
#
# this.CreditCardCustRefId = 0;
#
# address = DirPartyAddress::findAddress(custTable, AddressType::Delivery);
# if (address)
# {
# this.setAddress(address);
# }
#
# this.ContactPersonId = custTable.ContactPersonId;
# this.initFromContactInfo();
#
# this.setListCode();
#
# this.SalesPoolId = SalesParameters::find().SalesPoolId;
# if (custTable.SalesPoolId)
# this.SalesPoolId = custTable.SalesPoolId;
#
# this.GiroType = custTable.GiroType;
#
# this.ItemTagging = custTable.rfidItemTagging;
# this.CaseTagging = custTable.rfidCaseTagging;
# this.PalletTagging = custTable.rfidPalletTagging;
#
# this.InterCompanyOrder = custTable.interCompanyAccount();
# if (this.InterCompanyOrder)
# this.InterCompanyCompanyId = custTable.interCompanyCompanyId();
# if (this.SalesType == SalesType::ItemReq
# || this.SalesType == SalesType::ReturnItem)
# {
# this.InterCompanyAutoCreateOrders = false;
# this.InterCompanyDirectDelivery = false;
# }
# else
# {
# this.InterCompanyAutoCreateOrders = custTable.InterCompanyAutoCreateOrders;
# this.InterCompanyDirectDelivery = custTable.InterCompanyDirectDelivery;
# }
# this.InterCompanyAllowIndirectCreation = custTable.InterCompanyAllowIndirectCreation;
# if (CustParameters::find().CustPaym_NO == NoYes::Yes)
# {
# this.BankCentralBankPurposeCode = custTable.BankCentralBankPurposeCode;
# this.BankCentralBankPurposeText = custTable.BankCentralBankPurposeText;
# }
#
# this.ShipCarrierFuelSurcharge = custTable.ShipCarrierFuelSurcharge;
# if (!address)
# {
# address = Address::find(
# tablenum(DirPartyTable),
# DirPartyTable::find(custTable.PartyId).RecId,
# AddressType::Invoice);
# }
# this.ShipCarrierResidential = address.ShipCarrierResidential;
# this.ShipCarrierBlindShipment = address.ShipCarrierBlindShipment;
# this.ShipCarrierAccount = address.ShipCarrierAccount;
# dlvMode = DlvMode::find(address.DlvMode);
# if (dlvMode)
# {
# this.DlvMode = address.DlvMode;
# this.ShipCarrierId = dlvMode.ShipCarrierId;
# this.ShipCarrierAccountCode = dlvMode.ShipCarrierAccountCode;
# this.ShipCarrierDlvType = dlvMode.ShipCarrierDlvType;
# }
# if (address.DlvTerm)
# {
# this.DlvTerm = address.DlvTerm;
# }
#}
#
ENDSOURCE
SOURCE #initFromCustTableMandatoryFields
#server void initFromCustTableMandatoryFields()
#{
# CustTable custTable = this.custTable_CustAccount();
# ;
#
# this.CustGroup = custTable.CustGroup;
#}
#
ENDSOURCE
SOURCE #initFromPayment
#void initFromPayment()
#{
# this.PaymentSched = this.payment().PaymSched;
# this.FixedDueDate = dateNull();
#}
ENDSOURCE
SOURCE #initFromProjInvoiceJour
#void initFromProjInvoiceJour(ProjInvoiceJour projInvoiceJour)
#{
# this.LanguageId = projInvoiceJour.LanguageId;
# this.Payment = projInvoiceJour.Payment;
# this.NumberSequenceGroup = projInvoiceJour.NumberSequenceGroupId;
# this.CashDisc = projInvoiceJour.CashDiscCode;
#
# if(TaxParameters::find().CashDiscOnInvoice)
# this.CashDiscPercent = projInvoiceJour.CashDiscPercent;
#
# this.CurrencyCode = projInvoiceJour.CurrencyId;
# this.DlvTerm = projInvoiceJour.DlvTerm;
# this.DlvMode = projInvoiceJour.DlvMode;
# this.Dimension = this.copyDimension(projInvoiceJour.Dimension);
#}
#
ENDSOURCE
SOURCE #initFromProjInvoiceTable
#void initFromProjInvoiceTable()
#{
# ProjTable projTable;
# ProjInvoiceTable projInvoiceTable;
# ;
# projTable = this.projTable();
# projInvoiceTable = projTable.projInvoice();
#
# this.TransactionCode = projInvoiceTable.TransactionCodeId;
# this.Listcode = projInvoiceTable.ListCodeId;
# this.Dimension = this.copyDimension(projTable.Dimension);
# this.Payment = projInvoiceTable.Payment;
#
# this.FixedExchRate = ProjInvoiceCurrency::find(projInvoiceTable.ProjInvoiceProjId,this.CurrencyCode).ExchRate;
#
# if (CustParameters::find().CustPaym_NO == NoYes::Yes)
# {
# this.BankCentralBankPurposeCode = projInvoiceTable.BankCentralBankPurposeCode;
# this.BankCentralBankPurposeText = projInvoiceTable.BankcentralBankPurposeText;
# }
#
#}
ENDSOURCE
SOURCE #initFromProjTable
#void initFromProjTable(ProjTable _projTable)
#{
# if(_projTable.RecId)
# {
# this.ProjId = _projTable.ProjId;
# this.CustAccount = _projTable.CustAccount;
#
# this.initFromCustTable();
#
# this.InvoiceAccount = _projTable.type().invoiceAccount();
# this.initInvoiceAccount();
#
# this.initFromProjInvoiceTable();
#
# this.CurrencyCode = _projTable.currencyId();
# this.InclTax = NoYes::No;
# this.DeliveryName = _projTable.DlvName;
# this.DeliveryAddress = _projTable.DlvAddr;
# this.DeliveryStreet = _projTable.DeliveryStreet;
# this.DeliveryZipCode = _projTable.DlvZipCode;
# this.DeliveryCity = _projTable.DeliveryCity;
# this.DeliveryCountryRegionId = _projTable.DlvCountryRegionId;
# this.DeliveryCounty = _projTable.DlvCounty;
# this.DeliveryState = _projTable.DlvState;
# }
#
#}
#
#
#
ENDSOURCE
SOURCE #initFromSalesBasket
#void initFromSalesBasket(SalesBasket salesBasket)
#{
# this.ContactPersonId = salesBasket.ContactPersonId;
#
# this.DeliveryDateControlType = SalesDeliveryDateControlType::None;
# this.ShippingDateRequested = salesBasket.DeliveryDate;
# this.ReceiptDateRequested = salesBasket.DeliveryDate;
#}
#
ENDSOURCE
SOURCE #initFromSalesQuotationTable
#void initFromSalesQuotationTable(SalesQuotationTable _salesQuotationTable)
#{
# ;
# this.QuotationId = _salesQuotationTable.QuotationId;
#
# this.CustAccount = _salesQuotationTable.CustAccount;
# this.initFromCustTable();
#
# this.CurrencyCode = _salesQuotationTable.CurrencyCode;
#
# if (_salesQuotationTable.InvoiceAccount)
# {
# this.InvoiceAccount = _salesQuotationTable.InvoiceAccount;
# }
#
# this.SmmCampaignId = _salesQuotationTable.CampaignId;
#
# this.SalesName = _salesQuotationTable.QuotationName;
# this.DeliveryDate = _salesQuotationTable.DeliveryDate;
# this.Deadline = _salesQuotationTable.QuotationExpiryDate;
#
# this.ContactPersonId = _salesQuotationTable.ContactPersonId;
# this.CustomerRef = _salesQuotationTable.CustomerRef;
# this.PurchOrderFormNum = _salesQuotationTable.CustPurchaseOrder;
# this.Dimension = this.copyDimension(_salesQuotationTable.Dimension);
# this.DeliveryName = _salesQuotationTable.DeliveryName;
#
# this.TransactionCode = _salesQuotationTable.TransactionCode;
# this.Transport = _salesQuotationTable.Transport;
# this.Port = _salesQuotationTable.Port;
# this.StatProcId = _salesQuotationTable.StatProcId;
# this.Listcode = _salesQuotationTable.Listcode;
# this.CountyOrigDest = _salesQuotationTable.CountyOrigDest;
#
# if (_salesQuotationTable.DeliveryAddress)
# {
# this.DeliveryAddress = _salesQuotationTable.DeliveryAddress;
# this.DeliveryCity = _salesQuotationTable.DeliveryCity;
# this.DeliveryCounty = _salesQuotationTable.DeliveryCounty;
# this.DeliveryCountryRegionId= _salesQuotationTable.DeliveryCountryRegionId;
# this.DeliveryState = _salesQuotationTable.DeliveryState;
# this.DeliveryStreet = _salesQuotationTable.DeliveryStreet;
# this.DeliveryZipCode = _salesQuotationTable.DeliveryZipCode;
# this.AddressRefRecId = _salesQuotationTable.RecId;
# this.AddressRefTableId = _salesQuotationTable.TableId;
# }
#
# this.vatNum = _salesQuotationTable.vatNum;
# this.TaxGroup = _salesQuotationTable.TaxGroup;
# this.InclTax = _salesQuotationTable.InclTax;
#
# this.CashDisc = _salesQuotationTable.CashDisc;
#
# if(TaxParameters::find().CashDiscOnInvoice)
# this.CashDiscPercent = _salesQuotationTable.CashDiscPercent;
#
# this.DiscPercent = _salesQuotationTable.DiscPercent;
# this.EndDisc = _salesQuotationTable.EndDisc;
# this.LineDisc = _salesQuotationTable.LineDisc;
# this.MultiLineDisc = _salesQuotationTable.MultiLineDisc;
# this.CommissionGroup = _salesQuotationTable.CommissionGroup;
#
# this.DlvMode = _salesQuotationTable.DlvMode;
# this.DlvTerm = _salesQuotationTable.DlvTerm;
#
# this.SalesGroup = _salesQuotationTable.SalesGroup;
# this.PriceGroupId = _salesQuotationTable.PriceGroupId;
# this.MarkupGroup = _salesQuotationTable.MarkupGroup;
# this.Payment = _salesQuotationTable.Payment;
# this.PostingProfile = _salesQuotationTable.PostingProfile;
# this.SalesResponsible = _salesQuotationTable.SalesResponsible;
# this.SalesTaker = _salesQuotationTable.SalesTaker;
# this.SalesUnitId = _salesQuotationTable.SalesUnitId;
#
# this.ShippingDateRequested = _salesQuotationTable.ShippingDateRequested;
# this.ReceiptDateRequested = _salesQuotationTable.ReceiptDateRequested;
# this.InventLocationId = _salesQuotationTable.InventLocationId;
# this.setInventSiteId(_salesQuotationTable.InventSiteId);
#}
ENDSOURCE
SOURCE #initFromSalesTable
#void initFromSalesTable(SalesTable salesTable)
#{
# this.LanguageId = salesTable.LanguageId;
# this.Payment = salesTable.Payment;
# this.PaymMode = salesTable.PaymMode;
# this.PaymSpec = salesTable.PaymSpec;
# this.NumberSequenceGroup = salesTable.NumberSequenceGroup;
# this.CashDisc = salesTable.CashDisc;
# this.CurrencyCode = salesTable.CurrencyCode;
# this.DlvTerm = salesTable.DlvTerm;
# this.DlvMode = salesTable.DlvMode;
# this.DlvReason = salesTable.DlvReason;
# this.Dimension = this.copyDimension(salesTable.Dimension);
# this.setTaxGroup(salesTable.TaxGroup);
# this.InclTax = salesTable.InclTax;
# this.Transport = salesTable.Transport;
# this.Port = salesTable.Port;
# this.StatProcId = salesTable.StatProcId;
#
# this.DeliveryName = salesTable.DeliveryName;
# this.DeliveryAddress = salesTable.DeliveryAddress;
# this.DeliveryZipCode = salesTable.DeliveryZipCode;
# this.DeliveryCountryRegionId = salesTable.DeliveryCountryRegionId;
# this.DeliveryState = salesTable.DeliveryState;
# this.DeliveryCounty = salesTable.DeliveryCounty;
# this.DeliveryStreet = salesTable.DeliveryStreet;
# this.DeliveryCity = salesTable.DeliveryCity;
# this.AddressRefRecId = salesTable.RecId;
# this.AddressRefTableId = salesTable.TableId;
# this.setShipCarrierInformation(salesTable);
#}
ENDSOURCE
SOURCE #InitInvoiceAccount
#void initInvoiceAccount()
#{
# CustTable custTable;
# ;
# custTable = this.custTable_InvoiceAccount();
#
# this.NumberSequenceGroup = custTable.NumberSequenceGroup;
# this.Payment = custTable.PaymTermId;
# this.initFromPayment();
# if (custTable.PaymSched)
# {
# this.PaymentSched = custTable.PaymSched;
# }
# this.PaymMode = custTable.PaymMode;
# this.PaymSpec = custTable.PaymSpec;
# this.CashDisc = custTable.CashDisc;
# this.setListCode();
#}
ENDSOURCE
SOURCE #initReturnFromSalesTable
#void initReturnFromSalesTable(SalesTable _other)
#{
# this.CustAccount = _other.CustAccount;
# this.CustGroup = _other.CustGroup;
# this.InvoiceAccount = _other.InvoiceAccount;
#
# this.initFromCustTable();
# this.initFromSalesTable(_other);
#
# this.DeliveryDateControlType = SalesDeliveryDateControlType::None;
# this.ShippingDateRequested = _other.DeliveryDate;
# this.ReceiptDateRequested = _other.DeliveryDate;
#
# this.SalesId = NumberSeq::newGetNum(SalesParameters::numRefSalesId()).num();
# this.ReturnItemNum = NumberSeq::newGetNum(SalesParameters::numRefReturnItemNum()).num();
#
# this.SalesType = SalesType::ReturnItem;
# this.ReturnStatus = ReturnStatusHeader::Created;
#
#}
#
ENDSOURCE
SOURCE #InitValue
#void initValue()
#{
# ;
#
# super();
#
# this.initValue_Server();
#}
ENDSOURCE
SOURCE #initValue_Server
#server void initValue_Server()
#{
# SalesTableType salesTableType;
# ;
#
# salesTableType = this.type();
# salesTableType.initValue();
#
# if (smmLicense::CRM())
# {
# this.SalesResponsible = smmUtility::getCurrentContact();
# this.SalesUnitId = smmUtility::getCurrentSalesUnit();
# }
#}
ENDSOURCE
SOURCE #insert
#void insert()
#{
# SalesTableType salesTableType;
# ;
#
# if (!this.SalesId)
# throw(error(strfmt("@SYS26332", fieldid2pname(tablenum(SalesTable), fieldnum(SalesTable, SalesId)))));
# ttsbegin;
#
# salesTableType = this.type();
# salesTableType.insert();
#
# if (TradeBLWIParameters::find().ActivateBLWI == NoYes::Yes)
# {
# TradeBLWIJournalPurposeCodes::createRecord(TradeBLWICustVend::Customer, this.RecId, this.CustAccount, TradeBLWITypeOfForm::SalesTable);
# }
# ttscommit;
#}
#
ENDSOURCE
SOURCE #interCompanyAllowIndirectCreationOrig
#// BP Deviation documented
#display InterCompanyAllowIndirectCreationTxt interCompanyAllowIndirectCreationOrig()
#{
# InterCompanyAllowIndirectCreationTxt interCompanyAllowIndirectCreationTxt;
# ;
# if (this.InterCompanyDirectDeliveryOrig
# && !this.InterCompanyAllowIndirectCreationOrig)
# {
# interCompanyAllowIndirectCreationTxt = "@SYS95179";
# }
# return interCompanyAllowIndirectCreationTxt;
#}
ENDSOURCE
SOURCE #interCompanyCheckCurrency
#boolean interCompanyCheckCurrency()
#{
# MarkupTrans markupTrans;
# ;
# if (this.isInterCompanyOrder()
# && this.CurrencyCode != this.orig().CurrencyCode)
# {
# if (SalesLine::exist(this.SalesId))
# return checkFailed(strfmt("@SYS105402"));
#
# select firstonly markupTrans
# index hint TableRecIdIdx
# where markupTrans.TransTableId == this.TableId
# && markupTrans.TransRecId == this.RecId;
# if (markupTrans)
# {
# return checkFailed(strfmt("@SYS105402"));
# }
# }
# return true;
#}
ENDSOURCE
SOURCE #interCompanyDirectDeliveryReturn
#///
#/// Set InterCompanyAutoCreateOrders and InterCompanyAllowIndirectCreate to
#/// the value of InterCompanyDirectDelivery.
#/// This is used, when the InterCompanyDirectDelivery is changed for a Return order.
#///
#public void interCompanyDirectDeliveryReturn()
#{;
# this.InterCompanyAutoCreateOrders = this.InterCompanyDirectDelivery;
# this.InterCompanyAllowIndirectCreation = this.InterCompanyDirectDelivery;
#}
#
ENDSOURCE
SOURCE #interCompanyEndpointActionPolicy
#InterCompanyEndpointActionPolicy interCompanyEndpointActionPolicy(boolean _forUpdate = false)
#{
# #InterCompany
# AifActionId defaultSalesOrderAction = #DefaultSalesOrderAction;
# InterCompanyEndpointActionPolicy interCompanyEndpointActionPolicy;
#;
# if (this.DataAreaId != curext())
# {
# changecompany(this.DataAreaId)
# {
# interCompanyEndpointActionPolicy = InterCompanyEndpointActionPolicy::find(AifEndpointConstraint::findInterCompanyEndpointId(CustTable::find(this.CustAccount)),defaultSalesOrderAction,_forUpdate);
# }
# }
# else
# {
# interCompanyEndpointActionPolicy = InterCompanyEndpointActionPolicy::find(AifEndpointConstraint::findInterCompanyEndpointId(CustTable::find(this.CustAccount)),defaultSalesOrderAction,_forUpdate);
# }
# return interCompanyEndpointActionPolicy;
#}
#
ENDSOURCE
SOURCE #interCompanyNonICExist
#public boolean interCompanyNonICExist()
#{
# SalesLine salesLine;
# PurchLine purchLine;
# ;
# select firstonly salesLine
# where salesLine.SalesId == this.SalesId
# && (salesLine.InventRefType != InventRefType::Purch
# || (salesLine.InventRefType == InventRefType::Purch
# && salesLine.InventRefTransId))
# notexists join purchLine
# where (purchLine.ItemRefType == InventRefType::Sales
# && purchLine.InventTransId == salesLine.InventRefTransId
# && purchLine.InterCompanyInventTransId);
#
# return salesLine.RecId ? true : false;
#}
#
ENDSOURCE
SOURCE #interCompanyOriginalSalesInfo
#public server container interCompanyOriginalSalesInfo()
#{
# InterCompanySalesType salesType;
# SalesTable salesTable;
# SalesStatus salesStatus = SalesStatus::None;
# PurchTable purchTable;
# PurchStatus purchStatus = PurchStatus::None;
#;
# if (this.InterCompanyOrder
# && this.InterCompanyCompanyId)
# {
# changecompany(this.InterCompanyCompanyId)
# {
# if (this.InterCompanyOriginalSalesId)
# {
# select SalesType, SalesStatus from salesTable
# index hint SalesIdx
# where salesTable.SalesId == this.InterCompanyOriginalSalesId;
# salesType = enum2str(salesTable.SalesType);
# salesStatus = salesTable.SalesStatus;
# }
#
# select PurchStatus from purchTable
# index hint PurchIdx
# where purchTable.PurchId == this.InterCompanyPurchId;
# purchStatus = purchTable.PurchStatus;
# }
# }
# return [purchStatus,salesType,salesStatus];
#}
#
ENDSOURCE
SOURCE #interCompanyOriginDisplay
#//BP Deviation Documented
#display InterCompanyOriginDisplay interCompanyOriginDisplay()
#{
# InterCompanyOriginDisplay interCompanyOriginDisplay;
# DictEnum dictEnum = new DictEnum(enumnum(InterCompanyOrigin));
# ;
# if (this.InterCompanyOrder)
# {
# interCompanyOriginDisplay = dictEnum.value2Name(this.InterCompanyOrigin);
# }
# return interCompanyOriginDisplay;
#}
#
ENDSOURCE
SOURCE #interCompanyPurchTable
#PurchTable interCompanyPurchTable(boolean _forUpdate = false)
#{
# PurchTable purchTable;
#;
# if (this.InterCompanyOrder
# && this.InterCompanyCompanyId
# && this.InterCompanyPurchId)
# {
# changecompany(this.InterCompanyCompanyId)
# {
# purchTable = PurchTable::find(this.InterCompanyPurchId, _forUpdate);
# }
#
# }
# return purchTable;
#}
ENDSOURCE
SOURCE #interCompanyReplacementRegistered
#private boolean interCompanyReplacementRegistered()
#{
# boolean ret;
# SalesLine salesLine;
# ReturnDispositionCode returnDispositionCode
# ;
# while select forceplaceholders salesLine
# where salesLine.SalesId == this.SalesId
# && salesLine.InventRefType == InventRefType::Purch
# && salesLine.InventRefTransId
# join returnDispositionCode
# where returnDispositionCode.DispositionCodeId == salesLine.ReturnDispositionCodeId
# {
# if (salesLine.interCompanySalesLineExist()
# && returnDispositionCode.createReplacement())
# {
# ret = true;
# break;
# }
# }
# return ret;
#}
#
ENDSOURCE
SOURCE #interCompanyUpdateNow
#boolean interCompanyUpdateNow()
#{
# boolean ok = false;
# ;
#
# if (!this.RecId)
# ok = true;
#
# if (this.orig().SalesType != this.SalesType
# || this.orig().CurrencyCode != this.CurrencyCode
# || this.orig().DlvTerm != this.DlvTerm
# || this.orig().DlvMode != this.DlvMode
# || this.orig().DeliveryDate != this.DeliveryDate
# || this.orig().ReceiptDateRequested != this.ReceiptDateRequested
# || this.orig().ReceiptDateConfirmed != this.ReceiptDateConfirmed
# || this.orig().ShippingDateRequested != this.ShippingDateRequested
# || this.orig().ShippingDateConfirmed != this.ShippingDateConfirmed
# || this.orig().DeliveryAddress != this.DeliveryAddress
# || this.orig().DeliveryName != this.DeliveryName
# || this.orig().DeliveryStreet != this.DeliveryStreet
# || this.orig().DeliveryZipCode != this.DeliveryZipCode
# || this.orig().DeliveryCountryRegionId != this.DeliveryCountryRegionId
# || this.orig().DeliveryState != this.DeliveryState
# || this.orig().DeliveryCounty != this.DeliveryCounty
# || this.orig().InterCompanyOriginalSalesId != this.InterCompanyOriginalSalesId
# || this.orig().InterCompanyOriginalCustAccount != this.InterCompanyOriginalCustAccount
# || this.orig().InterCompanyDirectDelivery != this.InterCompanyDirectDelivery
# || this.orig().InterCompanyDirectDeliveryOrig != this.InterCompanyDirectDeliveryOrig
# || this.orig().PurchOrderFormNum != this.PurchOrderFormNum
# || this.orig().CustomerRef != this.CustomerRef
# || this.orig().ReturnItemNum != this.ReturnItemNum
# || this.orig().Dimension != this.Dimension
# || this.orig().DiscPercent != this.DiscPercent
# || this.orig().ReturnReasonCodeId != this.ReturnReasonCodeId
# || this.orig().ReturnReplacementCreated != this.ReturnReplacementCreated)
# {
# ok = true;
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #InventSiteActive
#boolean inventSiteActive()
#{;
# return classfactory.inventDimGlobal().inventSiteActiveWithoutItem();
#}
ENDSOURCE
SOURCE #InvoiceName
#//BP Deviation documented
#display CustName invoiceName()
#{
# return this.custTable_InvoiceAccount().Name;
#}
#
ENDSOURCE
SOURCE #isCreditCheckEligible
#boolean isCreditCheckEligible()
#{
# // returns true if the sales order is eligible/qualifies for credit limit check
#
# return (this.SalesType != SalesType::Journal &&
# this.SalesType != SalesType::ItemReq &&
# this.SalesType != SalesType::Blanket);
#}
ENDSOURCE
SOURCE #isInterCompanyOrder
#boolean isInterCompanyOrder()
#{
# return (this.InterCompanyCompanyId != ''
# && this.InterCompanyOrder
# && !this.SkipUpdate
# && this.SalesType != SalesType::ItemReq);
#}
ENDSOURCE
SOURCE #jumpRefReturnItemNum
#void jumpRefReturnItemNum(Object object)
#{
# Args args;
# FormRun formRun;
# ;
# args = new Args(formstr(ReturnTable));
# args.record(this);
# args.caller(object);
# formRun = classfactory.formRunClass(args);
# formRun.init();
# formRun.run();
# formRun.detach();
#}
ENDSOURCE
SOURCE #LastConfirm
#//BP Deviation documented
#server display ConfirmId lastConfirm()
#{
# CustConfirmSalesLink custConfirmSalesLink;
# CustConfirmJour custConfirmJour;
# ;
# select firstonly TableId from custConfirmSalesLink
# index hint origSalesIdx
# order by ConfirmDate desc, ConfirmId desc
# where custConfirmSalesLink.OrigSalesId == this.SalesId
# join ConfirmDocNum from custConfirmJour
# where custConfirmJour.ConfirmId == custConfirmSalesLink.ConfirmId &&
# custConfirmJour.ConfirmDate == custConfirmSalesLink.ConfirmDate;
# return custConfirmJour.ConfirmDocNum;
#}
ENDSOURCE
SOURCE #LastConfirmDate
#//BP Deviation documented
#server display TransDate lastConfirmDate()
#{
# return (select maxof(ConfirmDate) from custConfirmSalesLink
# index hint origSalesIdx
# where custConfirmSalesLink.OrigSalesId == this.SalesId).ConfirmDate;
#}
ENDSOURCE
SOURCE #LastInvoice
#//BP Deviation documented
#server display InvoiceId lastInvoice()
#{
# ProjInvoiceItem projInvoiceItem;
# ;
#
# if (!this.ProjId)
# {
# return (select firstonly InvoiceId
# from custInvoiceSalesLink
# index hint origSalesIdx
# order by InvoiceDate desc, InvoiceId desc
# where custInvoiceSalesLink.OrigSalesId == this.SalesId).InvoiceId;
# }
# else
# {
# // This is invoiced from Project
# return (select firstonly ProjInvoiceId
# from projInvoiceItem
# index hint InvoiceIdx
# order by InvoiceDate desc, ProjInvoiceId desc
# where projInvoiceItem.SalesId == this.SalesId).ProjInvoiceId;
# }
#}
ENDSOURCE
SOURCE #LastInvoiceDate
#//BP Deviation documented
#server display TransDate lastInvoiceDate()
#{
# ProjInvoiceItem projInvoiceItem;
# ;
# if (!this.ProjId)
# return (select maxof(InvoiceDate) from custInvoiceSalesLink
# index hint origSalesIdx
# where custInvoiceSalesLink.OrigSalesId == this.SalesId).InvoiceDate;
# else
# // This is invoiced from Project
# return (select maxof(InvoiceDate)
# from projInvoiceItem
# where projInvoiceItem.SalesId==this.SalesId).InvoiceDate;
#}
ENDSOURCE
SOURCE #lastJournals
#server container lastJournals()
#{
# container c;
# ;
#
# c = conins(c, SalesTableType::posQuotation(), [this.lastQuotation(), this.lastQuotationDate()]);
# c = conins(c, SalesTableType::posConfirmation(), [this.lastConfirm(), this.lastConfirmDate()]);
# c = conins(c, SalesTableType::posPickingList(), [this.lastPickingList(), this.lastPickingListDate()]);
# c = conins(c, SalesTableType::posPackingSlip(), [this.lastPackingSlip(), this.lastPackingSlipDate()]);
# c = conins(c, SalesTableType::posInvoice(), [this.lastInvoice(), this.lastInvoiceDate()]);
#
# return c;
#}
ENDSOURCE
SOURCE #LastPackingSlip
#//BP Deviation documented
#server display PackingSlipId lastPackingSlip()
#{
# return (select firstonly PackingSlipId from custPackingSlipSalesLink
# index hint origSalesIdx
# order by DeliveryDate desc, PackingSlipId desc
# where custPackingSlipSalesLink.OrigSalesId == this.SalesId).PackingSlipId;
#}
ENDSOURCE
SOURCE #LastPackingSlipDate
#//BP Deviation documented
#server display TransDate lastPackingSlipDate()
#{
# return (select maxof(DeliveryDate) from custPackingSlipSalesLink
# index hint origSalesIdx
# where custPackingSlipSalesLink.OrigSalesId == this.SalesId).DeliveryDate;
#}
ENDSOURCE
SOURCE #lastPickingList
#//BP Deviation documented
#server display WMSPickingRouteID lastPickingList()
#{
# return (select firstonly PickingRouteId from wmsPickingRouteLink
# order by ActivationDateTime desc, PickingRouteId desc
# where wmsPickingRouteLink.OrigInventTransRefId == this.SalesId).PickingRouteId;
#}
#
ENDSOURCE
SOURCE #lastPickingListDate
#//BP Deviation documented
#server display TransDate lastPickingListDate()
#{
# utcdatetime activationDateTime;
# ;
# activationDateTime =(select maxof(ActivationDateTime) from wmsPickingRouteLink
# where wmsPickingRouteLink.OrigInventTransRefId == this.SalesId).ActivationDateTime;
#
# activationDateTime = DateTimeUtil::applyTimeZoneOffset(activationDateTime,DateTimeUtil::getUserPreferredTimeZone());
# return DateTimeUtil::date(activationDateTime);
#}
#
ENDSOURCE
SOURCE #LastQuotation
#//BP Deviation documented
#server display QuotationConfirmId lastQuotation()
#{
# CustQuotationConfirmSalesLink custQuotationConfirmSalesLink;
# CustQuotationConfirmJour custQuotationConfirmJour;
# ;
#
# select firstonly TableId from custQuotationConfirmSalesLink
# order by QuotationDate desc, QuotationConfirmId desc
# where custQuotationConfirmSalesLink.OrigQuotationId == this.QuotationId
# join QuotationDocNum from custQuotationConfirmJour
# where custQuotationConfirmJour.QuotationConfirmId == custQuotationConfirmSalesLink.QuotationConfirmId &&
# custQuotationConfirmJour.QuotationDate == custQuotationConfirmSalesLink.QuotationDate &&
# custQuotationConfirmJour.QuotationType == QuotationType::Sales;
#
# return custQuotationConfirmJour.QuotationDocNum;
#}
ENDSOURCE
SOURCE #LastQuotationDate
#//BP Deviation documented
#server display TransDate lastQuotationDate()
#{;
# return (select maxof(QuotationDate) from custQuotationConfirmSalesLink
# where custQuotationConfirmSalesLink.OrigQuotationId == this.QuotationId).QuotationDate;
#
#}
ENDSOURCE
SOURCE #markupAllowed
#public boolean markupAllowed()
#{
# return this.type().markupAllowed();
#}
ENDSOURCE
SOURCE #mayConfirmationBeUpdated
#boolean mayConfirmationBeUpdated()
#{
# return this.type().mayConfirmationBeUpdated();
#}
#
ENDSOURCE
SOURCE #mayInvoiceBeUpdated
#boolean mayInvoiceBeUpdated()
#{
# return this.type().mayInvoiceBeUpdated();
#}
ENDSOURCE
SOURCE #mayPackingSlipBeUpdated
#boolean mayPackingSlipBeUpdated()
#{
# return this.type().mayPackingSlipBeUpdated();
#}
ENDSOURCE
SOURCE #mayPickingListBeRegistrated
#boolean mayPickingListBeRegistrated()
#{
# ;
# return this.type().mayPickingListBeRegistrated();
#}
#
ENDSOURCE
SOURCE #mayPickingListBeUpdated
#boolean mayPickingListBeUpdated()
#{
# return this.type().mayPickingListBeUpdated();
#}
#
ENDSOURCE
SOURCE #mayProjectPackingSlipBeUpdated
#boolean mayProjectPackingSlipBeUpdated()
#{
# return this.type().mayProjectPackingSlipBeUpdated();
#}
#
#
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
# AxSalesTable axSalesTable;
# Object formDataSource;
# SalesTableType salesTableType;
# ;
#
# super(_fieldId);
#
# if (this.isFormDataSource())
# {
# if (formDataSourceHasMethod(this.dataSource(),classstr(AxSalesTable)))
# {
# formDataSource = this.dataSource();
# axSalesTable = formDataSource.axSalesTable();
# }
# }
# else
# {
# axSalesTable = this.axSalesTable();
# }
#
# if (axSalesTable)
# {
# axSalesTable.setFieldAsTouched(_fieldId);
# axSalesTable.modify();
# if (this.dataSource())
# {
# if (formDataSourceHasMethod(this.dataSource(),identifierstr(fieldModified)))
# {
# formDataSource = this.dataSource();
# formDataSource.fieldModified();
# }
# }
# }
# else
# {
# salesTableType = this.type();
# salesTableType.modifiedField(_fieldId);
# }
#}
#
ENDSOURCE
SOURCE #modifiedFieldDDC
#///
#/// Processes the modified field event for delivery date control fields.
#///
#///
#/// The field ID for the modified field.
#///
#void modifiedFieldDDC(fieldId _fieldId) //Enhanced Delivery Date Control
#{
# Object obj;
# SalesCalcAvailableDlvDates calcAvailableDlvDates;
# container c;
# ;
# if (this.DeliveryDateControlType != SalesDeliveryDateControlType::None)
# {
# switch (_fieldId)
# {
# case fieldnum(SalesTable, DeliveryCountryRegionId): //fall through
# case fieldnum(SalesTable, DeliveryCounty): //fall through
# case fieldnum(SalesTable, DeliveryState): //fall through
# case fieldnum(SalesTable, DeliveryZipCode): //fall through
# case fieldnum(SalesTable, DlvMode): //fall through
# case fieldnum(SalesTable, InventLocationId):
# if (!this.RecId)
# {
# calcAvailableDlvDates = SalesCalcAvailableDlvDates::modifiedFieldOrderEntryDeadLine(this,_fieldId);
# }
# break;
#
# case fieldnum(SalesTable, DeliveryDateControlType):
# if(this.RecId)
# {
# calcAvailableDlvDates = SalesCalcAvailableDlvDates::modifiedField(this,_fieldId);
# }
# else
# {
# calcAvailableDlvDates = SalesCalcAvailableDlvDates::modifiedFieldOrderEntryDeadLine(this,_fieldId);
# }
# break;
#
# case fieldnum(SalesTable, ReceiptDateRequested):
# calcAvailableDlvDates = SalesCalcAvailableDlvDates::modifiedField(this,_fieldId);
#
# if (this.ShippingDateRequested > this.ReceiptDateRequested)
# this.ShippingDateRequested = this.ReceiptDateRequested;
# break;
#
# case fieldnum(SalesTable, ShippingDateRequested):
# calcAvailableDlvDates = SalesCalcAvailableDlvDates::modifiedField(this,_fieldId);
#
# if (this.ShippingDateRequested > this.ReceiptDateRequested)
# this.ReceiptDateRequested = this.ShippingDateRequested;
# break;
#
# case fieldnum(SalesTable, ShippingDateConfirmed):
# calcAvailableDlvDates = SalesCalcAvailableDlvDates::modifiedField(this,_fieldId);
#
# if (this.ShippingDateConfirmed > this.ReceiptDateConfirmed)
# this.ReceiptDateConfirmed = this.ShippingDateConfirmed;
# break;
#
# case fieldnum(SalesTable, ReceiptDateConfirmed):
# calcAvailableDlvDates = SalesCalcAvailableDlvDates::modifiedField(this,_fieldId);
#
# if (this.ShippingDateConfirmed > this.ReceiptDateConfirmed)
# this.ShippingDateConfirmed = this.ReceiptDateConfirmed;
# break;
#
# default:
# }
# }
#
# if (this.isFormDataSource() && this.dataSource().formRun() && this.dataSource().formRun().name() == formstr(SalesCreateOrder))
# {
# obj = this.dataSource().formRun();
#
# if (calcAvailableDlvDates && calcAvailableDlvDates.parmCancelModifiedField())
# {
# if (formHasMethod(obj,identifierstr(getInitialValuesDeliveryDate)))
# {
# c = obj.getInitialValuesDeliveryDate();
#
# if (c)
# {
# this.ShippingDateConfirmed = conpeek(c, 1);
# this.ShippingDateRequested = conpeek(c, 2);
# this.ReceiptDateConfirmed = conpeek(c, 3);
# this.ReceiptDateRequested = conpeek(c, 4);
# this.DeliveryDateControlType = conpeek(c, 5);
# }
# }
# else
# {
# this.(_fieldId) = this.orig().(_fieldId);
# }
# }
# else
# {
# if (formHasMethod(obj,identifierstr(setInitialValuesDeliveryDate)))
# obj.setInitialValuesDeliveryDate();
# }
# }
#
# this.DeliveryDate = this.ShippingDateConfirmed ? this.ShippingDateConfirmed : this.ShippingDateRequested;
#}
#
ENDSOURCE
SOURCE #modifiedInterCompanyOrder
#void modifiedInterCompanyOrder()
#{
# if (this.InterCompanyOrder)
# this.InterCompanyCompanyId = this.custTable_CustAccount().interCompanyCompanyId();
# else
# this.InterCompanyCompanyId = '';
#}
ENDSOURCE
SOURCE #modifiedInventSiteFromParent
#public void modifiedInventSiteFromParent()
#{
# this.InventStorageDimMap::modifiedInventSiteFromParent(this);
#}
ENDSOURCE
SOURCE #modifiedOneTimeCustomer
#void modifiedOneTimeCustomer()
#{;
# if (!CustTable::createOneTimeAccountValidate())
# {
# this.OneTimeCustomer = NoYes::No;
# }
#
# if (this.OneTimeCustomer && !this.CustAccount)
# {
# this.createOneTimeAccount();
# }
#}
ENDSOURCE
SOURCE #modifiedProjId
#void modifiedProjId()
#{
# ProjTable projTable = ProjTable::find(this.ProjId);
# CustTable custTable = CustTable::find(projTable.projInvoice().InvoiceAccount);
# ;
#
# this.initFromProjTable(projTable);
# this.InvoiceAccount = custTable.InvoiceAccount ? custTable.InvoiceAccount : custTable.AccountNum;
# this.LanguageId = projTable.projInvoice().LanguageId;
#
#}
ENDSOURCE
SOURCE #ModuleType
#ModuleInventPurchSales moduleType()
#{
# return ModuleInventPurchSales::Sales;
#}
ENDSOURCE
SOURCE #MustBeCovPlanned
#boolean mustBeCovPlanned()
#{
# SalesTableType salesTableType;
# ;
#
# salesTableType = this.type();
# return salesTableType.mustBeCovPlanned();
#}
ENDSOURCE
SOURCE #mustDoCreditLimitAfterUpdate
#/**
# The method returns true if creditlimit must be executed after salesTable.update().
#**/
#boolean mustDoCreditLimitAfterUpdate()
#{
#
# SalesTable this_orig = this.orig();
#
# return (this.InclTax != this_orig.InclTax ||
# this.CustAccount != this_orig.CustAccount);
#}
ENDSOURCE
SOURCE #numberOfLines
#public NumberOfRecords numberOfLines()
#{
# return (select count(RecId) from salesLine where salesLine.SalesId == this.SalesId).RecId;
#}
ENDSOURCE
SOURCE #packingSlipTotal
#public Amount packingSlipTotal()
#{
# SalesTotals_Sales salesTotals = SalesTotals_Sales::construct(this, SalesUpdate::PackingSlip);
# container displayFields = salesTotals.displayFieldsCurrency(salesTotals.currencyCode());
# ;
#
# return conpeek(displayFields, TradeTotals::posTotalAmount());
#}
ENDSOURCE
SOURCE #Payer
#CustTable payer(boolean _forUpdate = false)
#{
# return this.custTable_InvoiceAccount(_forUpdate);
#}
#
ENDSOURCE
SOURCE #paymDayId
#CustPaymDayId paymDayId()
#{
# CustPaymDayId paymDayId;
# ;
#
# paymDayId = this.custTable_InvoiceAccount().PaymDayId;
#
# if (!paymDayId)
# paymDayId = this.payment().PaymDayId;
#
# return paymDayId;
#}
ENDSOURCE
SOURCE #payment
#PaymTerm payment(boolean _update = false)
#{
# return PaymTerm::find(this.Payment, _update);
#}
ENDSOURCE
SOURCE #paymModeModified
#void paymModeModified()
#{
# this.PaymModeMap::modifiedPaymMode();
#}
#
ENDSOURCE
SOURCE #projectedFreightCharge
#public AmountCur projectedFreightCharge(AmountCur _amt = 0)
#{
# CustParameters custParameters = CustParameters::find();
# AmountCur amtTotal, amtFreight, amtTax, amtMisc;
# SalesTotals_Sales salesTotals;
# ;
#
# if (custParameters.CreditCardEstShippingChargeType == CreditCardEstShippingChargeType::Fixed)
# {
# amtFreight = custParameters.CreditCardEstShippingChargeValue;
# }
# else
# {
# amtTotal = _amt;
# if (prmisdefault(_amt) || _amt == 0)
# {
# salesTotals = SalesTotals_Sales::construct(this, SalesUpdate::All);
# amtTotal = salesTotals.totalAmount();
# amtTax = salesTotals.totalTaxAmount();
# amtMisc = salesTotals.totalMarkup();
# }
#
# amtFreight = amtTotal - amtTax - amtMisc;
#
# if (amtFreight > 0)
# {
# amtFreight = amtFreight * custParameters.CreditCardEstShippingChargeValue / 100;
# amtFreight = custParameters.CreditCardEstShippingChargeMax ?
# min(custParameters.CreditCardEstShippingChargeMax,amtFreight) :
# amtFreight;
# }
# else
# {
# amtFreight = 0;
# }
# }
#
# return amtFreight;
#}
ENDSOURCE
SOURCE #projTable
#ProjTable projTable(boolean _forUpdate = false)
#{
# return ProjTable::find(this.ProjId, _forUpdate);
#}
ENDSOURCE
SOURCE #qualityOrderStatusDisplay
#///
#/// Retrieves and returns the associated qualtiy orders's status.
#///
#///
#/// Current quality order status.
#///
#
#//BP deviation documented
#display InventTestOrderStatusDisplay qualityOrderStatusDisplay()
#{
# ;
# return InventQualityOrderType::newBuffer(this).orderStatusDisplay();
#}
#
ENDSOURCE
SOURCE #querySalesLine
#Query querySalesLine(boolean _update = false)
#{
# DictRelation dictRelation;
# DictField externdictField;
# DictField dictField;
# Query query = new Query();
# Counter c;
# ;
#
# query.addDataSource(tablenum(SalesLine));
#
# dictRelation = new DictRelation(tablenum(SalesLine));
# dictRelation.loadTableRelation(this.TableId);
#
#
# if (dictRelation.lines())
# {
# for (c=1; c <= dictRelation.lines(); c++)
# {
# externdictField = new DictField(this.TableId,dictRelation.lineExternTableValue(c));
# dictField = new DictField(tablenum(SalesLine),dictRelation.lineTableValue(c));
# query.dataSourceTable(tablenum(SalesLine)).addRange(dictField.id()).value(queryValue(this.(externdictField.id())));
# }
# }
# query.dataSourceTable(tablenum(SalesLine)).update(_update);
#
# return query;
#}
ENDSOURCE
SOURCE #releaseOrderExists
#boolean releaseOrderExists()
#{
# SalesTableLinks salesTableLinks;
# ;
# if (this.SalesType != SalesType::Blanket)
# return false;
#
# select firstonly salesTableLinks
# where salesTableLinks.MainSalesId == this.SalesId;
#
# if (salesTableLinks)
# return true;
# return false;
#}
ENDSOURCE
SOURCE #returnCreateReplacement
#///
#/// Checks if a Replacement order can be created for the SalesTable in scope.
#///
#///
#/// True if no Replacement order exists, otherwise false.
#///
#public boolean returnCreateReplacement()
#{
# boolean ret = true;
# ;
#
# if (this.ReturnReplacementCreated == NoYes::Yes
# || (this.InterCompanyOrder && this.InterCompanyDirectDeliveryOrig))
# {
# ret = false;
# }
# return ret;
#}
#
ENDSOURCE
SOURCE #returnItem
#boolean returnItem()
#{;
# return this.SalesType == SalesType::ReturnItem;
#}
ENDSOURCE
SOURCE #returnJournal
#public boolean returnJournal()
#{;
# return this.ReturnStatus != ReturnStatusHeader::None ? true : false;
#}
ENDSOURCE
SOURCE #returnReservationAllowedIsSet
#public boolean returnReservationAllowedIsSet()
#{
# SalesLine returnLine;
# boolean ret;
# ;
# select firstonly RecId from returnLine where returnLine.SalesId == this.SalesId &&
# returnLine.ReturnAllowReservation == NoYes::Yes;
#
# ret = returnLine.RecId ? true : false;
# return ret;
#}
ENDSOURCE
SOURCE #SalesIdBlanket
#//BP Deviation documented
#display SalesIdBlanket salesIdBlanket()
#{
# return SalesTableLinks::find(this.SalesId).MainSalesId;
#}
ENDSOURCE
SOURCE #sendReturnOrderElectronically
#public void sendReturnOrderElectronically(XMLDocPurpose _xmlDocPurpose, AifSendMode _aifSendMode = AifSendMode::Async)
#{
# AxdSendContext axdSendContext = AxdSendContext::construct();
# AifEntityKey aifEntityKey = AifEntityKey::construct();
# AifAction aifAction ;
# AifConstraint aifConstraint = new AifConstraint();
# AifConstraintList aifConstraintList = new AifConstraintList();
# ;
#
# aifAction = AifAction::find(AifSendService::getDefaultSendAction(classnum(ReturnReturnOrderOutService),AifSendActionType::SendByKey)) ;
#
# aifEntityKey.parmTableId(this.TableId);
# aifEntityKey.parmRecId(this.RecId);
# aifEntityKey.parmKeyDataMap(SysDictTable::getKeyData(this));
#
# axdSendContext.parmXMLDocPurpose(_xmlDocPurpose);
# axdSendContext.parmSecurity(false);
#
# aifConstraint.parmType(AifConstraintType::Customer) ;
# aifConstraint.parmId(this.CustAccount) ;
# aifConstraintList.addConstraint(aifConstraint) ;
#
# AifSendService::submitDefault(classnum(ReturnReturnOrderOutService),
# aifEntityKey,
# aifConstraintList,
# _aifSendMode,
# axdSendContext.pack());
#}
#
ENDSOURCE
SOURCE #setAddress
#void setAddress(Address address)
#{
# if (address.Name)
# this.DeliveryName = address.Name;
#
# this.DeliveryAddress = address.Address;
# this.DeliveryZipCode = address.ZipCode;
# this.DeliveryCountryRegionId = address.CountryRegionId;
# this.DeliveryState = address.State;
# this.DeliveryCounty = address.County;
# this.DeliveryStreet = address.Street;
# this.DeliveryCity = address.City;
# this.Email = address.Email;
# this.url = address.url;
# this.AddressRefRecId = address.RecId;
# this.AddressRefTableId = address.TableId;
#
# this.setListCode();
# this.setTaxGroup(TaxSales::custTaxGroup(this.DlvTerm, this.TaxGroup, address));
#}
ENDSOURCE
SOURCE #setEstimate
#/**
# Returns true if the estimated amount is calculated and has changed
#**/
#server boolean setEstimate(SalesTotals _salesTotals = null)
#{
# SalesTotals salesTotals;
# SalesUpdate qtySpec;
# CustParameters custParameters = CustParameters::find();
# TypeOfCreditmaxCheck typeOfCreditmaxCheck = custParameters.CreditMaxCheck;
# boolean hasEstimatedChanged;
# AmountMST estimatedOld;
# ;
#
# hasEstimatedChanged = false;
# /**
# If creditlimitcheck is set to CreditLineCheckType::None, estimated should not be used,
# since the calculation causes a performance hit during order entry
# **/
# if (custParameters.CreditLineCheck != CreditLineCheckType::None)
# {
#
# qtySpec = (typeOfCreditmaxCheck == TypeOfCreditmaxCheck::BalanceDelivered ? SalesUpdate::PackingSlip :
# typeOfCreditmaxCheck == TypeOfCreditmaxCheck::BalanceAll ? SalesUpdate::All : 0);
#
# if (qtySpec && this.isCreditCheckEligible())
# {
# estimatedOld = this.Estimate;
#
# salesTotals = (_salesTotals == null) ? SalesTotals::construct(this, qtySpec) : _salesTotals;
# this.Estimate = Currency::amountCur2MST(salesTotals.totalAmount(), this.CurrencyCode);
#
# hasEstimatedChanged = (this.Estimate != estimatedOld);
# }
# }
#
# this.Touched = NoYes::No;
#
# return hasEstimatedChanged;
#}
#
ENDSOURCE
SOURCE #setInventSiteId
#public void setInventSiteId(InventSiteId _inventSiteId)
#{;
# if (this.inventSiteActive())
# {
# this.InventSiteId = _inventSiteId;
# this.modifiedInventSiteFromParent();
# }
#}
ENDSOURCE
SOURCE #SetListCode
#void setListCode()
#{
# this.Listcode = EUSalesList::resolveListCode(this.DeliveryCountryRegionId, this.payer().CountryRegionId);
#}
ENDSOURCE
SOURCE #setNameUsingVATNum
#private void setNameUsingVATNum(VATNum _vatNum,
# AddressCountryRegionId _countryRegionId,
# Name _name,
# CustParameters _custParameters = CustParameters::find())
#{
# TaxVATNumTable taxVATNumTable;
# CountryRegionType countryRegionType;
# ;
#
# taxVATNumTable = TaxVATNumTable::find(_vatNum, _countryRegionId);
#
# if(taxVATNumTable.Name)
# {
# this.SalesName = taxVATNumTable.Name;
# }
# else
# {
# switch(_custParameters.MandatoryInvoiceVATNum)
# {
# case TaxVATNumCountryRegionType::None:
# this.SalesName = _name;
# break;
# case TaxVATNumCountryRegionType::DomesticEU:
# countryRegionType = AddressCountryRegion::find(_countryRegionId).Type;
# switch(countryRegionType)
# {
# case CountryRegionType::Domestic:
# case CountryRegionType::EU:
# this.SalesName = '';
# break;
# default:
# this.SalesName = _name;
# break;
# }
# break;
# case TaxVATNumCountryRegionType::EU:
# countryRegionType = AddressCountryRegion::find(_countryRegionId).Type;
# switch(countryRegionType)
# {
# case CountryRegionType::EU:
# this.SalesName = '';
# break;
# default:
# this.SalesName = _name;
# break;
# }
# break;
# }
# }
#}
ENDSOURCE
SOURCE #setReturnAddressFromInventLocationId
#boolean setReturnAddressFromInventLocationId(InventLocationId _inventLocationId)
#{
# Address inventLocationAddress;
# InventLocation inventLocation;
# boolean addressSet;
# ;
#
# addressSet = false;
#
# if (_inventLocationId)
# {
# inventLocation = InventLocation::find(_inventLocationId);
# inventLocationAddress = Address::find(tablenum(InventLocation), inventLocation.RecId, AddressType::Delivery);
#
# if (inventLocationAddress)
# {
# this.setAddress(inventLocationAddress);
# addressSet = true;
# }
# }
#
# if (!addressSet)
# {
# addressSet = this.setReturnAddressFromInventSiteId(this.InventSiteId);
# }
#
# return addressSet;
#}
#
#
ENDSOURCE
SOURCE #setReturnAddressFromInventSiteId
#boolean setReturnAddressFromInventSiteId(InventSiteId _inventSiteId)
#{
# Address address;
# InventSite inventSite;
# boolean addressSet = false;
# ;
#
# if (_inventSiteId && this.inventSiteActive())
# {
# inventSite = InventSite::find(_inventSiteId);
# address = Address::find(tablenum(InventSite), inventSite.RecId, AddressType::Delivery);
#
# if (address.RecId)
# {
# this.setAddress(address);
# addressSet = true;
# }
# }
#
# if (!addressSet)
# {
# this.initDefaultReturnAddress();
# addressSet = true;
# }
#
# return addressSet;
#}
#
#
ENDSOURCE
SOURCE #setShipCarrierInformation
#void setShipCarrierInformation(SalesTable _salesTable,
# CustPackingSlipJour _custPackingSlipJour = null,
# CustInvoiceJour _custInvoiceJour = null)
#{
# DlvMode dlvMode;
# DlvModeId dlvModeId;
# ;
#
# if (_custPackingSlipJour)
# {
# dlvModeId = _custPackingSlipJour.DlvMode;
# }
# else if (_custInvoiceJour)
# {
# dlvModeId = _custInvoiceJour.DlvMode;
# }
# else
# {
# dlvModeId = _salesTable.DlvMode;
# }
#
# dlvMode = DlvMode::find(dlvModeId);
#
# this.ShipCarrierId = dlvMode.ShipCarrierId;
# this.ShipCarrierAccountCode = dlvMode.ShipCarrierAccountCode;
# this.ShipCarrierDlvType = dlvMode.ShipCarrierDlvType;
#
# if (_salesTable)
# {
# this.ShipCarrierAccount = _salesTable.ShipCarrierAccount;
# this.ShipCarrierDeliveryContact = _salesTable.ShipCarrierDeliveryContact;
# this.ShipCarrierFuelSurcharge = _salesTable.ShipCarrierFuelSurcharge;
# this.ShipCarrierBlindShipment = _salesTable.ShipCarrierBlindShipment;
# this.ShipCarrierResidential = _salesTable.ShipCarrierResidential;
# }
#}
#
ENDSOURCE
SOURCE #setTaxGroup
#void setTaxGroup(TaxGroup _taxGroup)
#{
# SalesTableType salesTableType;
# ;
# salesTableType = this.type();
# salesTableType.setTaxGroup(_taxGroup);
#}
ENDSOURCE
SOURCE #settleExchRate
#CustExchRate settleExchRate(boolean throwOnError = false)
#{
# QueryRun queryRun;
# CustTransOpen custTransOpen;
# CustTrans custTrans;
# CustExchRate exchRate = 0;
# CustExchRate custExchRate;
# ;
# if (this.SettleVoucher == SettlementType::SelectedTransact && SalesParameters::find().UseSettleExchRate)
# {
# queryRun = SpecTrans::createQueryRunToRefTable(this.company(), this.TableId, this.RecId, tablenum(CustTransOpen));
#
# queryRun.allowCrossCompany(true);
#
# while (queryRun.next())
# {
# if (queryRun.changed(tablenum(CustTransOpen)))
# {
# custTransOpen = queryRun.get(tablenum(CustTransOpen));
# if (custTransOpen)
# {
# custTrans = custTransOpen.custTrans();
# custExchRate = round(custTrans.AmountMST * 100 / custTrans.AmountCur, 0.01);
# if (!exchRate)
# exchRate = custExchRate;
# else
# if (exchRate != custExchRate)
# {
# exchRate = 0;
# if (throwOnError)
# throw error("@SYS59594");
#
# checkFailed("@SYS59594");
# break;
# }
# }
# }
# }
# }
# return exchRate;
#}
ENDSOURCE
SOURCE #shipCarrierThirdPartyName
#Name shipCarrierThirdPartyName()
#{
# return Address::find(this.TableId, this.RecId, AddressType::ShipCarrierThirdPartyShipping).Name;
#}
#
ENDSOURCE
SOURCE #showContactPerson
#//BP Deviation documented
#display ContactPersonName showContactPerson()
#{;
# return ContactPerson::find(this.ContactPersonId).Name;
#}
ENDSOURCE
SOURCE #showDocHanIcon
#// AOSRunMode::Called
#//BP Deviation documented
#display smmDocIconNum showDocHanIcon()
#{
# #macrolib.resource
#
# if ((select docuRef
# where docuRef.RefCompanyId == this.DataAreaId &&
# docuRef.RefTableId == this.TableId &&
# docuRef.RefRecId == this.RecId).RecId)
# {
# return #RES_NODE_DOC;
# }
#
# return #RES_AM_NEW;
#}
ENDSOURCE
SOURCE #smmAmountDeliveredMST
#//BP Deviation documented
#server display AmountMST smmAmountDeliveredMST()
#{
# return this.amountMST(this.amountDelivered());
#}
ENDSOURCE
SOURCE #smmAmountInvoicedMST
#//BP Deviation documented
#server display AmountMST smmAmountInvoicedMST()
#{
# return this.amountMST(this.amountInvoiced());
#}
ENDSOURCE
SOURCE #smmAmountOrderedNotInvoicedMST
#//BP Deviation documented
#server display AmountMST smmAmountOrderedNotInvoicedMST()
#{
# return this.amountMST(this.amountOrderedNotInvoiced());
#}
ENDSOURCE
SOURCE #taxModuleType
#TaxModuleType taxModuleType()
#{
# return TaxModuleType::Sales;
#}
ENDSOURCE
SOURCE #timeZoneSite
#//BP Deviation documented
#display Timezone timeZoneSite()
#{
# return InventSite::timeZoneSite(this.InventSiteId);
#}
ENDSOURCE
SOURCE #tpAddress
#Addressing tpAddress()
#{
# return Address::find(this.TableId, this.RecId, AddressType::ShipCarrierThirdPartyShipping).Address;
#}
ENDSOURCE
SOURCE #TransferCustAccount
#client server void transferCustAccount()
#{
# boolean initFromCustTable = false;
# ;
# if (this.CustAccount)
# {
# if (SalesParameters::find().PromptTransfer)
# {
# if (Box::yesNo("@SYS418"+'\n\n'+CustTable::promptAddress(this.CustAccount, AddressType::Delivery),DialogButton::Yes)==DialogButton::Yes)
# {
# initFromCustTable = true;
# }
# else
# {
# initFromCustTable = false;
# }
# }
# else
# {
# initFromCustTable = true;
# }
#
# this.transferCustAccount_Server(initFromCustTable);
# }
#}
ENDSOURCE
SOURCE #transferCustAccount_Server
#server void transferCustAccount_Server(boolean _initFromCustTable)
#{
# if (_initFromCustTable)
# {
# this.initFromCustTable();
# if (this.CustAccount != this.InvoiceAccount)
# this.transferInvoiceAccount();
# }
# else
# {
# this.initFromCustTableMandatoryFields();
# }
# this.copyThirdPartyAddressFromCust();
# SalesCalcAvailableDlvDates::initDateFieldsOrderEntryDeadline(this);
#}
ENDSOURCE
SOURCE #TransferInvoiceAccount
#void transferInvoiceAccount()
#{
# if (SalesParameters::find().PromptTransfer)
# {
# if (Box::yesNo("@SYS19435"+'\n\n'+this.InvoiceAccount+'\n\n'+CustTable::promptAddress(this.InvoiceAccount, AddressType::Delivery),DialogButton::Yes)==DialogButton::Yes)
# this.initInvoiceAccount();
# }
# else
# this.initInvoiceAccount();
#}
ENDSOURCE
SOURCE #TransferToOnetimeCustomer
#server void transferToOnetimeCustomer()
#{
# CustTable custTable;
#
# if (this.OneTimeCustomer)
# {
# ttsbegin;
# custTable = this.custTable_CustAccount(true);
# custTable.Address = this.DeliveryAddress;
# custTable.Name = this.DeliveryName;
# custTable.ZipCode = this.DeliveryZipCode;
# custTable.CountryRegionId = this.DeliveryCountryRegionId;
# custTable.County = this.DeliveryCounty;
# custTable.State = this.DeliveryState;
# custTable.Street = this.DeliveryStreet;
# custTable.City = this.DeliveryCity;
# custTable.update();
# ttscommit;
# }
#
#}
ENDSOURCE
SOURCE #Type
#SalesTableType type()
#{
# return SalesTableType::construct(this);
#}
ENDSOURCE
SOURCE #Update
#public void update()
#{
# SalesTableType salesTableType;
# boolean calcEstimateAfterUpdate;
# ;
#
# ttsbegin;
#
# salesTableType = this.type();
#
# this.Touched = NoYes::No;
#
# calcEstimateAfterUpdate = this.mustDoCreditLimitAfterUpdate();
#
# salesTableType.update();
#
# if (calcEstimateAfterUpdate)
# {
# if (this.setEstimate())
# {
# this.doUpdate();
# }
#
# if (CustParameters::find().salesCheckCreditOnHeader())
# {
# this.checkAgainstCreditLimit();
# }
# }
#
# // Update the CRM transaction log
# smmTransLog::initTrans(this, smmLogAction::update);
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #UpdateBackStatus
#void updateBackStatus()
#{
# SalesTableType salesTableType;
# ;
#
# salesTableType = this.type();
# salesTableType.updateBackStatus();
#}
ENDSOURCE
SOURCE #updateDeadline
#void updateDeadline(SalesDeadline deadline)
#{
# SalesTableType salesTableType;
# ;
#
# salesTableType = this.type();
# salesTableType.updateDeadline(deadline);
#}
ENDSOURCE
SOURCE #updateDeadlineOnLine
#void updateDeadlineOnLine()
#{
# SalesLine salesLine;
# ;
#
# ttsbegin;
#
# update_recordset salesLine
# setting ReturnDeadLine = this.ReturnDeadline
# where salesLine.SalesId == this.SalesId;
#
# ttscommit;
#}
ENDSOURCE
SOURCE #updateDocumentStatus
#void updateDocumentStatus(DocumentStatus documentStatus)
#{
# SalesTableType salesTableType;
# ;
#
# salesTableType = this.type();
# salesTableType.updateDocumentStatus(documentStatus);
#}
ENDSOURCE
SOURCE #UpdateFinalDisc
#server void updateFinalDisc()
#{
# SalesLine salesLine;
# ;
#
# this.PriceDiscHeading::updateFinalDisc(salesLine);
#
# //This will trigger the creditlimit calculation when salesTable.validateWrite is called
# this.Touched = NoYes::Yes;
#}
#
ENDSOURCE
SOURCE #UpdateLedgerCov
#public void updateLedgerCov()
#{
# SalesTableType salesTableType;
# ;
#
# salesTableType = this.type();
# salesTableType.updateLedgerCov();
#}
ENDSOURCE
SOURCE #UpdateMultiLineDisc
#server void updateMultiLineDisc()
#{
# SalesLine salesLine;
# ;
#
# this.PriceDiscHeading::updateMultiLineDisc(salesLine);
#
# //This will trigger the creditlimit calculation when salesTable.validateWrite is called
# this.Touched = NoYes::Yes;
#}
#
ENDSOURCE
SOURCE #updateSalesType
#void updateSalesType()
#{
# SalesTableType salesTableType;
# ;
#
# salesTableType = this.type();
# salesTableType.updateSalesType();
#}
ENDSOURCE
SOURCE #ValidateDelete
#boolean validateDelete()
#{
# boolean ok = true;
# SalesTableType salesTableType;
# ;
#
# ok = super();
#
# if (ok)
# {
# salesTableType = this.type();
# ok = salesTableType.validateDelete();
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId fieldId)
#{
# boolean ok = true;
# SalesTableType salesTableType;
# ;
#
# if(!this.AddressMap::validatePostalCode(fieldId))
# {
# return false;
# }
#
# ok = super(fieldId);
#
# if (ok)
# {
# salesTableType = this.type();
# ok = salesTableType.validateField(fieldId);
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #validateWrite
#public boolean validateWrite()
#{
# boolean ok = true;
# ;
#
#
# ok = super();
# ok = ok && this.validateWrite_server();
#
# return ok;
#
#}
#
ENDSOURCE
SOURCE #validateWrite_server
#server public boolean validateWrite_server()
#{
# boolean ok = true;
# SalesTableType salesTableType;
# boolean isThirdParty = DlvTerm::find(this.DlvTerm).ShipCarrierFreightApplied == ShipCarrierFreightApplied::ThirdParty ;
# Addressing tpAddress = this.tpAddress();
# Name tpName = this.shipCarrierThirdPartyName();
# ;
#
# if (ok && !this.SalesId)
# ok = checkFailed(strfmt("@SYS26332", fieldid2pname(tablenum(SalesTable), fieldnum(SalesTable, SalesId))));
#
# salesTableType = this.type();
#
# if (ok && this.Touched)
# {
# ok = SalesTableType::checkAgainstCreditLimit(this);
# }
#
# if (ok)
# {
# setprefix(strfmt("@SYS25975", this.SalesId));
# ok = salesTableType.validateWrite();
# }
#
# if (ok)
# {
# ok = appl.dimensionSetValidation().checkDimension(this, fieldnum(SalesTable, Dimension), true);
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #ChangeReturnStatus
#public static Counter changeReturnStatus(FormDataSource _datasource, ReturnUpdateAction _updateAction)
#{
# SalesTable returnTable;
# SalesLine returnLine;
# SalesTable returnTableUpdate;
# Counter numberOfRecords;
# SalesTable salesTable;
# PurchTable purchTable;
# PurchLine purchLine;
# ;
#
# ttsbegin;
#
# for (returnTable = _datasource.getFirst(true) ? _datasource.getFirst(true) : _datasource.cursor(); returnTable; returnTable = _datasource.getNext())
# {
# if (returnTable.ReturnStatus == ReturnStatusHeader::Created && !returnTable.existRegisteredReceivedInvoicedLines() && !returnTable.type().interCompanyIsDerivedOrder())
# {
# if (_updateAction == ReturnUpdateAction::Cancel)
# {
# while select forupdate returnLine
# where returnLine.SalesId == returnTable.SalesId
# && returnLine.InventTransId
# {
# if (returnLine.interCompanySalesLineExist())
# {
# purchLine = PurchLine::findInventTransId(returnLine.InventRefTransId,true);
# purchTable = PurchTable::find(purchLine.PurchId);
#
# purchLine.SkipUpdate = InterCompanySkipUpdate::Internal;
# purchLine.delete(false);
#
# if (!purchTable.existPurchLine())
# {
# if (purchTable.InterCompanyCompanyId
# && purchTable.InterCompanySalesId)
# {
# changecompany(purchTable.InterCompanyCompanyId)
# {
# salesTable = null;
# salesTable = SalesTable::find(purchTable.InterCompanySalesId,true);
# if (salesTable)
# salesTable.delete();
# }
# }
# }
# }
#
# returnLine.SalesQty = 0;
# returnLine.salesQtyModified();
# returnLine.DeliveryType = TradeLineDlvType::None;
# returnLine.SkipUpdate = InterCompanySkipUpdate::Internal;
# returnLine.update();
# }
#
# returnLine.skipDataMethods(true);
# update_recordset returnLine
# setting ReturnStatus = ReturnStatusLine::Canceled,
# CostPrice = 0,
# InventTransIdReturn = '',
# SalesStatus = SalesStatus::Canceled,
# ReturnClosedDate = systemdateget()
# where returnLine.SalesId == returnTable.SalesId;
#
# returnTableUpdate = SalesTable::find(returnTable.SalesId, true);
# returnTableUpdate.ReturnStatus = ReturnStatusHeader::Canceled;
# returnTableUpdate.SalesStatus = SalesStatus::Canceled;
# returnTableUpdate.InterCompanyDirectDelivery = false;
# returnTableUpdate.update();
# }
#
# numberOfRecords++;
# }
# }
#
# ttscommit;
#
# return numberOfRecords;
#}
ENDSOURCE
SOURCE #checkExist
#static boolean checkExist(SalesId salesId)
#{
# if (salesId && !SalesTable::exist(salesId))
# return checkFailed(strfmt(SalesTable::txtNotExist(),salesId));
#
# return true;
#}
ENDSOURCE
SOURCE #createSalesTable_Replacement
#///
#/// Creates a sales order for return order replacement.
#///
#///
#/// Customer account taken from return order.
#///
#///
#/// Currency code taken from return order.
#///
#///
#/// RMA number to mark sales order as rreplacement order
#///
#///
#/// Sales order record created.
#///
#static server SalesTable createSalesTable_Replacement(CustAccount _custAccount, CustCurrencyCode _currencyCode, SalesReturnItemNum _returnItemNum)
#{
# SalesTable salesTable;
# AxSalesTable axSalesTable;
# ;
#
# ttsbegin;
#
# axSalesTable = new AxSalesTable();
# axSalesTable.parmCustAccount(_custAccount);
# axSalesTable.parmCurrencyCode(_currencyCode);
# axSalesTable.parmSalesType(SalesType::Sales);
# axSalesTable.parmReturnItemNum(_returnItemNum);
# axSalesTable.save();
#
# ttscommit;
#
# salesTable = axSalesTable.salesTable();
#
# return salesTable;
#}
#
ENDSOURCE
SOURCE #custOpenOrders
#static SalesTable custOpenOrders(CustAccount custAccount, boolean _forUpdate = false)
#{
# SalesTable salesTable;
# ;
#
# salesTable.selectForUpdate(_forUpdate);
#
# select salesTable
# index hint CustIdx
# where salesTable.CustAccount == custAccount &&
# (salesTable.SalesStatus == SalesStatus::None ||
# salesTable.SalesStatus == SalesStatus::Backorder ||
# salesTable.SalesStatus == SalesStatus::Delivered);
#
# return salesTable;
#}
ENDSOURCE
SOURCE #deleteAllLines
#public static void deleteAllLines(SalesId _salesId)
#{
# SalesLine salesLine;
# ;
#
# ttsbegin;
#
# delete_from salesLine where salesLine.SalesId == _salesId;
#
# ttscommit;
#}
ENDSOURCE
SOURCE #exist
#static boolean exist(SalesId salesId)
#{
# if (!salesId)
# return false;
#
# return (select firstonly RecId from salesTable
# index hint SalesIdx
# where salesTable.SalesId == salesId).RecId != 0;
#}
ENDSOURCE
SOURCE #existCustOpenOrder
#static boolean existCustOpenOrder(CustAccount custAccount)
#{
# SalesTable salesTable;
# ;
#
# return (select firstonly RecId from salesTable
# index hint CustIdx
# where salesTable.CustAccount == custAccount &&
# (salesTable.SalesStatus == SalesStatus::None ||
# salesTable.SalesStatus == SalesStatus::Backorder ||
# salesTable.SalesStatus == SalesStatus::Delivered)).RecId != 0;
#
#}
ENDSOURCE
SOURCE #existDlvModeNotInvoiced
#///
#/// Checks if the delivery mode is used on a non-invoiced sales order.
#///
#///
#/// The DlvModeId value that specifies the delivery mode record.
#///
#///
#/// true if the deliver mode is used on a non-invoiced sales order; otherwise, false.
#///
#///
#/// The check is made against the sales order header and all of its non-invoiced lines.
#///
#public static server boolean existDlvModeNotInvoiced(DlvModeId _dlvModeId)
#{
# boolean isReferenced;
# SalesTable salesTable;
# SalesLine salesLine;
# ;
#
# if (_dlvModeId == '')
# {
# return false;
# }
#
# select firstonly
# RecId from salesTable
# where
# ((salesTable.SalesStatus != SalesStatus::Invoiced) && (salesTable.SalesStatus != SalesStatus::Canceled)) &&
# salesTable.DlvMode == _dlvModeId;
#
# isReferenced = (salesTable.RecId != 0);
# if (!isReferenced)
# {
# select firstonly
# RecId from salesLine
# where
# ((salesLine.SalesStatus != SalesStatus::Invoiced) && (salesLine.SalesStatus != SalesStatus::Canceled)) &&
# salesLine.DlvMode == _dlvModeId;
#
# isReferenced = (salesLine.RecId != 0);
# }
#
# return isReferenced;
#}
#
ENDSOURCE
SOURCE #existsRegQrRecInvLines
#public static boolean existsRegQrRecInvLines(SalesId _salesId)
#{;
# return (select firstonly salesLine where salesLine.SalesId == _salesId &&
# salesLine.ReturnStatus > ReturnStatusLine::Awaiting &&
# salesLine.ReturnStatus < ReturnStatusLine::Canceled).RecId ? true : false;
#}
ENDSOURCE
SOURCE #find
#static SalesTable find(SalesId salesId,
# boolean _forUpdate = false,
# ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
#{
# SalesTable salesTable;
# ;
#
# if (salesId)
# {
# if (_forUpdate)
# {
# salesTable.selectForUpdate (_forUpdate);
# if (_concurrencyModel != ConcurrencyModel::Auto)
# salesTable.concurrencyModel(_concurrencyModel);
# }
# salesTable.selectLocked (_forUpdate);
#
# select firstonly salesTable
# index hint SalesIdx
# where salesTable.SalesId == salesId;
# }
#
# return salesTable;
#}
ENDSOURCE
SOURCE #findOrCreateSalesTable_ItemReq
#static server SalesTable findOrCreateSalesTable_ItemReq(CustAccount _custAccount, CustCurrencyCode _currencyCode, ProjId _projId)
#{
# SalesTable salesTable;
# AxSalesTable axSalesTable;
# CustTable custTable;
# ;
#
# if (_projId)
# {
# ttsbegin;
#
# select firstonly forupdate salesTable
# where salesTable.ProjId == '' &&
# salesTable.CustAccount == _custAccount &&
# salesTable.CurrencyCode == _currencyCode &&
# salesTable.SalesType == SalesType::ItemReq;
#
# if (salesTable.RecId && !salesTable.numberOfLines())
# {
# axSalesTable = salesTable.axSalesTable();
# axSalesTable.parmProjId(_projId);
# custTable = CustTable::find(ProjTable::find(_projId).projInvoice().InvoiceAccount);
# axSalesTable.parmInvoiceAccount(custTable.InvoiceAccount ? custTable.InvoiceAccount : custTable.AccountNum);
# axSalesTable.save();
# salesTable = axSalesTable.salesTable();
# }
#
# ttscommit;
# }
#
# select firstonly salesTable
# where salesTable.ProjId == _projId &&
# salesTable.CustAccount == _custAccount &&
# salesTable.CurrencyCode == _currencyCode &&
# salesTable.SalesType == SalesType::ItemReq;
#
# if (!salesTable.RecId)
# {
# ttsbegin;
#
# axSalesTable = new AxSalesTable();
# axSalesTable.parmCustAccount(_custAccount);
# axSalesTable.parmProjId(_projId);
# axSalesTable.parmCurrencyCode(_currencyCode);
# axSalesTable.parmSalesType(SalesType::ItemReq);
# axSalesTable.save();
#
# ttscommit;
#
# salesTable = axSalesTable.salesTable();
# }
#
# return salesTable;
#}
#
ENDSOURCE
SOURCE #findRecId
#static SalesTable findRecId(recId recId,
# boolean _forUpdate = false )
#{
# SalesTable salesTable;
# ;
#
# salesTable.selectForUpdate(_forUpdate);
#
# select salesTable
# where salesTable.RecId == recId;
#
# return salesTable;
#}
ENDSOURCE
SOURCE #findReturnItemNum
#static SalesTable findReturnItemNum(SalesReturnItemNum _returnItemNum, boolean _forupdate = false, ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
#{
# SalesTable salesTable;
# ;
#
# if (_returnItemNum)
# {
# if (_forupdate)
# {
# salesTable.selectForUpdate(_forupdate);
# if (_concurrencyModel != ConcurrencyModel::Auto)
# {
# salesTable.concurrencyModel(_concurrencyModel);
# }
# }
#
# salesTable.selectLocked(_forupdate);
#
# select firstonly salesTable where salesTable.ReturnItemNum == _returnItemNum &&
# salesTable.ReturnStatus != ReturnStatusHeader::None;
# }
#
# return salesTable;
#}
#
#
#
#
ENDSOURCE
SOURCE #jumpRefSalesIdBlanket
#static void jumpRefSalesIdBlanket(SalesIdBlanket _salesIdBlanket)
#{
# SalesTableLinks salesTableLinks;
# Args args;
# FormRun formRun;
# ;
# salesTableLinks = SalesTableLinks::subSalesTableLink(_salesIdBlanket);
#
# args = new Args(formstr(SalesTable));
# args.record(salesTableLinks);
# formRun = classfactory.formRunClass(args);
# formRun.init();
# formRun.run();
# formRun.detach();
#}
ENDSOURCE
SOURCE #lookupDeliveryAccount
#client static void lookupDeliveryAccount(FormStringControl ctrl,
# CustInvoiceAccount invoiceAccount)
#{
# Args args;
# Object formRun;
# ;
#
# args = new Args();
# args.name(formstr(SalesDeliveryAccountLookup));
#
# formRun = classfactory.formRunClass(args);
# formRun.invoiceAccount(invoiceAccount);
# formRun.init();
#
# ctrl.performFormLookup(formRun);
#}
ENDSOURCE
SOURCE #lookupWMSReception
#static void lookupWMSReception(FormStringControl ctrl, CustAccount custAccount)
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(SalesTable), ctrl);
# Query query = new Query();
# QueryBuildDataSource queryBuildDataSource;
# QueryBuildRange queryBuildRange;
# ;
# sysTableLookup.addLookupfield(fieldnum(SalesTable, SalesId));
# sysTableLookup.addLookupfield(fieldnum(SalesTable, SalesName));
# sysTableLookup.addLookupfield(fieldnum(SalesTable, CustAccount));
#
# queryBuildDataSource = query.addDataSource(tablenum(SalesTable));
#
# if (custAccount)
# {
# queryBuildRange = queryBuildDataSource.addRange(fieldnum(SalesTable, CustAccount));
# queryBuildRange.value(queryValue(custAccount));
# }
# queryBuildRange = queryBuildDataSource.addRange(fieldnum(SalesTable, SalesStatus));
# queryBuildRange.value(enum2Value(SalesStatus::Backorder));
#
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#}
ENDSOURCE
SOURCE #lookupWMSReceptionRMA
#///
#/// Provides filtere look up functionallity to the the ReturnItemNum field.
#///
#///
#/// The form string object.
#///
#///
#/// A CustTable table buffer.
#///
#///
#/// Look up Return orders.
#///
#static void lookupWMSReceptionRMA(FormStringControl ctrl, CustAccount _custAccount = '')
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(SalesTable), ctrl);
# Query query = new Query();
# QueryBuildDataSource queryBuildDataSource;
# QueryBuildRange queryBuildRange;
# ;
#
# sysTableLookup.addLookupfield(fieldnum(SalesTable, ReturnItemNum));
# sysTableLookup.addLookupfield(fieldnum(SalesTable, SalesId));
# sysTableLookup.addLookupfield(fieldnum(SalesTable, SalesName));
# sysTableLookup.addLookupfield(fieldnum(SalesTable, CustAccount));
#
# queryBuildDataSource = query.addDataSource(tablenum(SalesTable));
#
# queryBuildRange = queryBuildDataSource.addRange(fieldnum(SalesTable, ReturnStatus));
# queryBuildRange.value(strfmt("%1, %2", SysQuery::value(ReturnStatusHeader::Created), SysQuery::value(ReturnStatusHeader::Open)));
#
# if (_custAccount)
# {
# queryBuildRange = queryBuildDataSource.addRange(fieldnum(SalesTable, CustAccount));
# queryBuildRange.value(SysQuery::value(_custAccount));
# }
#
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#}
ENDSOURCE
SOURCE #promptConvertCurrencyCode
#client static container promptConvertCurrencyCode()
#{
# Dialog dialog;
# DialogField dialogField;
# DialogButton dialogButton;
# ;
# if (!isConfigurationkeyEnabled(configurationkeynum(PriceDisc)))
# {
# dialogButton = Box::okCancel("@SYS54755", DialogButton::Ok);
# if (dialogButton == DialogButton::Ok)
# return [NoYes::Yes, TradeCurencyConversion::ExchRate];
#
# return [NoYes::No, TradeCurencyConversion::ExchRate];
# }
#
# dialog = new Dialog("@SYS54755");
# dialog.addText("@SYS54755");
# dialogField = dialog.addField(typeid(TradeCurencyConversion));
# if (dialog.run())
# return [NoYes::Yes, dialogField.value()];
#
# return [NoYes::No, TradeCurencyConversion::ExchRate];
#}
ENDSOURCE
SOURCE #promptCopyDeliveryAddress
#client static DialogButton promptCopyDeliveryAddress()
#{;
# return Box::yesYesAllNoCancel("@SYS78472", DialogButton::Yes);
#}
ENDSOURCE
SOURCE #promptCopyThirdPartyBillingAddress
#client static DialogButton promptCopyThirdPartyBillingAddress()
#{
# ;
# return Box::yesNo("@SYS119160", DialogButton::Yes);
#}
ENDSOURCE
SOURCE #returnUpdatedHeaderStatus
#static void returnUpdatedHeaderStatus(SalesId _salesId, DocumentStatus _documentStatus = DocumentStatus::None)
#{
# SalesLine salesLine;
# SalesTable salesTable;
# ;
#
# switch (_documentStatus)
# {
# case DocumentStatus::PackingSlip :
# select firstonly RecId from salesLine where salesLine.SalesId == _salesId &&
# (salesLine.ReturnStatus == ReturnStatusLine::Received ||
# salesLine.ReturnStatus == ReturnStatusLine::Registered);
#
# if (salesLine.RecId)
# {
# ttsbegin;
# salesTable = SalesTable::find(_salesId, true);
# salesTable.ReturnStatus = ReturnStatusHeader::Open;
# salesTable.update();
# ttscommit;
# }
# break;
#
# case DocumentStatus::Invoice :
#
# select firstonly RecId from salesLine where salesLine.SalesId == _salesId &&
# (salesLine.ReturnStatus == ReturnStatusLine::Awaiting ||
# salesLine.ReturnStatus == ReturnStatusLine::None ||
# salesLine.ReturnStatus == ReturnStatusLine::Quarantine ||
# salesLine.ReturnStatus == ReturnStatusLine::Received ||
# salesLine.ReturnStatus == ReturnStatusLine::Registered);
#
# if (!salesLine.RecId)
# {
# ttsbegin;
# salesTable = SalesTable::find(_salesId, true);
# salesTable.ReturnStatus = ReturnStatusHeader::Closed;
# salesTable.update();
# ttscommit;
# }
# break;
# }
#}
ENDSOURCE
SOURCE #returnUpdateReplacement
#public static void returnUpdateReplacement(ReturnItemNum _returnItemNum, SalesId _replacementSalesId)
#{
# SalesTable returnOrder;
# ;
#
# ttsbegin;
# returnOrder = SalesTable::findReturnItemNum(_returnItemNum,true);
# returnOrder.ReturnReplacementCreated = NoYes::Yes;
# returnOrder.ReturnReplacementId = _replacementSalesId;
# returnOrder.update();
# ttscommit;
#}
ENDSOURCE
SOURCE #ReturnValidateReturnItemNum
#///
#/// Validates the input to the Return order field.
#///
#///
#/// A ReturnItemNum type.
#///
#///
#/// True if the Return order in question exists, otherwise false.
#///
#//
#/// Validates the input to the Return order field.
#///
#///
#/// A ReturnItemNum type.
#///
#///
#/// True if the Return order in question exists, otherwise false.
#/// True if the status of the Return order in question is either Created or Open, otherwise false.
#///
#static boolean returnValidateReturnItemNum(ReturnItemNum _returnItemNum)
#{
# boolean ret = true;
# SalesTable salesTable = SalesTable::findReturnItemNum(strltrim(_returnItemNum));
# ;
#
# if (_returnItemNum && !salesTable.RecId)
# {
# //Return order %1 doesn't exists
# ret = checkFailed(strfmt("@SYS115108", _returnItemNum));
# }
#
# if (ret)
# {
# if (salesTable.ReturnStatus == ReturnStatusHeader::Created || salesTable.ReturnStatus == ReturnStatusHeader::Open)
# {
# ret = true;
# }
# else
# { //Only Return orders with status %1 or %2 are legal input.
# ret = checkFailed(strfmt("@SYS123163", ReturnStatusHeader::Created, ReturnStatusHeader::Open));
# }
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #ShipCarrierPostPickup
#static void shipCarrierPostPickup(SalesTable _salesTable,
# DocumentStatus _documentStatus,
# ShipCarrierDlvType _dlvType2Post,
# boolean _postAll)
#{
# SalesFormLetter salesFormLetter;
# SalesLine salesLine2Post;
# ;
#
# if (_documentStatus != DocumentStatus::PackingSlip && _documentStatus != DocumentStatus::Invoice)
# return;
#
# ttsbegin;
# if (!_postAll)
# {
# while select forupdate salesLine2Post
# where salesLine2Post.SalesId == _salesTable.SalesId
# {
# salesLine2Post.SalesDeliverNow = 0;
#
# if (salesLine2Post.ShipCarrierDlvType == _dlvType2Post)
# {
# if (_documentStatus == DocumentStatus::PackingSlip)
# {
# salesLine2Post.SalesDeliverNow = salesLine2Post.SalesStatus == SalesStatus::Backorder ? salesLine2Post.RemainSalesPhysical : 0;
# }
# else if (_documentStatus == DocumentStatus::Invoice)
# {
# salesLine2Post.SalesDeliverNow = salesLine2Post.SalesStatus == SalesStatus::Delivered ? salesLine2Post.RemainSalesFinancial : 0;
# }
# }
#
# salesLine2Post.setInventDeliverNow();
# salesLine2Post.update();
# }
#
# }
#
# salesFormLetter = SalesFormLetter::construct(_documentStatus);
#
# salesFormLetter.getLast();
# salesFormLetter.allowEmptyTable(salesFormLetter.initAllowEmptyTable(true));
#
# salesFormLetter.transDate(systemdateget());
#
# if (_postAll)
# {
# salesFormLetter.update(_salesTable, systemdateget(), SalesUpdate::All, AccountOrder::None, false, true);
# }
# else
# {
# salesFormLetter.update(_salesTable, systemdateget(), SalesUpdate::DeliverNow, AccountOrder::None, false, true);
# }
# ttscommit;
#
# salesFormLetter.runShipCarrier();
#
#}
#
ENDSOURCE
SOURCE #txtNotExist
#static str txtNotExist()
#{
# return "@SYS15067";
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : LanguageTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #LanguageTable
Id 799
PROPERTIES
Name #LanguageTable
Label #@SYS15819
TitleField1 #LanguageId
Systemtable #Yes
CacheLookup #Found
SaveDataPerCompany #No
TableGroup #Group
PrimaryIndex #Key
ClusterIndex #Key
DeveloperDocumentation #@SYS123432
ENDPROPERTIES
FIELDS
FIELD #LanguageId
Id 1
STRING
PROPERTIES
Name #LanguageId
Mandatory #Yes
AllowEdit #No
Table #LanguageTable
ExtendedDataType
ARRAY
#LanguageIdAll
#
ENDARRAY
StringSize #7
ENDPROPERTIES
FIELD #LabelFile
Id 3
ENUM
PROPERTIES
Name #LabelFile
Label #@SYS69743
HelpText #@SYS69744
Visible #No
Table #LanguageTable
EnumType #NoYes
ENDPROPERTIES
FIELD #UserDefinedLanguage
Id 4
ENUM
PROPERTIES
Name #UserDefinedLanguage
Label #@SYS69746
HelpText #@SYS69745
Visible #No
Table #LanguageTable
ExtendedDataType
ARRAY
#NoYesId
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#LanguageId
#languageDescription
#LabelFile
#UserDefinedLanguage
ENDGROUPFIELDS
ENDGROUP
GROUP #AutoLookup
PROPERTIES
Name #AutoLookup
ENDPROPERTIES
GROUPFIELDS
#languageDescription
ENDGROUPFIELDS
ENDGROUP
GROUP #Languages
PROPERTIES
Name #Languages
Label #@SYS15819
ENDPROPERTIES
GROUPFIELDS
#LanguageId
#languageDescription
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#Key
Id 1
PROPERTIES
Name #Key
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#LanguageId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #languageDescription
#// BP deviation documented
#display LanguageDescription languageDescription()
#{
# ;
# return LanguageTable::languageId2Description(this.LanguageId);
#}
ENDSOURCE
SOURCE #addInstalledLanguages
#server static void addInstalledLanguages()
#{
# LanguageTable languageTable;
# LanguageId languageId;
# LanguageId tmpLanguageId;
# int i;
#
# ttsbegin;
#
# while select forupdate languageTable
# index Key
# where languageTable.LabelFile
# {
# if (languageTable.UserDefinedLanguage)
# {
# languageTable.delete();
# }
# else
# {
# languageTable.LabelFile = false;
# languageTable.update();
# }
# }
#
# for (i = 1; i <= xLanguage::labelFileCount(); i++)
# {
# languageId = xLanguage::labelFileNumber2LanguageID(i);
# tmpLanguageId = strkeep(languageId, 'abcdefghijklmnopqrstuvwxyz-_');
#
# if (languageId == tmpLanguageId)
# {
# select forupdate languageTable
# index Key
# where languageTable.LanguageId == languageId;
#
# if (languageTable)
# {
# languageTable.LabelFile = true;
# languageTable.update();
# }
# else
# {
# languageTable.LanguageId = languageId;
# languageTable.LabelFile = true;
# languageTable.UserDefinedLanguage = true;
# languageTable.insert();
# }
# }
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #buildSelectLanguageTree
#static client public void buildSelectLanguageTree(FormTreeControl _formTreeControl,
# Map _formTreeItemStatusMap,
# Map _languageMap = Map::create(LanguageTable::installedLanguages()))
#{
# #ResAppl
# ImageRes imageRes;
# ImageListAppl_checkbox imageListAppl_checkbox = new ImageListAppl_checkbox();
# MapIterator mapIterator = new MapIterator(_languageMap);
# ;
#
# _formTreeControl.deleteAll();
#
# if (_languageMap.elements())
# {
# SysFormTreeControl::addTreeItem(_formTreeControl, "@SYS58315", 0, '', 0, true, imageListAppl_checkbox.image(#imageCheckNone));
#
# mapIterator.begin();
# while (mapIterator.more())
# {
# if (_formTreeItemStatusMap.exists(mapIterator.value()) &&
# _formTreeItemStatusMap.lookup(mapIterator.value()) != FormTreeItemStatus::NotVisible)
# {
# if (_formTreeItemStatusMap.lookup(mapIterator.value()) == FormTreeItemStatus::Selected)
# {
# imageRes = imageListAppl_checkbox.image(#imageCheckAll);
# }
# else
# {
# imageRes = imageListAppl_checkbox.image(#imageCheckNone);
# }
#
# SysFormTreeControl::addTreeItem(_formTreeControl, mapIterator.key(), _formTreeControl.getRoot(), mapIterator.value(), 0, false, imageRes);
# }
# mapIterator.next();
# }
# SysFormTreeControl::changeParentStateImage_CheckBox(_formTreeControl, _formTreeControl.getRoot());
# _formTreeControl.expand(_formTreeControl.getRoot());
# }
#}
#
ENDSOURCE
SOURCE #CGranFind
#//CarlosGranados : Busco el registro
#static LanguageTable CGranFind(LanguageId _languageId, boolean _forUpdate = false) {
#
# LanguageTable languageTable;
# ;
# languageTable.selectForUpdate(_forUpdate);
# select firstonly languageTable
# index hint Key
# where languageTable.LanguageId == _languageId;
#
# return languageTable;
#
#
#}
ENDSOURCE
SOURCE #checkInstalledLanguages
#server static boolean checkInstalledLanguages()
#{
# #define.version(1)
# LanguageId languageId;
# int i;
# boolean update;
# container pack;
# container packedSet;
# int packVersion;
# Set newLanguageSet = new Set(Types::String);
# Set oldLanguageSet = new Set(Types::String);
# Set differenceSet = new Set(Types::String);
# ;
# ttsbegin;
#
# pack = classfactory.lastValueGet('', '', UtilElementType::TableStaticMethod, funcname());
#
# packVersion = conpeek(pack, 1);
# if (packVersion == #version)
# {
# packedSet = conpeek(pack, 2);
#
# if (packedSet)
# {
# oldLanguageSet = Set::create(packedSet);
# }
# }
#
# for (i = 1; i <= xLanguage::labelFileCount(); i++)
# {
# languageId = xLanguage::labelFileNumber2LanguageID(i);
#
# newLanguageSet.add(languageId);
#
# if (!oldLanguageSet.in(languageId))
# {
# update = true;
# }
# }
#
# if (!update)
# {
# differenceSet = Set::difference(oldLanguageSet, newLanguageSet);
#
# if (differenceSet.elements())
# {
# update = true;
# }
# }
#
# if (update)
# {
# pack = newLanguageSet.pack();
#
# classfactory.lastValuePut([#version, pack], '', '', UtilElementType::TableStaticMethod, funcname());
# }
# ttscommit;
# return update;
#}
ENDSOURCE
SOURCE #checkLanguageTable
#server static void checkLanguageTable()
#{
# LanguageTable languageTable;
# ;
# ttsbegin;
#
# if (xLanguage::languageCount() != (select count(RecId) from languageTable
# index Key
# where !languageTable.UserDefinedLanguage).RecId)
# {
# LanguageTable::fillTable();
# LanguageTable::addInstalledLanguages();
# }
#
# if (LanguageTable::checkInstalledLanguages())
# {
# LanguageTable::addInstalledLanguages();
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #checkStartUpLanguage
#/*
# check the startup language for validity
# if not valid - error messsages are given in plain text - as there are no label file to translate them!
#*/
#server static boolean checkStartUpLanguage()
#{
# boolean ok = true;
# boolean okLabelfile, okLanguageId;
# Session session = new Session();
# LanguageId interfaceLanguage = session.interfaceLanguage();
# int i;
# ;
# // is the session a client
# if (session.clientKind() == ClientType::Client)
# {
# // is the language installed?
# okLabelfile = false;
# for (i = 1; i <= xLanguage::labelFileCount(); i++)
# {
# if (xLanguage::labelFileNumber2LanguageID(i) == interfaceLanguage)
# {
# okLabelfile = true;
# break;
# }
# }
# if (!okLabelfile)
# {
# ok = checkFailed(strfmt("@SYS76611", interfaceLanguage));
#
# // is the language Id known at all
# okLanguageId = false;
# for (i = 1; i <= xLanguage::languageCount(); i++)
# {
# if (xLanguage::index2languageID(i) == interfaceLanguage)
# {
# okLanguageId = true;
# break;
# }
# }
# if (!okLanguageId)
# {
# ok = checkFailed(strfmt("@SYS76612", interfaceLanguage));
# }
# }
# }
# else
# {
# return true;
# }
#/*
# }
#
# select LanguageTable
# where LanguageTable.LanguageId == session.interfaceLanguage();
#
# if (!LanguageTable)
# {
# ok = checkFailed(strFmt("The start up language id '%1' is not known to the system",session.interfaceLanguage()));
# }
# else
# if (!LanguageTable.LabelFile)
# {
# ok = checkFailed(strFmt("A label file for the start up language id '%1' is not installed on the system",session.interfaceLanguage()));
# }
#*/
# return ok;
#}
ENDSOURCE
SOURCE #defaultLanguage
#public static client server LanguageId defaultLanguage()
#{
# Session session = new Session(sessionid());
# ;
# return session.interfaceLanguage();
#}
ENDSOURCE
SOURCE #fillTable
#server static void fillTable()
#{
# int i;
# LanguageTable languageTable;
#
# ttsbegin;
# delete_from languageTable;
#
# for (i = 1; i <= xLanguage::languageCount();i++)
# {
# languageTable.LanguageId = xLanguage::index2languageID(i);
# languageTable.insert();
# }
# ttscommit;
#}
ENDSOURCE
SOURCE #installedLanguages
#static client server public container installedLanguages()
#{
# LanguageTable languageTable;
# Map languageMap = new Map(Types::String, Types::String);
# ;
# while select languageTable index Key
# where languageTable.LabelFile == true
# {
# languageMap.insert(languageTable.languageDescription(), languageTable.LanguageId);
# }
#
# return languageMap.pack();
#}
#
ENDSOURCE
SOURCE #languageID2Description
#static client server LanguageDescription languageId2Description(LanguageId _languageId)
#{
# LanguageDescription languageDescription = xLanguage::languageID2Description(_languageId)
#
# ;
# if (languageDescription)
# {
# return languageDescription;
# }
#
# return _languageId;
#}
ENDSOURCE
SOURCE #multipleLanguageExist
#static server boolean multipleLanguageExist()
#{
# LanguageTable languageTable;
#
# select count(RecId) from languageTable
# where languageTable.LanguageId != '' &&
# languageTable.LabelFile == NoYes::Yes;
#
# return languageTable.RecId > 1 ? true : false;
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : DirPartyTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #DirPartyTable
Id 2303
PROPERTIES
Name #DirPartyTable
Label #@SYS105155
FormRef #DirPartyTable
TitleField1 #PartyId
TitleField2 #Type
SecurityKey #BasicTables
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Main
PrimaryIndex #PartyIdIdx
ClusterIndex #NameIdx
AnalysisVisibility #High
ModifiedDateTime #Yes
ModifiedBy #Yes
CreatedDateTime #Yes
CreatedBy #Yes
DeveloperDocumentation #@SYS124681
ENDPROPERTIES
FIELDS
FIELD #GenerationalSuffix
Id 4
STRING
PROPERTIES
Name #GenerationalSuffix
Table #DirPartyTable
ExtendedDataType
ARRAY
#DirPersonGenerationalNameSuffix
#
ENDARRAY
ENDPROPERTIES
FIELD #Name
Id 5
STRING
PROPERTIES
Name #Name
Table #DirPartyTable
ExtendedDataType
ARRAY
#DirPartyName
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #Salutation
Id 6
STRING
PROPERTIES
Name #Salutation
Table #DirPartyTable
ExtendedDataType
ARRAY
#DirPersonSalutation
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #PersonNameOrder
Id 7
ENUM
PROPERTIES
Name #PersonNameOrder
Table #DirPartyTable
EnumType #DirPersonNameOrder
ENDPROPERTIES
FIELD #LanguageId
Id 8
STRING
PROPERTIES
Name #LanguageId
Table #DirPartyTable
ExtendedDataType
ARRAY
#LanguageId
#
ENDARRAY
StringSize #7
ENDPROPERTIES
FIELD #Type
Id 9
ENUM
PROPERTIES
Name #Type
Mandatory #Yes
AllowEdit #No
Table #DirPartyTable
EnumType #DirPartyType
ENDPROPERTIES
FIELD #Prefix
Id 11
STRING
PROPERTIES
Name #Prefix
Table #DirPartyTable
ExtendedDataType
ARRAY
#DirProfessionalPrefix
#
ENDARRAY
ENDPROPERTIES
FIELD #ProfessionalSuffix
Id 12
STRING
PROPERTIES
Name #ProfessionalSuffix
Table #DirPartyTable
ExtendedDataType
ARRAY
#DirProfessionalSuffix
#
ENDARRAY
ENDPROPERTIES
FIELD #FirstName
Id 14
STRING
PROPERTIES
Name #FirstName
Table #DirPartyTable
ExtendedDataType
ARRAY
#FirstName
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #MiddleName
Id 15
STRING
PROPERTIES
Name #MiddleName
Table #DirPartyTable
ExtendedDataType
ARRAY
#MiddleName
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #LastName
Id 16
STRING
PROPERTIES
Name #LastName
Table #DirPartyTable
ExtendedDataType
ARRAY
#LastName
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #PartyId
Id 18
STRING
PROPERTIES
Name #PartyId
Mandatory #Yes
AllowEdit #No
Table #DirPartyTable
ExtendedDataType
ARRAY
#DirPartyId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #NameAlias
Id 20
STRING
PROPERTIES
Name #NameAlias
Table #DirPartyTable
ExtendedDataType
ARRAY
#NameAlias
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Memo
Id 24
STRING
PROPERTIES
Name #Memo
Table #DirPartyTable
ExtendedDataType
ARRAY
#DirMemo
#
ENDARRAY
StringSize #(Memo)
ENDPROPERTIES
FIELD #CGranVatNum
Id 30001
STRING
PROPERTIES
Name #CGranVatNum
Table #DirPartyTable
ExtendedDataType
ARRAY
#VATNum
#
ENDARRAY
StringSize #20
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#PartyId
#Type
#Name
#NameAlias
#LanguageId
ENDGROUPFIELDS
ENDGROUP
GROUP #AutoLookup
PROPERTIES
Name #AutoLookup
ENDPROPERTIES
GROUPFIELDS
#PartyId
#Type
#Name
ENDGROUPFIELDS
ENDGROUP
GROUP #All
PROPERTIES
Name #All
Label #@SYS80094
ENDPROPERTIES
GROUPFIELDS
#PersonNameOrder
#Name
#LanguageId
#Type
#Prefix
#ProfessionalSuffix
#FirstName
#MiddleName
#LastName
#PartyId
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS36186
ENDPROPERTIES
GROUPFIELDS
#PartyId
#Name
#Type
#NameAlias
ENDGROUPFIELDS
ENDGROUP
GROUP #Language
PROPERTIES
Name #Language
Label #@SYS66040
ENDPROPERTIES
GROUPFIELDS
#LanguageId
ENDGROUPFIELDS
ENDGROUP
GROUP #Memo
PROPERTIES
Name #Memo
Label #@SYS80402
ENDPROPERTIES
GROUPFIELDS
#Memo
ENDGROUPFIELDS
ENDGROUP
GROUP #Other
PROPERTIES
Name #Other
Label #@SYS30289
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #PersonName
PROPERTIES
Name #PersonName
Label #@SYS80991
ENDPROPERTIES
GROUPFIELDS
#Prefix
#Salutation
#FirstName
#MiddleName
#LastName
#GenerationalSuffix
#ProfessionalSuffix
#PersonNameOrder
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#NameIdx
Id 1
PROPERTIES
Name #NameIdx
ENDPROPERTIES
INDEXFIELDS
#Name
ENDINDEXFIELDS
#PartyIdIdx
Id 10
PROPERTIES
Name #PartyIdIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#PartyId
ENDINDEXFIELDS
#CGranVatNum
Id 30001
PROPERTIES
Name #CGranVatNum
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#CGranVatNum
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
#HRPLimitTableRelationship
PROPERTIES
Table #HRPLimitTableRelationship
DeleteAction #Cascade
ENDPROPERTIES
#DirPersonPartyDetail
PROPERTIES
Table #DirPersonPartyDetail
DeleteAction #Cascade
ENDPROPERTIES
#DirOrganizationDetail
PROPERTIES
Table #DirOrganizationDetail
DeleteAction #Cascade
ENDPROPERTIES
#DirPartyRelationship
PROPERTIES
Table #DirPartyRelationship
DeleteAction #Cascade + Restricted
ENDPROPERTIES
#DirPartyECommunicationRelationship
PROPERTIES
Table #DirPartyECommunicationRelationship
DeleteAction #Cascade
ENDPROPERTIES
#DocuRef
PROPERTIES
Table #DocuRef
DeleteAction #Cascade
ENDPROPERTIES
#DirPartyAddressRelationship
PROPERTIES
Table #DirPartyAddressRelationship
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #delete
#public void delete()
#{
# super();
#}
ENDSOURCE
SOURCE #initFromDirParty
#///
#/// Initializes the current record from an instance of DirParty.
#///
#///
#/// An instance of DirParty class from which the current record needs to be intialized.
#///
#void initFromDirParty(DirParty _dirParty)
#{
# ;
# // basic info
# if (_dirParty.parmBasicInfo())
# {
# this.Type = _dirParty.parmType();
# this.PartyId = _dirParty.parmPartyId();
# this.Name = _dirParty.parmName();
# this.NameAlias = _dirParty.parmNameAlias();
# this.LanguageId = _dirParty.parmLanguageId();
# this.FirstName = _dirParty.parmFirstName();
# this.MiddleName = _dirParty.parmMiddleName();
# this.LastName = _dirParty.parmLastName();
# this.Salutation = _dirParty.parmSalutation();
# this.Prefix = _dirParty.parmPrefix() ;
# this.ProfessionalSuffix = _dirParty.parmProfessionalSuffix();
# this.GenerationalSuffix = _dirParty.parmGenerationalSuffix();
# this.NameAlias = _dirParty.parmNameAlias();
# this.Memo = _dirParty.parmMemo();
# }
#}
ENDSOURCE
SOURCE #initValue
#///
#/// Initializes the current record.
#///
#public server void initValue()
#{
# ;
#
# super();
#
# this.LanguageId = CompanyInfo::find().LanguageId;
# this.PersonNameOrder = DirParameters::find().PersonNameOrder;
# this.Type = DirParameters::find().PartyDefaultPartyType;
#
#}
ENDSOURCE
SOURCE #Insert
#public void insert()
#{
# ;
# if (!this.PartyId)
# {
# this.PartyId = DirPartyTable::getNewPartyId();
# }
# super();
#
#}
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
# ;
#
# super(_fieldId);
#
# switch(_fieldId)
# {
# case fieldnum(DirPartyTable, Type) :
# case fieldnum(DirPartyTable, Name) :
# if (this.Type == DirPartyType::Person)
# {
# this.DirPersonPartyNameMap::analyzeName(this.PersonNameOrder);
# }
# else
# {
# this.FirstName = '';
# this.MiddleName = '';
# this.LastName = '';
# this.ProfessionalSuffix = '';
# this.GenerationalSuffix = '';
# this.Salutation = '';
# }
# if (_fieldId == fieldnum(DirPartyTable,Name))
# {
# this.setNameAlias();
# }
# break;
#
# case fieldnum(DirPartyTable, FirstName) :
# case fieldnum(DirPartyTable, MiddleName) :
# case fieldnum(DirPartyTable, LastName) :
# case fieldnum(DirPartyTable, GenerationalSuffix) :
# case fieldnum(DirPartyTable, Salutation) :
# case fieldnum(DirPartyTable, PersonNameOrder) :
# if (this.Type == DirPartyType::Person)
# {
# this.DirPersonPartyNameMap::analyzeNameDetails(this.PersonNameOrder);
# }
# this.setNameAlias();
# break;
#
# }
#}
ENDSOURCE
SOURCE #PrimaryAddress
#///
#/// Gets the the primary address for the selected Address book record.
#///
#///
#/// The primary address for the Address book record.
#///
#//BP deviation documented
#display Addressing primaryAddress()
#{
# Address address;
# DirPartyAddressRelationship partyAddressRelationship;
# DirPartyAddressRelationshipMapping addressRelationshipMapping;
# ;
#
# select partyAddressRelationship
# where partyAddressRelationship.PartyId == this.PartyId && partyAddressRelationship.IsPrimary
# join addressRelationshipMapping
# where addressRelationshipMapping.PartyAddressRelationshipRecId == partyAddressRelationship.RecId
# join address
# where address.RecId == addressRelationshipMapping.AddressRecId;
#
# return address ? address.Address : "";
#}
ENDSOURCE
SOURCE #setNameAlias
#///
#/// Sets the NameAlias from Name.
#///
#void setNameAlias()
#{
# if (!this.NameAlias)
# {
# this.NameAlias = this.Name;
# }
#}
ENDSOURCE
SOURCE #showCompanyName
#///
#/// Gets the name from the Address book record.
#///
#///
#/// The name from the Address book record.
#///
#//BP Deviation documented
#display DirPartyOrganizationName showCompanyName()
#{
# return this.Name;
#}
ENDSOURCE
SOURCE #showDocHanIcon
#///
#/// Gets the document handling icon for the Address book record.
#///
#///
#/// The icon number to show document handling icon for the Address book record.
#///
#//BP Deviation documented
#display smmDocIconNum showDocHanIcon()
#{
# #macrolib.resource
# ;
#
# if (this.PartyId && (select firstonly docuRef where docuRef.RefCompanyId == (curext()) && docuRef.RefTableId == tablenum(DirPartyTable) && docuRef.RefRecId == this.RecId).RecId)
# {
# return #RES_NODE_DOC;
# }
#
# return #RES_AM_NEW;
#}
ENDSOURCE
SOURCE #update
#public void update(boolean _updateRel = true)
#{
# ;
# super();
# if (_updateRel)
# {
# DirParty::updateRelsFromParty(DirParty::constructFromCommon(this));
# }
#}
ENDSOURCE
SOURCE #validateDelete
#public boolean validateDelete(boolean _showInfoLog = true)
#{
# boolean ret;
#
# ret = super();
#
# ret = ret && DirParty::canDeleteParty(this.PartyId,_showInfoLog);
#
# return ret;
#}
ENDSOURCE
SOURCE #CGranFindVatNum
#//CarlosGranados:Método que busca un registro por el NIF
#static DirPartyTable CGranFindVatNum(VatNum _vatNum,boolean _forUpdate = false) {
#
# DirPartyTable dirPartyTable;
# ;
# dirPartyTable.selectForUpdate(_forUpdate);
# select firstonly dirPartyTable
# index hint CGranVatNum
# where dirPartyTable.CGranVatNum == _vatNum;
#
# return dirPartyTable;
#
#}
ENDSOURCE
SOURCE #createNew
#///
#/// Creates a new record in DirPartyTable.
#///
#///
#/// A DirPartyType value for the new DirPartyTable record.
#///
#///
#/// A Name value for the new DirPartyTable record.
#///
#///
#/// A DirPartyId value for the new DirPartyTable record; optional.
#///
#///
#/// A newly created DirPartyTable record.
#///
#public static DirPartyTable createNew(DirPartyType _partyType, Name _name, DirPartyId _partyId = '')
#{
# DirPartyTable partyTable;
# ;
#
# partyTable.initValue();
#
# if (_partyId)
# {
# partyTable.PartyId = _partyId;
# }
# else
# {
# partyTable.PartyId = DirPartyTable::getNewPartyId();
# }
#
# partyTable.Type = _partyType;
# partyTable.Name = _name;
#
# partyTable.setNameAlias();
#
# partyTable.insert();
#
# return partyTable;
#}
ENDSOURCE
SOURCE #exist
#///
#/// Checks if a record exists in DirECommunicaionTypeTable table based on a DirPartyId value.
#///
#///
#/// A DirPartyId value on the basis of which a record needs to be selected.
#///
#///
#/// true if a the record exists; otherwise false.
#///
#public static boolean exist(DirPartyId _partyId)
#{;
# return DirPartyTable::find(_partyId).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#///
#/// Gets a record from the DirPartyTable table based on a DirPartyId value.
#///
#///
#/// A DirPartyId value on basis of which a record needs to be selected.
#///
#///
#/// A Boolean value that indicates whether to read the record for update; optional.
#///
#///
#/// A record from the DirPartyTable table.
#///
#public static DirPartyTable find(DirPartyId _partyId, boolean _forupdate = false)
#{
# DirPartyTable partyTable = null;
# ;
#
# if (_partyId)
# {
# if (_forupdate)
# {
# select pessimisticlock firstonly partyTable where partyTable.PartyId == _partyId;
# }
# else
# {
# select firstonly partyTable where partyTable.PartyId == _partyId;
# }
# }
#
# return partyTable;
#}
ENDSOURCE
SOURCE #findByName
#///
#/// Gets the first record from the DirECommunicationTypeTable table based on a Name and DirPartyType values.
#///
#///
#/// A Name value on basis of which a record needs to be selected.
#///
#///
#/// A DirPartyType value on basis of which a record needs to be selected.
#///
#///
#/// A Boolean value that indicates whether to read the record for update; optional.
#///
#///
#/// A record from the DirPartyTable table.
#///
#public static DirPartyTable findByName(str _name, DirPartyType _partyType = DirPartyType::None, boolean _forupdate = false)
#{
# DirPartyTable partyTable = null;
# Name name = _name;
# ;
#
# if (_name)
# {
# partyTable.selectForUpdate(_forupdate);
#
# select partyTable
# where partyTable.Name == name &&
# (_partyType == DirPartyType::None || partyTable.Type == _partyType);
# }
#
#
# return partyTable;
#}
ENDSOURCE
SOURCE #findDuplicate
#public static server DirPartyTable findDuplicate(str _name, str _firstName, str _lastName, RecId _recId, boolean _forupdate = false)
#{
# DirPartyTable partyTable = null;
# Name name = _name;
# Name firstName = _firstName;
# Name lastName = _lastName;
# ;
#
# // check to see if we have enough information to find duplicate. We need any one of the following:
# // 1) _name
# // 2) _firstName and _lastName
# // 3) _recId
# if (_name)
# {
# select firstonly partyTable where partyTable.Name == name;
# }
# else if (_firstName && _lastName)
# {
# select firstonly partyTable where (partyTable.LastName == lastName && partyTable.FirstName == firstName);
# }
# else if (_recId)
# {
# select firstonly partyTable where partyTable.RecId == _recId;
# }
# return partyTable;
#}
ENDSOURCE
SOURCE #findRec
#public static DirPartyTable findRec(recId _recId, boolean _forupdate = false)
#{
# DirPartyTable dirName = null;
# ;
#
# if (_recId)
# {
# dirName.selectForUpdate(_forupdate);
#
# select firstonly dirName where dirName.RecId == _recId;
# }
#
# return dirName;
#}
ENDSOURCE
SOURCE #findType
#public static DirPartyTable findType(DirPartyId _partyId,DirPartyType _type, boolean _forupdate = false)
#{
# DirPartyTable partyTable = null;
# ;
#
# if (_partyId && _type != DirPartyType::None)
# {
# partyTable.selectForUpdate(_forupdate);
#
# select firstonly partyTable where partyTable.PartyId == _partyId
# && partyTable.Type == _type;
# }
#
# return partyTable;
#}
ENDSOURCE
SOURCE #getNewPartyId
#static DirPartyId getNewPartyId(boolean _throwError = true)
#{
# NumberSequenceReference numberSequenceReference;
# DirParameters dirParameters;
# SysInfoAction_MenuFunction sysInfoAction = SysInfoAction_MenuFunction::newMenuItem(menuitemdisplaystr(DirParameters),MenuItemType::Display);
# NumberSeq numberSeq;
# DirPartyId partyId;
# dataAreaId numSeqCompanyId;
# container dataAreaIdList;
# ;
# dirParameters = DirParameters::find();
# numSeqCompanyId = dirParameters.NumSeqCompanyId;
# changecompany (numSeqCompanyId)
# {
# numberSequenceReference = DirParameters::numRefDirPartyId();
# if (numberSequenceReference)
# {
# numberSeq = NumberSeq::newGetNum(numberSequenceReference, false,true);
# }
# if (numberSeq)
# {
# partyId = numberSeq.num();
# }
# }
# if (!numberSeq && _throwError)
# {
# dataAreaIdList = [numSeqCompanyId];
# select firstonly crosscompany:dataAreaIdList dirParameters;
# sysInfoAction.parmCallerBuffer(dirParameters);
# throw error(strfmt("@SYS53911",fieldid2pname(tablenum(DirPartyTable),fieldnum(DirPartyTable,PartyId))
# ,enum2str(NumberSeqModule::DIR)),'',sysInfoAction);
# }
#
# return partyId;
#
#}
ENDSOURCE
SOURCE #hasDuplicate
#public static server boolean hasDuplicate(str _name, str _firstName, str _lastName, RecId _recId)
#{
# DirPartyTable partyTable = null;
# ;
#
# partyTable = DirPartyTable::findDuplicate(_name, _firstName, _lastName, _recId);
# return (partyTable == null);
#}
ENDSOURCE
SOURCE #isCustomer
#///
#/// Determines if an Address book record represents a customer in the current company.
#///
#///
#/// A DirPartyId value of the Address book record which needs to be checked.
#///
#///
#/// true if a selected Address book record represents a customer in the current company; otherwise false.
#///
#static boolean isCustomer(DirPartyId _partyId)
#{
# CustTable custTable;
# ;
# if (_partyId)
# {
# select firstonly custTable
# where custTable.PartyId == _partyId;
#
# }
# return (custTable.RecId ? true : false);
#}
ENDSOURCE
SOURCE #isCustomerOrRelation
#///
#/// Determines if an Address book record represents a customer or a business relation in the current company.
#///
#///
#/// A DirPartyId value of the Address book record which needs to be checked.
#///
#///
#/// true if a selected Address book record represents a customer or a business relation in the current company; otherwise false.
#///
#static boolean isCustomerOrRelation(DirPartyId _partyId)
#{
# ;
# return (DirPartyTable::isCustomer(_partyId) || DirPartyTable::isRelation(_partyId));
#}
ENDSOURCE
SOURCE #isCustomerOrRelationOrVendor
#///
#/// Determines if an Address book record represents a customer, a vendor or a business relation in the current company.
#///
#///
#/// DirPartyId of the Address book record which needs to be checked.
#///
#///
#/// true if a selected Address book record represents a customer, a vendor or a business relation in the current company; otherwise false.
#///
#static boolean isCustomerOrRelationOrVendor(DirPartyId _partyId)
#{
# ;
# return (DirPartyTable::isCustomer(_partyId) || DirPartyTable::isvendor(_partyId) || DirPartyTable::isRelation(_partyId));
#}
ENDSOURCE
SOURCE #isCustomerOrRelationOrVendorOrEmployee
#///
#/// Determines if an Address book record represents a customer, a vendor, an employee or a business relation in the current company.
#///
#///
#/// A DirPartyId value of the Address book record which needs to be checked.
#///
#///
#/// true if a selected Address book record represents a customer, a vendor, an employee or a business relation in the current company; otherwise false.
#///
#static boolean isCustomerOrRelationOrVendorOrEmployee(DirPartyId _partyId)
#{
# ;
# return (DirPartyTable::isCustomer(_partyId) || DirPartyTable::isvendor(_partyId) || DirPartyTable::isRelation(_partyId) || DirPartyTable::isEmployee(_partyId));
#}
ENDSOURCE
SOURCE #isEmployee
#///
#/// Determines if an Address book record represents an employee in the current company.
#///
#///
#/// A DirPartyId value of the Address book record which needs to be checked.
#///
#///
#/// true if a selected Address book record represents a employee in the current company; otherwise false.
#///
#static boolean isEmployee(DirPartyId _partyId)
#{
# EmplTable emplTable;
# ;
#
# if (_partyId)
# {
# select firstonly emplTable
# where emplTable.PartyId == _partyId;
#
# }
# return (emplTable.RecId ? true : false);
#}
ENDSOURCE
SOURCE #isEmployeeOrRelation
#///
#/// To check if an Address book record represents an employee or a business relation in current company.
#///
#///
#/// A DirPartyId value of the Address book record which needs to be checked.
#///
#///
#/// true if a selected Address book record represents an employee or a business relation in the current company; otherwise false.
#///
#static boolean isEmployeeOrRelation(DirPartyId _partyId)
#{
# ;
# return (DirPartyTable::isEmployee(_partyId) || DirPartyTable::isRelation(_partyId));
#}
ENDSOURCE
SOURCE #isRelation
#///
#/// Determines if an Address book record represents a business relation in the current company.
#///
#///
#/// A DirPartyId value of the Address book record which needs to be checked.
#///
#///
#/// true if a selected Address book record represents a business relation in the current company; otherwise false.
#///
#static boolean isRelation(DirPartyId _partyId)
#{
# smmBusRelTable smmBusRelTable;
# ;
# if (_partyId)
# {
# select firstonly smmBusRelTable
# where smmBusRelTable.PartyId == _partyId;
#
# }
# return (smmBusRelTable.RecId ? true : false);
#}
ENDSOURCE
SOURCE #isvendor
#///
#/// Determines if an Address book record represents a vendor in the current company.
#///
#///
#/// A DirPartyId value of the Address book record which needs to be checked.
#///
#///
#/// true if a selected Address book record represents a vendor in the current company; otherwise false.
#///
#static boolean isvendor(DirPartyId _partyId)
#{
# VendTable vendTable;
# ;
# if (_partyId)
# {
# select firstonly vendTable
# where vendTable.PartyId == _partyId;
# }
# return (vendTable.RecId ? true : false);
#}
ENDSOURCE
SOURCE #nameCount
#///
#/// To get the number of records in address book which have particular name and type.
#///
#///
#/// Name of the address book record which needs to be checked.
#///
#///
#/// Party type of the address book record which needs to be checked.
#///
#///
#/// Returns number of records in address book which have particular name and type.
#///
#public static server Counter nameCount(Name _name, DirPartyType _partyType = DirPartyType::None)
#{
# DirPartyTable partyTable;
# ;
#
#
# if (_name)
# {
# select count(RecId) from partyTable
# where partyTable.Name == _name
# && (_partyType == DirPartyType::None || partyTable.Type == _partyType);
# }
#
# return any2int(partyTable.RecId);
#}
ENDSOURCE
SOURCE #nameLikeCount
#///
#/// To get the number of records in address book which have partial match for name and type.
#///
#///
#/// Partial name of the address book record which needs to be checked.
#///
#///
#/// Party type of the address book record which needs to be checked.
#///
#///
#/// Returns number of records in address book which have partial match for name and type.
#///
#public static server Counter nameLikeCount(Name _name, DirPartyType _partyType = DirPartyType::None)
#{
# DirPartyTable partyTable;
# ;
#
#
# if (_name)
# {
# select count(RecId) from partyTable
# where partyTable.Name like ('*'+_name+'*')
# && (_partyType == DirPartyType::None || partyTable.Type == _partyType);
# }
#
# return any2int(partyTable.RecId);
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : CustTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #CustTable
Id 77
PROPERTIES
Name #CustTable
Label #@SYS11307
SearchLinkRefName #EPCustTableInfo
TitleField1 #AccountNum
TitleField2 #Name
ConfigurationKey #LedgerBasic
SecurityKey #CustTables
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Main
PrimaryIndex #AccountIdx
ClusterIndex #AccountIdx
AnalysisVisibility #High
ModifiedDateTime #Yes
CreatedDateTime #Yes
DeveloperDocumentation #@SYS125115
ENDPROPERTIES
FIELDS
FIELD #AccountNum
Id 1
STRING
PROPERTIES
Name #AccountNum
Mandatory #Yes
AllowEdit #No
Table #CustTable
ExtendedDataType
ARRAY
#CustAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Name
Id 2
STRING
PROPERTIES
Name #Name
HelpText #@SYS16724
Table #CustTable
ExtendedDataType
ARRAY
#CustName
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #Address
Id 3
STRING
PROPERTIES
Name #Address
HelpText #@SYS16717
AllowEditOnCreate #No
AllowEdit #No
Table #CustTable
ExtendedDataType
ARRAY
#Addressing
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #Phone
Id 4
STRING
PROPERTIES
Name #Phone
HelpText #@SYS16721
Table #CustTable
ExtendedDataType
ARRAY
#Phone
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #TeleFax
Id 5
STRING
PROPERTIES
Name #TeleFax
HelpText #@SYS16720
Table #CustTable
ExtendedDataType
ARRAY
#TeleFax
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InvoiceAccount
Id 6
STRING
PROPERTIES
Name #InvoiceAccount
HelpText #@SYS14122
Table #CustTable
ExtendedDataType
ARRAY
#CustInvoiceAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CustGroup
Id 7
STRING
PROPERTIES
Name #CustGroup
HelpText #@SYS16728
Mandatory #Yes
Table #CustTable
ExtendedDataType
ARRAY
#CustGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #LineDisc
Id 8
STRING
PROPERTIES
Name #LineDisc
HelpText #@SYS14523
Table #CustTable
ExtendedDataType
ARRAY
#CustLineDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #PaymTermId
Id 9
STRING
PROPERTIES
Name #PaymTermId
Table #CustTable
ExtendedDataType
ARRAY
#CustPaymTermId
#
ENDARRAY
ENDPROPERTIES
FIELD #CashDisc
Id 10
STRING
PROPERTIES
Name #CashDisc
HelpText #@SYS11450
Table #CustTable
ExtendedDataType
ARRAY
#CustCashDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #Currency
Id 11
STRING
PROPERTIES
Name #Currency
HelpText #@SYS20784
Mandatory #Yes
Table #CustTable
ExtendedDataType
ARRAY
#CustCurrencyCode
#
ENDARRAY
StringSize #3
ENDPROPERTIES
FIELD #InterCompanyAutoCreateOrders
Id 12
ENUM
PROPERTIES
Name #InterCompanyAutoCreateOrders
Table #CustTable
ExtendedDataType
ARRAY
#InterCompanyAutoCreateOrders
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #SalesGroup
Id 13
STRING
PROPERTIES
Name #SalesGroup
Table #CustTable
ExtendedDataType
ARRAY
#CommissSalesGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #Blocked
Id 14
ENUM
PROPERTIES
Name #Blocked
Table #CustTable
ExtendedDataType
ARRAY
#CustBlocked
#
ENDARRAY
EnumType #CustVendorBlocked
ENDPROPERTIES
FIELD #OneTimeCustomer
Id 15
ENUM
PROPERTIES
Name #OneTimeCustomer
Table #CustTable
ExtendedDataType
ARRAY
#OneTimeCustomer
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #AccountStatement
Id 16
ENUM
PROPERTIES
Name #AccountStatement
Table #CustTable
EnumType #CustAccountStatement
ENDPROPERTIES
FIELD #CreditMax
Id 17
REAL
PROPERTIES
Name #CreditMax
Table #CustTable
ExtendedDataType
ARRAY
#CustCreditMaxMST
#
ENDARRAY
ENDPROPERTIES
FIELD #MandatoryCreditLimit
Id 18
ENUM
PROPERTIES
Name #MandatoryCreditLimit
Table #CustTable
ExtendedDataType
ARRAY
#MandatoryCreditLimit
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Dimension
Id 19
STRING
PROPERTIES
Name #Dimension
Table #CustTable
ExtendedDataType
ARRAY
#Dimension
#
ENDARRAY
ENDPROPERTIES
FIELD #VendAccount
Id 20
STRING
PROPERTIES
Name #VendAccount
HelpText #@SYS14076
Table #CustTable
ExtendedDataType
ARRAY
#VendAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Telex
Id 21
STRING
PROPERTIES
Name #Telex
HelpText #@SYS16722
Table #CustTable
ExtendedDataType
ARRAY
#Telex
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PriceGroup
Id 22
STRING
PROPERTIES
Name #PriceGroup
HelpText #@SYS15620
Table #CustTable
ExtendedDataType
ARRAY
#CustPriceGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #MultiLineDisc
Id 23
STRING
PROPERTIES
Name #MultiLineDisc
HelpText #@SYS6705
Table #CustTable
ExtendedDataType
ARRAY
#CustMultiLineDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #EndDisc
Id 24
STRING
PROPERTIES
Name #EndDisc
HelpText #@SYS3140
Table #CustTable
ExtendedDataType
ARRAY
#CustEndDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #VATNum
Id 25
STRING
PROPERTIES
Name #VATNum
HelpText #@SYS12082
Table #CustTable
ExtendedDataType
ARRAY
#VATNum
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CountryRegionId
Id 26
STRING
PROPERTIES
Name #CountryRegionId
Table #CustTable
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventLocation
Id 27
STRING
PROPERTIES
Name #InventLocation
HelpText #@SYS16976
Table #CustTable
ExtendedDataType
ARRAY
#InventLocationId
#
ENDARRAY
ENDPROPERTIES
FIELD #DlvTerm
Id 28
STRING
PROPERTIES
Name #DlvTerm
HelpText #@SYS10971
Table #CustTable
ExtendedDataType
ARRAY
#CustDlvTermId
#
ENDARRAY
ENDPROPERTIES
FIELD #DlvMode
Id 29
STRING
PROPERTIES
Name #DlvMode
HelpText #@SYS11153
Table #CustTable
ExtendedDataType
ARRAY
#CustDlvModeId
#
ENDARRAY
ENDPROPERTIES
FIELD #MarkupGroup
Id 30
STRING
PROPERTIES
Name #MarkupGroup
Table #CustTable
ExtendedDataType
ARRAY
#CustMarkupGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #ClearingPeriod
Id 31
STRING
PROPERTIES
Name #ClearingPeriod
Table #CustTable
ExtendedDataType
ARRAY
#CustClearingPeriod
#
ENDARRAY
ENDPROPERTIES
FIELD #ZipCode
Id 32
STRING
PROPERTIES
Name #ZipCode
Table #CustTable
ExtendedDataType
ARRAY
#AddressZipCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #State
Id 33
STRING
PROPERTIES
Name #State
Table #CustTable
ExtendedDataType
ARRAY
#AddressStateId
#
ENDARRAY
ENDPROPERTIES
FIELD #County
Id 34
STRING
PROPERTIES
Name #County
Table #CustTable
ExtendedDataType
ARRAY
#AddressCountyId
#
ENDARRAY
ENDPROPERTIES
FIELD #URL
Id 35
STRING
PROPERTIES
Name #URL
Table #CustTable
ExtendedDataType
ARRAY
#URL
#
ENDARRAY
StringSize #255
ENDPROPERTIES
FIELD #Email
Id 36
STRING
PROPERTIES
Name #Email
Table #CustTable
ExtendedDataType
ARRAY
#Email
#
ENDARRAY
StringSize #80
ENDPROPERTIES
FIELD #CellularPhone
Id 37
STRING
PROPERTIES
Name #CellularPhone
HelpText #@SYS28156
Table #CustTable
ExtendedDataType
ARRAY
#PhoneMobile
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PhoneLocal
Id 38
STRING
PROPERTIES
Name #PhoneLocal
Table #CustTable
ExtendedDataType
ARRAY
#PhoneLocal
#
ENDARRAY
ENDPROPERTIES
FIELD #FreightZone
Id 39
STRING
PROPERTIES
Name #FreightZone
Table #CustTable
ExtendedDataType
ARRAY
#CustFreightZoneId
#
ENDARRAY
ENDPROPERTIES
FIELD #CreditRating
Id 40
STRING
PROPERTIES
Name #CreditRating
Table #CustTable
ExtendedDataType
ARRAY
#CustCreditRating
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxGroup
Id 41
STRING
PROPERTIES
Name #TaxGroup
Table #CustTable
ExtendedDataType
ARRAY
#TaxGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #StatisticsGroup
Id 42
STRING
PROPERTIES
Name #StatisticsGroup
Table #CustTable
ExtendedDataType
ARRAY
#CustStatGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #PaymMode
Id 43
STRING
PROPERTIES
Name #PaymMode
Table #CustTable
ExtendedDataType
ARRAY
#CustPaymMode
#
ENDARRAY
ENDPROPERTIES
FIELD #CommissionGroup
Id 44
STRING
PROPERTIES
Name #CommissionGroup
HelpText #@SYS8360
Table #CustTable
ExtendedDataType
ARRAY
#CommissCustomerGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #BankAccount
Id 45
STRING
PROPERTIES
Name #BankAccount
Table #CustTable
ExtendedDataType
ARRAY
#CustBankAccountId
#
ENDARRAY
ENDPROPERTIES
FIELD #PaymSched
Id 46
STRING
PROPERTIES
Name #PaymSched
Table #CustTable
ExtendedDataType
ARRAY
#PaymSchedId
#
ENDARRAY
StringSize #30
ENDPROPERTIES
FIELD #NameAlias
Id 47
STRING
PROPERTIES
Name #NameAlias
Table #CustTable
AliasFor #AccountNum
ExtendedDataType
ARRAY
#CustTableAlias
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ContactPersonId
Id 48
STRING
PROPERTIES
Name #ContactPersonId
HelpText #@SYS26087
Table #CustTable
ExtendedDataType
ARRAY
#ContactPersonId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InvoiceAddress
Id 49
ENUM
PROPERTIES
Name #InvoiceAddress
Table #CustTable
ExtendedDataType
ARRAY
#CustInvoiceAddress
#
ENDARRAY
EnumType #InvoiceOrderAccount
ENDPROPERTIES
FIELD #OurAccountNum
Id 50
STRING
PROPERTIES
Name #OurAccountNum
Table #CustTable
ExtendedDataType
ARRAY
#CustAccountExt
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SalesPoolId
Id 51
STRING
PROPERTIES
Name #SalesPoolId
Table #CustTable
ExtendedDataType
ARRAY
#CustSalesPoolId
#
ENDARRAY
ENDPROPERTIES
FIELD #InclTax
Id 60
ENUM
PROPERTIES
Name #InclTax
Table #CustTable
ExtendedDataType
ARRAY
#InclTax
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #CustItemGroupId
Id 61
STRING
PROPERTIES
Name #CustItemGroupId
Table #CustTable
ExtendedDataType
ARRAY
#CustItemGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #numberSequenceGroup
Id 62
STRING
PROPERTIES
Name #numberSequenceGroup
Table #CustTable
ExtendedDataType
ARRAY
#NumberSequenceGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #LanguageId
Id 63
STRING
PROPERTIES
Name #LanguageId
HelpText #@SYS4185
Mandatory #Yes
Table #CustTable
ExtendedDataType
ARRAY
#CustLanguageId
#
ENDARRAY
StringSize #7
ENDPROPERTIES
FIELD #PaymDayId
Id 64
STRING
PROPERTIES
Name #PaymDayId
Table #CustTable
ExtendedDataType
ARRAY
#CustPaymDayId
#
ENDARRAY
ENDPROPERTIES
FIELD #LineOfBusinessId
Id 65
STRING
PROPERTIES
Name #LineOfBusinessId
Table #CustTable
ExtendedDataType
ARRAY
#CustLineOfBusinessId
#
ENDARRAY
ENDPROPERTIES
FIELD #DestinationCodeId
Id 66
STRING
PROPERTIES
Name #DestinationCodeId
Table #CustTable
ExtendedDataType
ARRAY
#CustDestinationCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #GiroType
Id 67
ENUM
PROPERTIES
Name #GiroType
Table #CustTable
ExtendedDataType
ARRAY
#PaymentStubInvoiceId
#
ENDARRAY
EnumType #PaymentStub
ENDPROPERTIES
FIELD #SuppItemGroupId
Id 68
STRING
PROPERTIES
Name #SuppItemGroupId
Table #CustTable
ExtendedDataType
ARRAY
#CustSuppItemGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #GiroTypeInterestNote
Id 69
ENUM
PROPERTIES
Name #GiroTypeInterestNote
Table #CustTable
ExtendedDataType
ARRAY
#PaymentStubInterestId
#
ENDARRAY
EnumType #PaymentStub
ENDPROPERTIES
FIELD #TaxLicenseNum
Id 70
STRING
PROPERTIES
Name #TaxLicenseNum
Table #CustTable
ExtendedDataType
ARRAY
#TaxPackagingLicenseNum
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #WebSalesOrderDisplay
Id 71
ENUM
PROPERTIES
Name #WebSalesOrderDisplay
Table #CustTable
EnumType #ECPsalesOrdersViewType
ENDPROPERTIES
FIELD #PaymSpec
Id 72
STRING
PROPERTIES
Name #PaymSpec
Table #CustTable
ExtendedDataType
ARRAY
#PaymSpec
#
ENDARRAY
ENDPROPERTIES
FIELD #BankCentralBankPurposeText
Id 73
STRING
PROPERTIES
Name #BankCentralBankPurposeText
Table #CustTable
ExtendedDataType
ARRAY
#BankCentralBankPurposeText
#
ENDARRAY
StringSize #140
ENDPROPERTIES
FIELD #BankCentralBankPurposeCode
Id 74
STRING
PROPERTIES
Name #BankCentralBankPurposeCode
Table #CustTable
ExtendedDataType
ARRAY
#BankCentralBankPurposeCode
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_PrintModuleType
Id 75
ENUM
PROPERTIES
Name #DEL_PrintModuleType
Label #@SYS54502
ConfigurationKey #SysDeletedObjects41
Table #CustTable
EnumType #DEL_ModuleCustSalesParameters
ENDPROPERTIES
FIELD #City
Id 76
STRING
PROPERTIES
Name #City
Table #CustTable
ExtendedDataType
ARRAY
#AddressCity
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #Street
Id 77
STRING
PROPERTIES
Name #Street
Table #CustTable
ExtendedDataType
ARRAY
#AddressStreet
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #Pager
Id 78
STRING
PROPERTIES
Name #Pager
Table #CustTable
ExtendedDataType
ARRAY
#Pager
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SMS
Id 79
STRING
PROPERTIES
Name #SMS
Table #CustTable
ExtendedDataType
ARRAY
#SMS
#
ENDARRAY
StringSize #80
ENDPROPERTIES
FIELD #InterCompanyAllowIndirectCreation
Id 80
ENUM
PROPERTIES
Name #InterCompanyAllowIndirectCreation
Table #CustTable
ExtendedDataType
ARRAY
#InterCompanyAllowIndirectCreation
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_RefZipCode
Id 81
INT64
PROPERTIES
Name #DEL_RefZipCode
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #SysDeletedObjects40
Table #CustTable
ExtendedDataType
ARRAY
#RefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #PackMaterialFeeLicenseNum
Id 82
STRING
PROPERTIES
Name #PackMaterialFeeLicenseNum
Table #CustTable
ExtendedDataType
ARRAY
#InventPackingMaterialFeeLicenseNum
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #TaxBorderNumber_FI
Id 83
STRING
PROPERTIES
Name #TaxBorderNumber_FI
Table #CustTable
ExtendedDataType
ARRAY
#TaxBorderNumber_FI
#
ENDARRAY
ENDPROPERTIES
FIELD #EinvoiceEANNum
Id 84
STRING
PROPERTIES
Name #EinvoiceEANNum
ConfigurationKey #CRSEDenmark
Table #CustTable
ExtendedDataType
ARRAY
#EinvoiceEANNum
#
ENDARRAY
StringSize #13
ENDPROPERTIES
FIELD #FiscalCode
Id 86
STRING
PROPERTIES
Name #FiscalCode
HelpText #@SYS79253
Table #CustTable
ExtendedDataType
ARRAY
#FiscalCode
#
ENDARRAY
StringSize #16
ENDPROPERTIES
FIELD #DlvReason
Id 87
STRING
PROPERTIES
Name #DlvReason
Table #CustTable
ExtendedDataType
ARRAY
#DlvReasonId
#
ENDARRAY
ENDPROPERTIES
FIELD #ForecastDMPInclude
Id 88
ENUM
PROPERTIES
Name #ForecastDMPInclude
Table #CustTable
ExtendedDataType
ARRAY
#ForecastDMPInclude
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #GiroTypeCollectionletter
Id 89
ENUM
PROPERTIES
Name #GiroTypeCollectionletter
Table #CustTable
ExtendedDataType
ARRAY
#PaymentStubCollectionId
#
ENDARRAY
EnumType #PaymentStub
ENDPROPERTIES
FIELD #SalesCalendarId
Id 90
STRING
PROPERTIES
Name #SalesCalendarId
Table #CustTable
ExtendedDataType
ARRAY
#SalesCalendarId
#
ENDARRAY
ENDPROPERTIES
FIELD #CustClassificationId
Id 91
STRING
PROPERTIES
Name #CustClassificationId
Table #CustTable
ExtendedDataType
ARRAY
#CustClassificationId
#
ENDARRAY
ENDPROPERTIES
FIELD #InterCompanyDirectDelivery
Id 92
ENUM
PROPERTIES
Name #InterCompanyDirectDelivery
Table #CustTable
ExtendedDataType
ARRAY
#InterCompanyDirectDelivery
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #EnterpriseNumber
Id 93
STRING
PROPERTIES
Name #EnterpriseNumber
Table #CustTable
ExtendedDataType
ARRAY
#TaxEnterpriseNumber
#
ENDARRAY
StringSize #50
ENDPROPERTIES
FIELD #ShipCarrierAccount
Id 94
STRING
PROPERTIES
Name #ShipCarrierAccount
ConfigurationKey #ShipCarrier
Table #CustTable
ExtendedDataType
ARRAY
#ShipCarrierAccount
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #GiroTypeProjInvoice
Id 95
ENUM
PROPERTIES
Name #GiroTypeProjInvoice
Table #CustTable
ExtendedDataType
ARRAY
#PaymentStubProjId
#
ENDARRAY
EnumType #PaymentStubProj
ENDPROPERTIES
FIELD #InventSiteId
Id 96
STRING
PROPERTIES
Name #InventSiteId
Table #CustTable
ExtendedDataType
ARRAY
#InventSiteId
#
ENDARRAY
ENDPROPERTIES
FIELD #OrderEntryDeadlineGroupId
Id 97
STRING
PROPERTIES
Name #OrderEntryDeadlineGroupId
HelpText #@SYS109916
Table #CustTable
ExtendedDataType
ARRAY
#InventOrderEntryDeadlineGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #ShipCarrierId
Id 98
STRING
PROPERTIES
Name #ShipCarrierId
AllowEdit #No
ConfigurationKey #ShipCarrier
Table #CustTable
ExtendedDataType
ARRAY
#ShipCarrierId
#
ENDARRAY
ENDPROPERTIES
FIELD #ShipCarrierFuelSurcharge
Id 99
ENUM
PROPERTIES
Name #ShipCarrierFuelSurcharge
ConfigurationKey #ShipCarrier
Table #CustTable
ExtendedDataType
ARRAY
#ShipCarrierFuelSurcharge
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ShipCarrierBlindShipment
Id 100
ENUM
PROPERTIES
Name #ShipCarrierBlindShipment
ConfigurationKey #ShipCarrier
Table #CustTable
ExtendedDataType
ARRAY
#ShipCarrierBlindShipment
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #PartyType
Id 101
ENUM
PROPERTIES
Name #PartyType
Mandatory #Yes
AllowEdit #No
Table #CustTable
EnumType #DirPartyType
ENDPROPERTIES
FIELD #PartyId
Id 102
STRING
PROPERTIES
Name #PartyId
AllowEdit #No
Table #CustTable
ExtendedDataType
ARRAY
#DirPartyId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ShipCarrierAccountCode
Id 103
STRING
PROPERTIES
Name #ShipCarrierAccountCode
ConfigurationKey #ShipCarrier
Table #CustTable
ExtendedDataType
ARRAY
#ShipCarrierAccountCode
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ProjPriceGroup
Id 104
STRING
PROPERTIES
Name #ProjPriceGroup
Table #CustTable
ExtendedDataType
ARRAY
#ProjPriceGroupID
#
ENDARRAY
ENDPROPERTIES
FIELD #GiroTypeFreeTextInvoice
Id 105
ENUM
PROPERTIES
Name #GiroTypeFreeTextInvoice
Label #@SYS104461
HelpText #@SYS104462
Table #CustTable
ExtendedDataType
ARRAY
#PaymentStubInvoiceId
#
ENDARRAY
EnumType #PaymentStub
ENDPROPERTIES
FIELD #SyncEntityId
Id 106
GUID
PROPERTIES
Name #SyncEntityId
Table #CustTable
ExtendedDataType
ARRAY
#SyncEntityId
#
ENDARRAY
ENDPROPERTIES
FIELD #SyncVersion
Id 107
INT64
PROPERTIES
Name #SyncVersion
Table #CustTable
ExtendedDataType
ARRAY
#SyncVersion
#
ENDARRAY
ENDPROPERTIES
FIELD #Memo
Id 108
STRING
PROPERTIES
Name #Memo
ConfigurationKey #SmmCRM
Table #CustTable
ExtendedDataType
ARRAY
#smmBusRelMemo
#
ENDARRAY
StringSize #(Memo)
ENDPROPERTIES
FIELD #SalesDistrictId
Id 109
STRING
PROPERTIES
Name #SalesDistrictId
ConfigurationKey #SmmCRM
Table #CustTable
ExtendedDataType
ARRAY
#smmSalesDistrictId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SegmentId
Id 110
STRING
PROPERTIES
Name #SegmentId
ConfigurationKey #SmmCRM
Table #CustTable
ExtendedDataType
ARRAY
#smmSegmentId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SubsegmentId
Id 111
STRING
PROPERTIES
Name #SubsegmentId
ConfigurationKey #SmmCRM
Table #CustTable
ExtendedDataType
ARRAY
#smmSubsegmentId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #RFIDItemTagging
Id 112
ENUM
PROPERTIES
Name #RFIDItemTagging
Table #CustTable
ExtendedDataType
ARRAY
#RFIDItemTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #RFIDCaseTagging
Id 113
ENUM
PROPERTIES
Name #RFIDCaseTagging
Table #CustTable
ExtendedDataType
ARRAY
#RFIDCaseTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #RFIDPalletTagging
Id 114
ENUM
PROPERTIES
Name #RFIDPalletTagging
Table #CustTable
ExtendedDataType
ARRAY
#RFIDPalletTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #CompanyChainId
Id 115
STRING
PROPERTIES
Name #CompanyChainId
Table #CustTable
ExtendedDataType
ARRAY
#smmChainId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #MainContactId
Id 116
STRING
PROPERTIES
Name #MainContactId
Table #CustTable
ExtendedDataType
ARRAY
#smmBusRelAccResponsible
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CompanyIdSiret
Id 117
STRING
PROPERTIES
Name #CompanyIdSiret
Table #CustTable
AnalysisVisibility #Low
ExtendedDataType
ARRAY
#CompanyIdSiret
#
ENDARRAY
StringSize #14
ENDPROPERTIES
FIELD #CompanyIdNAF
Id 118
STRING
PROPERTIES
Name #CompanyIdNAF
Table #CustTable
AnalysisVisibility #Low
ExtendedDataType
ARRAY
#CompanyIdNAF
#
ENDARRAY
StringSize #4
ENDPROPERTIES
FIELD #IdentificationNumber
Id 122
STRING
PROPERTIES
Name #IdentificationNumber
Table #CustTable
ExtendedDataType
ARRAY
#CustIdentificationNumber
#
ENDARRAY
StringSize #50
ENDPROPERTIES
FIELD #PartyCountry
Id 123
STRING
PROPERTIES
Name #PartyCountry
Table #CustTable
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #PartyState
Id 124
STRING
PROPERTIES
Name #PartyState
Table #CustTable
ExtendedDataType
ARRAY
#AddressStateId
#
ENDARRAY
ENDPROPERTIES
FIELD #OrgId
Id 127
STRING
PROPERTIES
Name #OrgId
Table #CustTable
ExtendedDataType
ARRAY
#OrgId
#
ENDARRAY
ENDPROPERTIES
FIELD #PaymIdType
Id 128
STRING
PROPERTIES
Name #PaymIdType
Table #CustTable
ExtendedDataType
ARRAY
#BankCustPaymIdType
#
ENDARRAY
ENDPROPERTIES
FIELD #FactoringAccount
Id 129
STRING
PROPERTIES
Name #FactoringAccount
Table #CustTable
ExtendedDataType
ARRAY
#BankCustFactoringAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DEL_NPIBankingPaymIdType
Id 130
STRING
PROPERTIES
Name #DEL_NPIBankingPaymIdType
ConfigurationKey #SysDeletedObjects40
Table #CustTable
ExtendedDataType
ARRAY
#BankCustPaymIdType
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_NPIBankingFactoringAccount
Id 131
STRING
PROPERTIES
Name #DEL_NPIBankingFactoringAccount
ConfigurationKey #SysDeletedObjects40
Table #CustTable
ExtendedDataType
ARRAY
#BankCustFactoringAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PBACustGroupId
Id 8002
STRING
PROPERTIES
Name #PBACustGroupId
Table #CustTable
ExtendedDataType
ARRAY
#PBACustGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #CGranFirstName
Id 30001
STRING
PROPERTIES
Name #CGranFirstName
Table #CustTable
ExtendedDataType
ARRAY
#FirstName
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #CGranMiddleName
Id 30002
STRING
PROPERTIES
Name #CGranMiddleName
Table #CustTable
ExtendedDataType
ARRAY
#MiddleName
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #CGranLastName
Id 30003
STRING
PROPERTIES
Name #CGranLastName
Table #CustTable
ExtendedDataType
ARRAY
#LastName
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #CGranCustBankAccount
Id 30004
STRING
PROPERTIES
Name #CGranCustBankAccount
Table #CustTable
ExtendedDataType
ARRAY
#BankAccount
#
ENDARRAY
StringSize #34
ENDPROPERTIES
FIELD #BirthDate
Id 30005
DATE
PROPERTIES
Name #BirthDate
Table #CustTable
ExtendedDataType
ARRAY
#BirthDate
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#AccountNum
#OrgId
#Name
#Address
#Phone
#Currency
#CustGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #AutoLookup
PROPERTIES
Name #AutoLookup
ENDPROPERTIES
GROUPFIELDS
#AccountNum
#PartyId
#Name
#NameAlias
#OurAccountNum
#Phone
ENDGROUPFIELDS
ENDGROUP
GROUP #Address
PROPERTIES
Name #Address
Label #@SYS9362
ENDPROPERTIES
GROUPFIELDS
#Street
#ZipCode
#City
#County
#State
#CountryRegionId
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressDisplay
PROPERTIES
Name #AddressDisplay
Label #@SYS9362
ENDPROPERTIES
GROUPFIELDS
#Address
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressLookup
PROPERTIES
Name #AddressLookup
Label #@SYS88672
ENDPROPERTIES
GROUPFIELDS
#AccountNum
#Name
#NameAlias
ENDGROUPFIELDS
ENDGROUP
GROUP #Administration
PROPERTIES
Name #Administration
Label #@SYS9853
ENDPROPERTIES
GROUPFIELDS
#Blocked
#OneTimeCustomer
#StatisticsGroup
#AccountStatement
#ForecastDMPInclude
ENDGROUPFIELDS
ENDGROUP
GROUP #Budget
PROPERTIES
Name #Budget
Label #@SYS15436
ENDPROPERTIES
GROUPFIELDS
#ClearingPeriod
ENDGROUPFIELDS
ENDGROUP
GROUP #CarrierInfo
PROPERTIES
Name #CarrierInfo
Label #@SYS50722
ENDPROPERTIES
GROUPFIELDS
#ShipCarrierId
#ShipCarrierAccountCode
#ShipCarrierAccount
#ShipCarrierBlindShipment
ENDGROUPFIELDS
ENDGROUP
GROUP #Classification
PROPERTIES
Name #Classification
Label #@SYS81508
ENDPROPERTIES
GROUPFIELDS
#CustClassificationId
ENDGROUPFIELDS
ENDGROUP
GROUP #CompanyChain
PROPERTIES
Name #CompanyChain
Label #@SYS105799
ENDPROPERTIES
GROUPFIELDS
#CompanyChainId
ENDGROUPFIELDS
ENDGROUP
GROUP #ContactInfo
PROPERTIES
Name #ContactInfo
Label #@SYS21663
ENDPROPERTIES
GROUPFIELDS
#Phone
#PhoneLocal
#CellularPhone
#Pager
#TeleFax
#Email
#SMS
#URL
#Telex
#ContactPersonId
#editContactPersonName
#LineOfBusinessId
#CompanyIdSiret
#CompanyIdNAF
ENDGROUPFIELDS
ENDGROUP
GROUP #Credit
PROPERTIES
Name #Credit
Label #@SYS7084
ENDPROPERTIES
GROUPFIELDS
#MandatoryCreditLimit
#CreditRating
#CreditMax
ENDGROUPFIELDS
ENDGROUP
GROUP #Currency
PROPERTIES
Name #Currency
Label #@sys7572
ENDPROPERTIES
GROUPFIELDS
#Currency
ENDGROUPFIELDS
ENDGROUP
GROUP #Customer
PROPERTIES
Name #Customer
Label #@SYS302
ENDPROPERTIES
GROUPFIELDS
#LanguageId
ENDGROUPFIELDS
ENDGROUP
GROUP #CustomerSelfService
PROPERTIES
Name #CustomerSelfService
Label #@SYS58654
ENDPROPERTIES
GROUPFIELDS
#WebSalesOrderDisplay
ENDGROUPFIELDS
ENDGROUP
GROUP #Deleted
PROPERTIES
Name #Deleted
Label #@SYS4197
ENDPROPERTIES
GROUPFIELDS
#DEL_NPIBankingPaymIdType
#DEL_NPIBankingFactoringAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #Delivery
PROPERTIES
Name #Delivery
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#FreightZone
#DlvTerm
#DlvMode
#DlvReason
#DestinationCodeId
#SalesCalendarId
#ShipCarrierFuelSurcharge
ENDGROUPFIELDS
ENDGROUP
GROUP #DeliveryTerms
PROPERTIES
Name #DeliveryTerms
Label #@SYS27703
ENDPROPERTIES
GROUPFIELDS
#PaymTermId
#PaymMode
#PaymSpec
#PaymSched
#CashDisc
#BankAccount
#PaymDayId
ENDGROUPFIELDS
ENDGROUP
GROUP #Description
PROPERTIES
Name #Description
Label #@SYS7576
ENDPROPERTIES
GROUPFIELDS
#Name
#NameAlias
ENDGROUPFIELDS
ENDGROUP
GROUP #Dimension
PROPERTIES
Name #Dimension
Label #@SYS5951
ENDPROPERTIES
GROUPFIELDS
#Dimension
ENDGROUPFIELDS
ENDGROUP
GROUP #Einvoice
PROPERTIES
Name #Einvoice
Label #@SYS100769
ENDPROPERTIES
GROUPFIELDS
#EinvoiceEANNum
ENDGROUPFIELDS
ENDGROUP
GROUP #EPCharacteristics
PROPERTIES
Name #EPCharacteristics
Label #@SYS108232
ENDPROPERTIES
GROUPFIELDS
#AccountNum
#PartyId
#PartyType
#Name
#CustGroup
#Currency
#LanguageId
#CustClassificationId
#Memo
ENDGROUPFIELDS
ENDGROUP
GROUP #EPCharacteristics2
PROPERTIES
Name #EPCharacteristics2
Label #@SYS108232
ENDPROPERTIES
GROUPFIELDS
#SegmentId
#SubsegmentId
#CompanyChainId
#SalesDistrictId
#MainContactId
ENDGROUPFIELDS
ENDGROUP
GROUP #EPContactInfo
PROPERTIES
Name #EPContactInfo
Label #@SYS21663
ENDPROPERTIES
GROUPFIELDS
#Phone
#CellularPhone
#TeleFax
#URL
#Email
ENDGROUPFIELDS
ENDGROUP
GROUP #EPContactInfoAddEdit
PROPERTIES
Name #EPContactInfoAddEdit
Label #@SYS21663
ENDPROPERTIES
GROUPFIELDS
#Phone
#PhoneLocal
#CellularPhone
#Pager
#TeleFax
#Email
#SMS
#URL
#Telex
#ContactPersonId
#editContactPersonName
#LineOfBusinessId
ENDGROUPFIELDS
ENDGROUP
GROUP #EPCreditInfo
PROPERTIES
Name #EPCreditInfo
Label #@SYS7084
ENDPROPERTIES
GROUPFIELDS
#creditMaxCur
#balanceAllCurrency
ENDGROUPFIELDS
ENDGROUP
GROUP #EPCustomer
PROPERTIES
Name #EPCustomer
Label #@SYS53631
ENDPROPERTIES
GROUPFIELDS
#CustGroup
#LanguageId
#Currency
#Blocked
ENDGROUPFIELDS
ENDGROUP
GROUP #EPFrench
PROPERTIES
Name #EPFrench
Label #@SYS21663
ENDPROPERTIES
GROUPFIELDS
#CompanyIdSiret
#CompanyIdNAF
ENDGROUPFIELDS
ENDGROUP
GROUP #EPGeneral3
PROPERTIES
Name #EPGeneral3
Label #@SYS108232
ENDPROPERTIES
GROUPFIELDS
#MandatoryCreditLimit
#CreditRating
#CreditMax
#Blocked
#OneTimeCustomer
#StatisticsGroup
#AccountStatement
#ForecastDMPInclude
ENDGROUPFIELDS
ENDGROUP
GROUP #EPMiniPage
PROPERTIES
Name #EPMiniPage
Label #@SYS108232
ENDPROPERTIES
GROUPFIELDS
#Name
#CustGroup
#Address
#Phone
#PhoneLocal
#Email
#URL
ENDGROUPFIELDS
ENDGROUP
GROUP #EPPayment1
PROPERTIES
Name #EPPayment1
Label #@SYS108232
ENDPROPERTIES
GROUPFIELDS
#PaymTermId
#PaymMode
#PaymSpec
ENDGROUPFIELDS
ENDGROUP
GROUP #EPPayment2
PROPERTIES
Name #EPPayment2
Label #@SYS108232
ENDPROPERTIES
GROUPFIELDS
#PaymSched
#PaymDayId
#CashDisc
#BankAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #EPSetup1
PROPERTIES
Name #EPSetup1
Label #@SYS108232
ENDPROPERTIES
GROUPFIELDS
#InvoiceAccount
#InvoiceAddress
#numberSequenceGroup
#GiroType
#GiroTypeFreeTextInvoice
#GiroTypeInterestNote
#GiroTypeCollectionletter
#GiroTypeProjInvoice
ENDGROUPFIELDS
ENDGROUP
GROUP #EPSetup2
PROPERTIES
Name #EPSetup2
Label #@SYS108232
ENDPROPERTIES
GROUPFIELDS
#FreightZone
#DlvTerm
#DlvMode
#DlvReason
#DestinationCodeId
#SalesCalendarId
#TaxGroup
#VATNum
#EnterpriseNumber
#InclTax
#TaxLicenseNum
#FiscalCode
#TaxBorderNumber_FI
ENDGROUPFIELDS
ENDGROUP
GROUP #EPSetup3
PROPERTIES
Name #EPSetup3
Label #@SYS108232
ENDPROPERTIES
GROUPFIELDS
#RFIDItemTagging
#RFIDCaseTagging
#RFIDPalletTagging
#InterCompanyAutoCreateOrders
#InterCompanyDirectDelivery
#InterCompanyAllowIndirectCreation
#EinvoiceEANNum
#PackMaterialFeeLicenseNum
ENDGROUPFIELDS
ENDGROUP
GROUP #Gateway
PROPERTIES
Name #Gateway
Label #@SYS72001
ENDPROPERTIES
GROUPFIELDS
#balanceAllCurrency
ENDGROUPFIELDS
ENDGROUP
GROUP #GiroMoneyTransferSlip
PROPERTIES
Name #GiroMoneyTransferSlip
Label #@SYS2723
ENDPROPERTIES
GROUPFIELDS
#GiroType
#GiroTypeFreeTextInvoice
#GiroTypeInterestNote
#GiroTypeCollectionletter
#GiroTypeProjInvoice
ENDGROUPFIELDS
ENDGROUP
GROUP #GovernmentIdentification
PROPERTIES
Name #GovernmentIdentification
Label #@SYS114299
ENDPROPERTIES
GROUPFIELDS
#IdentificationNumber
#PartyCountry
#PartyState
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#AccountNum
#PartyId
#PartyType
#OrgId
ENDGROUPFIELDS
ENDGROUP
GROUP #Integration
PROPERTIES
Name #Integration
Label #@SYS104440
ENDPROPERTIES
GROUPFIELDS
#SyncVersion
#SyncEntityId
ENDGROUPFIELDS
ENDGROUP
GROUP #Intercompany
PROPERTIES
Name #Intercompany
Label #@SYS74106
ENDPROPERTIES
GROUPFIELDS
#InterCompanyAutoCreateOrders
#InterCompanyDirectDelivery
#InterCompanyAllowIndirectCreation
ENDGROUPFIELDS
ENDGROUP
GROUP #Inventory
PROPERTIES
Name #Inventory
Label #@SYS981
ENDPROPERTIES
GROUPFIELDS
#InventSiteId
#InventLocation
ENDGROUPFIELDS
ENDGROUP
GROUP #Invoice
PROPERTIES
Name #Invoice
Label #@SYS12128
ENDPROPERTIES
GROUPFIELDS
#InvoiceAccount
#InvoiceAddress
#numberSequenceGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #LeadEditCustomerDetails
PROPERTIES
Name #LeadEditCustomerDetails
Label #@SYS110471
ENDPROPERTIES
GROUPFIELDS
#Name
#customerGroup
#Currency
#SegmentId
#SubsegmentId
#SalesDistrictId
ENDGROUPFIELDS
ENDGROUP
GROUP #MainContact
PROPERTIES
Name #MainContact
Label #@SYS105800
ENDPROPERTIES
GROUPFIELDS
#MainContactId
ENDGROUPFIELDS
ENDGROUP
GROUP #Memo
PROPERTIES
Name #Memo
Label #@SYS105801
ENDPROPERTIES
GROUPFIELDS
#Memo
ENDGROUPFIELDS
ENDGROUP
GROUP #NotificationToTheCentralBank
PROPERTIES
Name #NotificationToTheCentralBank
Label #@SYS67156
ENDPROPERTIES
GROUPFIELDS
#BankCentralBankPurposeCode
#BankCentralBankPurposeText
ENDGROUPFIELDS
ENDGROUP
GROUP #PackagingMaterialFee
PROPERTIES
Name #PackagingMaterialFee
Label #@SYS72996
ENDPROPERTIES
GROUPFIELDS
#PackMaterialFeeLicenseNum
ENDGROUPFIELDS
ENDGROUP
GROUP #Payment
PROPERTIES
Name #Payment
Label #@SYS828
ENDPROPERTIES
GROUPFIELDS
#PaymTermId
#PaymMode
#PaymSpec
#PaymSched
#PaymDayId
#CashDisc
#BankAccount
#FactoringAccount
#PaymIdType
#bankAccountNum
ENDGROUPFIELDS
ENDGROUP
GROUP #Posting
PROPERTIES
Name #Posting
Label #@SYS12919
ENDPROPERTIES
GROUPFIELDS
#CustGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjPriceGroup
PROPERTIES
Name #ProjPriceGroup
Label #@SYS80304
ENDPROPERTIES
GROUPFIELDS
#ProjPriceGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #RFIDTagging
PROPERTIES
Name #RFIDTagging
Label #@SYS90171
ENDPROPERTIES
GROUPFIELDS
#RFIDItemTagging
#RFIDCaseTagging
#RFIDPalletTagging
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesDiscount
PROPERTIES
Name #SalesDiscount
Label #@SYS14375
ENDPROPERTIES
GROUPFIELDS
#MultiLineDisc
#EndDisc
#PriceGroup
#LineDisc
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesDistrict
PROPERTIES
Name #SalesDistrict
Label #@SYS105802
ENDPROPERTIES
GROUPFIELDS
#SalesDistrictId
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesOrder
PROPERTIES
Name #SalesOrder
Label #@SYS7443
ENDPROPERTIES
GROUPFIELDS
#MarkupGroup
#InventSiteId
#InventLocation
#CustItemGroupId
#CommissionGroup
#SalesGroup
#SalesPoolId
#OurAccountNum
#interCompanyCompanyId
#PBACustGroupId
#OrderEntryDeadlineGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesOrderOther
PROPERTIES
Name #SalesOrderOther
Label #@SYS30289
ENDPROPERTIES
GROUPFIELDS
#SuppItemGroupId
#ProjPriceGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTax
PROPERTIES
Name #SalesTax
Label #@SYS5878
ENDPROPERTIES
GROUPFIELDS
#TaxGroup
#VATNum
#EnterpriseNumber
#InclTax
#TaxLicenseNum
#FiscalCode
#TaxBorderNumber_FI
ENDGROUPFIELDS
ENDGROUP
GROUP #Segment
PROPERTIES
Name #Segment
Label #@SYS105803
ENDPROPERTIES
GROUPFIELDS
#SegmentId
ENDGROUPFIELDS
ENDGROUP
GROUP #Service
PROPERTIES
Name #Service
Label #@SYS7780
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #Subsegment
PROPERTIES
Name #Subsegment
Label #@SYS105805
ENDPROPERTIES
GROUPFIELDS
#SubsegmentId
ENDGROUPFIELDS
ENDGROUP
GROUP #SupplementaryItem
PROPERTIES
Name #SupplementaryItem
Label #@SYS58240
ENDPROPERTIES
GROUPFIELDS
#SuppItemGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #System
PROPERTIES
Name #System
Label #@SYS4278
ENDPROPERTIES
GROUPFIELDS
#DEL_PrintModuleType
ENDGROUPFIELDS
ENDGROUP
GROUP #Vendor
PROPERTIES
Name #Vendor
Label #@SYS9455
ENDPROPERTIES
GROUPFIELDS
#VendAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #WebCategoryBrowsing
PROPERTIES
Name #WebCategoryBrowsing
Label #@SYS74258
ENDPROPERTIES
GROUPFIELDS
#CustGroup
#Currency
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#AccountIdx
Id 1
PROPERTIES
Name #AccountIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#AccountNum
ENDINDEXFIELDS
#PartyIdx
Id 2
PROPERTIES
Name #PartyIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#PartyId
ENDINDEXFIELDS
#NameAliasIdx
Id 4
PROPERTIES
Name #NameAliasIdx
ENDPROPERTIES
INDEXFIELDS
#NameAlias
ENDINDEXFIELDS
#OurAccountNumIdx
Id 5
PROPERTIES
Name #OurAccountNumIdx
ENDPROPERTIES
INDEXFIELDS
#OurAccountNum
ENDINDEXFIELDS
#PhoneIdx
Id 8001
PROPERTIES
Name #PhoneIdx
ENDPROPERTIES
INDEXFIELDS
#Phone
#CellularPhone
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #BankAccounts
PROPERTIES
Name #BankAccounts
Table #CustBankAccount
EntityRelationshipRole #@SYS123560
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #AccountNum
RelatedField #CustAccount
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #BankAccount
RelatedField #AccountID
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #County
PROPERTIES
Name #County
Table #AddressCounty
EntityRelationshipRole #@SYS123587
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #CountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #State
RelatedField #StateId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #County
RelatedField #CountyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CustPaymentModeSpec
PROPERTIES
Name #CustPaymentModeSpec
Table #CustPaymModeSpec
EntityRelationshipRole #@SYS125116
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #PaymMode
RelatedField #PaymMode
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #PaymSpec
RelatedField #Specification
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #DirPartyView
PROPERTIES
Name #DirPartyView
Table #DirPartyView
Validate #No
EntityRelationshipRole #@SYS124637
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #PartyId
RelatedField #PartyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PartyState
PROPERTIES
Name #PartyState
Table #AddressState
EntityRelationshipRole #@SYS125117
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #PartyState
RelatedField #StateId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #PartyCountry
RelatedField #CountryRegionId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #smmBusRelSubSegmentGroup
PROPERTIES
Name #smmBusRelSubSegmentGroup
Table #smmBusRelSubSegmentGroup
EntityRelationshipRole #@SYS124723
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #SubsegmentId
RelatedField #SubsegmentId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #SegmentId
RelatedField #SegmentId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #State
PROPERTIES
Name #State
Table #AddressState
EntityRelationshipRole #@SYS123582
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #CountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #State
RelatedField #StateId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VatNum
PROPERTIES
Name #VatNum
Table #TaxVATNumTable
EntityRelationshipRole #@SYS125042
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #VATNum
RelatedField #VATNum
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
#PrintMgmtDocInstance
PROPERTIES
Table #PrintMgmtDocInstance
DeleteAction #Cascade
ENDPROPERTIES
#SalesQuotationTable
PROPERTIES
Table #SalesQuotationTable
DeleteAction #Restricted
ENDPROPERTIES
#smmResponsibilitiesEmplTable
PROPERTIES
Table #smmResponsibilitiesEmplTable
DeleteAction #Cascade
ENDPROPERTIES
#InventTestAssociationTable
PROPERTIES
Table #InventTestAssociationTable
DeleteAction #Restricted
ENDPROPERTIES
#ExtCodeValueTable
PROPERTIES
Table #ExtCodeValueTable
DeleteAction #Cascade
ENDPROPERTIES
#SysCompanyUserInfo
PROPERTIES
Table #SysCompanyUserInfo
DeleteAction #Cascade
ENDPROPERTIES
#ProjInvoiceTable
PROPERTIES
Table #ProjInvoiceTable
DeleteAction #Restricted
ENDPROPERTIES
#CustInvoiceTable
PROPERTIES
Table #CustInvoiceTable
DeleteAction #Restricted
ENDPROPERTIES
#smmBusRelTable
PROPERTIES
Table #smmBusRelTable
DeleteAction #Cascade
ENDPROPERTIES
#CustTrans
PROPERTIES
Table #CustTrans
DeleteAction #Restricted
ENDPROPERTIES
#SalesTable
PROPERTIES
Table #SalesTable
DeleteAction #Restricted
ENDPROPERTIES
#ForecastSales
PROPERTIES
Table #ForecastSales
DeleteAction #Restricted
ENDPROPERTIES
#ProjTable
PROPERTIES
Table #ProjTable
DeleteAction #Restricted
ENDPROPERTIES
#ECPParameters
PROPERTIES
Table #ECPParameters
DeleteAction #Restricted
ENDPROPERTIES
#WMSBillOfLading
PROPERTIES
Table #WMSBillOfLading
DeleteAction #Restricted
ENDPROPERTIES
#CustVendExternalItem
PROPERTIES
Table #CustVendExternalItem
DeleteAction #Cascade
ENDPROPERTIES
#SuppItemTable
PROPERTIES
Table #SuppItemTable
DeleteAction #Cascade
ENDPROPERTIES
#SalesBasket
PROPERTIES
Table #SalesBasket
DeleteAction #Cascade
ENDPROPERTIES
#PriceDiscAdmTrans
PROPERTIES
Table #PriceDiscAdmTrans
DeleteAction #Cascade
ENDPROPERTIES
#MarkupAutoTable
PROPERTIES
Table #MarkupAutoTable
DeleteAction #Cascade
ENDPROPERTIES
#ContactPerson
PROPERTIES
Table #ContactPerson
DeleteAction #Cascade
ENDPROPERTIES
#BusinessStatisticsData
PROPERTIES
Table #BusinessStatisticsData
DeleteAction #Cascade
ENDPROPERTIES
#PriceDiscTable
PROPERTIES
Table #PriceDiscTable
DeleteAction #Cascade
ENDPROPERTIES
#CommissionCalc
PROPERTIES
Table #CommissionCalc
DeleteAction #Cascade
ENDPROPERTIES
#CustLedgerAccounts
PROPERTIES
Table #CustLedgerAccounts
DeleteAction #Cascade
ENDPROPERTIES
#Address
PROPERTIES
Table #Address
DeleteAction #Cascade
ENDPROPERTIES
#CustBankAccount
PROPERTIES
Table #CustBankAccount
DeleteAction #Cascade
ENDPROPERTIES
#DocuRef
PROPERTIES
Table #DocuRef
DeleteAction #Cascade
ENDPROPERTIES
#SalesJournalAutoSummary
PROPERTIES
Table #SalesJournalAutoSummary
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #AxCustTable
#public AxCustTable axCustTable()
#{
# return AxCustTable::newCustTable(this);
#}
#
ENDSOURCE
SOURCE #balanceAllCurrency
#//BP Deviation Documented
#display AmountCur balanceAllCurrency(CustCurrencyCode _currencyCode = this.Currency)
#{
# return this.CustVendTable::balanceAllCurrency(_currencyCode);
#}
ENDSOURCE
SOURCE #balanceCurPerDate
#server AmountCur balanceCurPerDate(TransDate _transactionDate = systemdateget(),
# CurrencyCode _currencyCode = CompanyInfo::standardCurrency())
#{
# return this.CustVendTable::balanceCurPerDate(_transactionDate, _currencyCode);
#}
ENDSOURCE
SOURCE #BalanceCurrency
#AmountCur balanceCurrency(TransDate _fromDate = dateNull(),
# TransDate _toDate = dateMax(),
# CurrencyCode _fromCurrency = '',
# CurrencyCode _toCurrency = '')
#{
# return this.CustVendTable::balanceCurrency(_fromDate,
# _toDate,
# _fromCurrency,
# _toCurrency);
#}
ENDSOURCE
SOURCE #BalanceMST
#//BP Deviation Documented
#display AmountMST balanceMST(FromDate _fromDate = dateNull(),
# ToDate _toDate = dateMax())
#{
# return this.CustVendTable::balanceMST(_fromDate, _toDate);
#}
ENDSOURCE
SOURCE #BalancePerDate
#server AmountMST balancePerDate(TransDate _transactionDate = systemdateget())
#{
# return this.CustVendTable::balancePerDate(_transactionDate);
#}
ENDSOURCE
SOURCE #bankAccountNum
#//BP Deviation documented
#display BankAccount bankAccountNum()
#{
# return CustBankAccount::find(this.AccountNum, this.BankAccount).AccountNum;
#}
ENDSOURCE
SOURCE #canDisplayCreditLimit
#///
#/// Gets whether the credit limit can be displayed.
#///
#///
#/// true if the credit limit can be displayed; otherwise, false.
#///
#///
#/// The determination is based on whether a meaningful value has been entered.
#///
#public boolean canDisplayCreditLimit()
#{
# boolean canDisplay;
# ;
#
# canDisplay =
# (this.CreditMax != 0) &&
# (this.Currency != '') &&
# (this.Currency == CompanyInfo::standardCurrency());
#
# return canDisplay;
#}
#
ENDSOURCE
SOURCE #cashDiscName
#//BP Deviation Documented
#display CustCashDiscName cashDiscName()
#{
# return CashDisc::find(this.CashDisc).Description;
#}
ENDSOURCE
SOURCE #CheckAccountBlocked
#boolean checkAccountBlocked(AmountCur _amountCur)
#{
# boolean ret = true;
#
# if (this.Blocked == CustVendorBlocked::All ||
# (this.Blocked == CustVendorBlocked::Invoice && _amountCur > 0))
# {
# ret = checkFailed(strfmt("@SYS7987", this.AccountNum));
# }
# return ret;
#}
ENDSOURCE
SOURCE #CheckBlockedAll
#boolean checkBlockedAll()
#{
# boolean ret = true;
#
# if (this.Blocked == CustVendorBlocked::All)
# {
# ret = checkFailed(strfmt("@SYS18389", this.AccountNum, CustVendorBlocked::All));
# }
# return ret;
#}
ENDSOURCE
SOURCE #checkVATNumUsed
#boolean checkVATNumUsed()
#{
# boolean ret = true;
# CustTable tmpCustTable;
# ;
#
# if (TaxParameters::find().VatBookEnable == NoYes::Yes && this.vatNum)
# {
# select firstonly tmpCustTable
# where tmpCustTable.RecId != this.RecId &&
# tmpCustTable.vatNum == this.vatNum;
# if (tmpCustTable.RecId)
# {
# ret = checkFailed(strfmt("@SYS79490",fieldpname(CustTable, vatNum)));
# }
# }
# return ret;
#}
ENDSOURCE
SOURCE #ClearingAccount
#//BP Deviation Documented
#display LedgerAccount clearingAccount(CustPostingProfile postingProfile = CustParameters::find().PostingProfile)
#{
# return this.CustVendTable::clearingAccount(postingProfile, this.AccountNum);
#}
ENDSOURCE
SOURCE #ClearingAccountGroup
#LedgerAccount clearingAccountGroup(CustAccount _custAccount,
# CustPostingProfile _custPostingProfile = CustParameters::find().PostingProfile)
#{
# CustLedgerAccounts custLedgerAccounts;
#
# return CustVendLedgerAccounts::clearingAccount(_custAccount,
# _custPostingProfile,
# custLedgerAccounts,
# TableGroupAll::GroupId);
#}
ENDSOURCE
SOURCE #ClearingPeriod
#ClearingPeriod clearingPeriod()
#{
# return (this.ClearingPeriod ? this.ClearingPeriod : CustGroup::find(this.CustGroup).clearingPeriod());
#}
ENDSOURCE
SOURCE #convertCurrencyCode
#server void convertCurrencyCode()
#{
# CurrencyCode origCurrencyCode;
# SalesTable salesTable;
# CustInvoiceTable custInvoiceTable;
# ;
#
# origCurrencyCode = this.orig().Currency;
#
# ttsbegin;
#
# salesTable = SalesTable::custOpenOrders(this.AccountNum,true);
#
# while (salesTable)
# {
# if (salesTable.CurrencyCode == origCurrencyCode)
# {
# salesTable.convertCurrencyCode(this.Currency);
# salesTable.update();
# }
# next salesTable;
# }
#
# custInvoiceTable = CustInvoiceTable::custOpenInvoices(this.AccountNum,true);
#
# while (custInvoiceTable)
# {
# if (custInvoiceTable.CurrencyCode == origCurrencyCode)
# {
# custInvoiceTable.convertCurrencyCode(this.Currency);
# custInvoiceTable.update();
# }
# next custInvoiceTable;
# }
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #countryName
#//BP Deviation Documented
#display AddressCountryRegionName countryName()
#{
# return AddressCountryRegion::find(this.CountryRegionId).Name;
#}
ENDSOURCE
SOURCE #countyName
#//BP Deviation Documented
#display AddressCountyName countyName()
#{
# return AddressCounty::find(this.CountryRegionId, this.State, this.County).Name;
#}
ENDSOURCE
SOURCE #creditMaxCur
#//BP Deviation Documented
#display CustCreditMaxCur creditMaxCur()
#{
# return Currency::curAmount(this.CreditMax, this.Currency);
#}
ENDSOURCE
SOURCE #currencyName
#//BP Deviation Documented
#display CurrencyName currencyName()
#{
# return Currency::find(this.Currency).Txt;
#}
ENDSOURCE
SOURCE #customerGroup
#//BP Deviation documented
#display smmCustomerGroup customerGroup()
#{
# ;
# return CustGroup::find(this.CustGroup).Name;
#}
#
ENDSOURCE
SOURCE #delete
#void delete()
#{
# VendTable vendTable;
# SyncAppCompany syncAppCompany;
# ;
#
# ttsbegin;
#
# // Delete the business relation
# smmBusRelTable::deleteFromCustVend(this.TableId,this.PartyId);
#
# // Remove links to contact person
# ContactPerson::removeCustVendLink(this.TableId, this.AccountNum);
#
# InventPosting::deleteFromCust(this.AccountNum);
# if(CustParameters::find().SalesCycle)
# {
# SalesPurchCycle::deleteFromCust(this.AccountNum);
# }
#
# if (this.VendAccount)
# {
# vendTable = VendTable::find(this.VendAccount, true);
#
# if (vendTable)
# {
# vendTable.CustAccount = '';
# vendTable.update();
# }
# }
#
# // For the Customer lookup,
# // Set the delete flag for this Customer integrated the Project Server application associated with current company
# syncAppCompany = SyncAppCompany::find(curext(), SyncAppType::ProjectServer);
# if (syncAppCompany)
# {
# SyncCustTableLookup::deleteLookupNodes(syncAppCompany.AppId, curext(), this.AccountNum);
# }
#
# super();
#
# // Auto delete party at backend
# DirParty::autoDeleteParty(this.PartyId);
#
# smmTransLog::initTrans(this, smmLogAction::delete);
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #DeliveryAddress
#void deliveryAddress()
#{
# Address address;
# ;
#
# address = DirPartyAddress::findAddress(this, AddressType::Delivery);
#
# if (address)
# {
# this.Name = address.Name;
# this.Address = address.Address;
# this.ZipCode = address.ZipCode;
# this.CountryRegionId = address.CountryRegionId;
# this.County = address.County;
# this.State = address.State;
# this.Street = address.Street;
# this.City = address.City;
# }
#}
ENDSOURCE
SOURCE #DiffCurrencyCodes
#container diffCurrencyCodes()
#{
# CustTrans custTranslocal;
# container currencyCodes;
# ;
#
# while select CurrencyCode from custTranslocal
# group by CurrencyCode
# where custTranslocal.AccountNum == this.AccountNum
# {
# currencyCodes += custTranslocal.CurrencyCode;
# }
#
# return currencyCodes;
#}
ENDSOURCE
SOURCE #DiffCurrencyCodesOnOpen
#container diffCurrencyCodesOnOpen(TransDate _transactionDate = systemdateget())
#{
# CustTrans custTranslocal;
# container currencyCodes;
# ;
#
# while select CurrencyCode from custTranslocal
# group by CurrencyCode
# where custTranslocal.AccountNum == this.AccountNum
# {
# if (this.balanceCurPerDate(_transactionDate, custTranslocal.CurrencyCode))
# {
# currencyCodes += custTranslocal.CurrencyCode;
# }
# }
#
# return currencyCodes;
#}
ENDSOURCE
SOURCE #editContactPersonName
#//AOSRunMode::Called
#//BP Deviation Documented
#edit ContactPersonName editContactPersonName(boolean _set, ContactPersonName _name)
#{
# return this.CustVendTable::editContactPersonName(_set, _name);
#}
ENDSOURCE
SOURCE #endDiscName
#//BP Deviation Documented
#display EndDiscName endDiscName()
#{
# return PriceDiscGroup::find(ModuleInventCustVend::Cust,
# PriceGroupType::EndDiscGroup,
# this.EndDisc).Name;
#}
#
ENDSOURCE
SOURCE #exceedMax
#AmountMST exceedMax(Amount _nowBalance)
#{
# return (this.CreditMax ? max(0, _nowBalance - this.CreditMax) : 0);
#}
#
ENDSOURCE
SOURCE #existOpenOrders
#boolean existOpenOrders()
#{
# ;
# return (SalesTable::existCustOpenOrder(this.AccountNum) || CustInvoiceTable::existCustOpenInvoice(this.AccountNum));
#}
#
ENDSOURCE
SOURCE #firstOpenPayment
#CustTransOpen firstOpenPayment()
#{
# CustTransOpen custTransOpen;
# ;
#
# custTransOpen = this.CustVendTable::firstOpenPayment();
#
# return custTransOpen;
#}
ENDSOURCE
SOURCE #firstSettledPayment
#CustSettlement firstSettledPayment()
#{
# CustSettlement custSettlement;
# ;
#
# custSettlement = this.CustVendTable::firstSettledPayment();
#
# return custSettlement;
#}
ENDSOURCE
SOURCE #freeValueCur
#//BP Deviation Documented
#display CustCreditFreeValueCur freeValueCur(AmountMST _adjustment = 0)
#{
# return this.CustVendTable::freeValueCur(_adjustment);
#}
ENDSOURCE
SOURCE #freeValueMST
#//BP Deviation Documented
#display CustCreditFreeValueMST freeValueMST(AmountMST _adjustment = 0)
#{
# return this.CustVendTable::freeValueMST(_adjustment);
#}
ENDSOURCE
SOURCE #getCurrenciesForAllTrans
#///
#/// Gets the list of currencies for the transactions in the specified date range.
#///
#///
#/// The date of the first transactions to be included.
#///
#///
#/// The date of the last transactions to be included.
#///
#///
#/// A Boolean value that indicates whether to include reversed transactions.
#///
#///
#/// A list of currencies.
#///
#///
#/// Exchange adjustment transactions are not included. A unique currency is
#/// only included in the list once.
#///
#public container getCurrenciesForAllTrans(
# TransDate _startDate,
# TransDate _endDate,
# boolean _includeReversedTrans)
#{
# CustTrans trans;
# Query q;
# QueryRun run;
# QueryBuildDataSource dataSource;
# QueryBuildDataSource reversalDataSource;
# QueryBuildRange range;
# container currencyList;
# ;
#
# Debug::assert(this.AccountNum != '');
# Debug::assert(_startDate <= _endDate);
#
#
# q = new Query();
# dataSource = q.addDataSource(tablenum(CustTrans));
#
# dataSource.addGroupByField(fieldnum(CustTrans, CurrencyCode));
#
# range = dataSource.addRange(fieldnum(CustTrans, AccountNum));
# range.value(SysQuery::value(this.AccountNum));
#
# range = dataSource.addRange(fieldnum(CustTrans, TransDate));
# range.value(SysQuery::range(_startDate, _endDate));
#
# range = dataSource.addRange(fieldnum(CustTrans, TransType));
# range.value(SysQuery::valueNot(LedgerTransType::ExchAdjustment));
#
# if (!_includeReversedTrans)
# {
# reversalDataSource = dataSource.addDataSource(tablenum(TransactionReversalTrans));
# reversalDataSource.joinMode(JoinMode::NoExistsJoin);
# reversalDataSource.addLink(fieldnum(CustTrans, TableId), fieldnum(TransactionReversalTrans, RefTableId));
# reversalDataSource.addLink(fieldnum(CustTrans, RecId), fieldnum(TransactionReversalTrans, RefRecId));
# reversalDataSource.addRange(fieldnum(TransactionReversalTrans, Reversed)).value(enum2str(NoYes::Yes));
# }
#
# run = new QueryRun(q);
# while (run.next())
# {
# trans = run.get(tablenum(CustTrans));
#
# currencyList += trans.CurrencyCode;
# }
#
# return currencyList;
#}
#
ENDSOURCE
SOURCE #getCurrenciesForOpenTrans
#///
#/// Gets the list of currencies for the open transactions in the specified date range.
#///
#///
#/// The date of the first open transactions to be included.
#///
#///
#/// The date of the last open transactions to be included.
#///
#///
#/// A Boolean value that indicates whether to include reversed transactions.
#///
#///
#/// A list of currencies.
#///
#///
#/// Exchange adjustment transactions are not included. A unique currency is
#/// only included in the list once.
#///
#public container getCurrenciesForOpenTrans(
# TransDate _startDate,
# TransDate _endDate,
# boolean _includeReversedTrans)
#{
# CurrencyCode currency;
# container currencyList;
# container tempList;
# int i;
# ;
#
# Debug::assert(this.AccountNum != '');
# Debug::assert(_startDate <= _endDate);
#
#
# tempList = this.getCurrenciesForAllTrans(_startDate, _endDate, _includeReversedTrans);
#
# for (i = 1; i <= conlen(tempList); i++)
# {
# currency = conpeek(tempList, i);
#
# if (this.balanceCurPerDate(_endDate, currency) != 0)
# {
# currencyList += currency;
# }
# }
#
# return currencyList;
#}
#
ENDSOURCE
SOURCE #getSettleDate
#public TransDate getSettleDate(SettleDatePrinc _saveDatePrinciple = SettleDatePrinc::DateOfPayment,
# TransDate _saveDate = dateNull())
#{
# return this.CustVendTable::getSettleDate(_saveDatePrinciple, _saveDate);
#}
ENDSOURCE
SOURCE #GraphicsByAgeAllocate
#client void graphicsByAgeAllocate(Graphics_ByAgeAllocation _graph)
#{
# this.CustVendTable::graphicsByAgeAllocate(_graph, NoYes::No);
#}
ENDSOURCE
SOURCE #HasForecastSales
#//BP Deviation Documented
#display ForecastHasSales hasForecastSales()
#{
# return (select forecastSales
# where forecastSales.CustAccountId == this.AccountNum).RecId != 0;
#}
ENDSOURCE
SOURCE #initFromContactInfo
#void initFromContactInfo()
#{
# this.CustVendTable::initFromContactInfo();
#}
ENDSOURCE
SOURCE #InitFromCustGroup
#void initFromCustGroup(CustGroup _custGroup)
#{
# this.PaymTermId = _custGroup.PaymTermId;
# this.PaymSched = PaymTerm::find(this.PaymTermId).PaymSched;
#
# //
# //If default tax group is set on customer group
# //than sales tax group on customers is filled in by default from TaxGroupId
# //
# if(_custGroup.TaxGroupId)
# {
# this.TaxGroup = _custGroup.TaxGroupId;
# }
#}
ENDSOURCE
SOURCE #initFromCustInvoiceTable
#void initFromCustInvoiceTable(CustInvoiceTable _custInvoiceTable)
#{
# this.Name = _custInvoiceTable.Name;
# this.NameAlias = '';
# AddressMap::initMapFromMap(this, _custInvoiceTable);
#
# this.OneTimeCustomer = _custInvoiceTable.OneTimeCustomer;
#}
ENDSOURCE
SOURCE #initFromDirParty
#void initFromDirParty(DirParty _party)
#{
# ;
#
# if (_party.parmType() != DirPartyType::None)
# {
# this.PartyType = _party.parmType();
# }
#
#
# // basic info
# if (_party.parmBasicInfo())
# {
# this.Name = _party.parmName();
# this.NameAlias = _party.parmNameAlias();
# this.LanguageId = _party.parmLanguageId();
# }
# // communication info
# if (_party.parmCommunicationInfo())
# {
# this.DirECommunicationMap::initCommInfoFromDirParty(_party);
# }
# // address
# if (_party.parmAddressInfo())
# {
# this.AddressMap::initFromDirParty(_party);
# }
#}
ENDSOURCE
SOURCE #initFromECPCustSignUp
#void initFromECPCustSignUp(ECPCustSignUp _ecpCustSignUp)
#{
# this.Name = _ecpCustSignUp.Name;
# this.Email = _ecpCustSignUp.Email;
# this.TeleFax = _ecpCustSignUp.TeleFax;
# this.Phone = _ecpCustSignUp.Phone;
# this.LanguageId = _ecpCustSignUp.LanguageId;
# this.NameAlias = '';
#
# AddressMap::initMapFromMap(this, _ecpCustSignUp);
#}
ENDSOURCE
SOURCE #initFromSalesQuotationTable
#void initFromSalesQuotationTable(SalesQuotationTable _salesQuotationTable)
#{
# this.Name = _salesQuotationTable.DeliveryName;
# this.NameAlias = '';
#
# AddressMap::initMapFromMap(this, _salesQuotationTable);
#}
ENDSOURCE
SOURCE #InitFromSalesTable
#void initFromSalesTable(SalesTable _salesTable)
#{
# this.Name = _salesTable.DeliveryName;
# this.OneTimeCustomer = _salesTable.OneTimeCustomer;
# this.NameAlias = '';
#
# AddressMap::initMapFromMap(this, _salesTable);
#}
ENDSOURCE
SOURCE #initValue
#void initValue()
#{
# CustFormletterParameters custFormletterParameters;
# CompanyInfo companyInfo;
# ;
#
# super();
#
# // If the languageId and Currency are empty strings a blank new cutomer is created in the table and thus
# // the following values should be initialised with default values. If the languageId and Currency are non-empty
# // the customer is created from a template and the values should not be touched.
# if(this.LanguageId == "" || this.Currency == "")
# {
# companyInfo = CompanyInfo::find();
# this.LanguageId = companyInfo.LanguageId;
# this.Currency = companyInfo.CurrencyCode;
#
# custFormletterParameters = CustFormletterParameters::find();
# this.GiroType = custFormletterParameters.GiroOnInvoice;
# this.GiroTypeInterestNote = custFormletterParameters.GiroOnInterest;
# this.GiroTypeCollectionletter = custFormletterParameters.GiroOnCollectionletter;
# this.GiroTypeFreeTextInvoice = custFormletterParameters.GiroOnFreeTextInvoice;
#
# this.GiroTypeProjInvoice = ProjFormletterParameters::find().GiroOnInvoice;
# }
# this.PartyType = DirParameters::find().CustDefaultPartyType;
#}
#
ENDSOURCE
SOURCE #Insert
#void insert()
#{
# SyncAppCompany syncAppCompany;
# ;
#
# ttsbegin;
#
# this.setNameAlias();
#
# // Check if not associated to Party
# if (!this.PartyId)
# {
# // Create a Party entry for customer
# this.PartyId = DirParty::createPartyFromCommon(this).PartyId;
# }
# else
# {
# DirParty::updatePartyFromCommonInsert(this.PartyId,this);
# }
#
# super();
#
# SalesJournalAutoSummary::initAllFromCustTable(this);
#
# smmTransLog::initTrans(this, smmLogAction::insert);
#
# // Integrate this new customer with the integrated Project Server app associated with the current company
# syncAppCompany = SyncAppCompany::find(curext(), SyncAppType::ProjectServer);
# if (syncAppCompany)
# {
# SyncCustTableLookup::insertLookupNodes(syncAppCompany.AppId, curext(), this.AccountNum, this.Name);
# }
#
# // Add links to contact person
# ContactPerson::addCustVendLink(this.TableId, this.PartyId, this.AccountNum);
#
# ttscommit;
#}
#
#
#
ENDSOURCE
SOURCE #interCompanyAccount
#//BP Deviation Documented
#display InterCompanyCustomer interCompanyAccount()
#{
# AifEndpoint aifEndpoint;
# boolean interCompanyOrg;
# ;
# aifEndpoint = AifEndpoint::findInterCompanyEnabled(this.interCompanyEndpointId());
# if (aifEndpoint.InterCompanyOrg)
# {
# changecompany(aifEndpoint.InterCompanyCompanyId)
# {
# interCompanyOrg = AifEndpoint::findInterCompany(aifEndpoint.DataAreaId).InterCompanyOrg;
# }
# }
# return interCompanyOrg;
#}
ENDSOURCE
SOURCE #interCompanyAccountExist
#boolean interCompanyAccountExist()
#{
# ;
# return (this.interCompanyAccount());
#}
ENDSOURCE
SOURCE #interCompanyCompanyId
#//BP Deviation Documented
#display InterCompanyCompanyId interCompanyCompanyId()
#{
# InterCompanyCompanyId interCompanyCompanyId;
# ;
#
# if (this.interCompanyAccountExist())
# {
# interCompanyCompanyId = AifEndpoint::findInterCompanyEnabled(this.interCompanyEndpointId()).InterCompanyCompanyId;
# }
#
# return interCompanyCompanyId;
#}
ENDSOURCE
SOURCE #interCompanyEndpointId
#AifEndpointId interCompanyEndpointId()
#{
# return AifEndpointConstraint::findInterCompanyEndpointId(this);
#}
ENDSOURCE
SOURCE #inventSiteActive
#boolean inventSiteActive()
#{;
# return classfactory.inventDimGlobal().inventSiteActiveWithoutItem();
#}
ENDSOURCE
SOURCE #InvoiceAccountName
#//BP Deviation Documented
#display CustInvoiceAccountName invoiceAccountName()
#{
# return CustTable::find(this.InvoiceAccount).Name;
#}
ENDSOURCE
SOURCE #invoiceAddress
#Address invoiceAddress()
#{
# Address address = Address::find(this.TableId, this.RecId, AddressType::Invoice);
# ;
# if (!address)
# {
# address.clear();
# address.CountryRegionId = this.CountryRegionId;
# address.County = this.County;
# address.Email = this.Email;
# address.sms = this.sms;
# address.Name = this.Name;
# address.Phone = this.Phone;
# address.PhoneLocal = this.PhoneLocal;
# address.CellularPhone = this.CellularPhone;
# address.Pager = this.Pager;
# address.State = this.State;
# address.TeleFax = this.TeleFax;
# address.Telex = this.Telex;
# address.url = this.url;
# address.ZipCode = this.ZipCode;
# address.Street = this.Street;
# address.City = this.City;
# address.Address = this.Address;
# }
# return address;
#}
ENDSOURCE
SOURCE #LastCollectionLetterJour
#CustCollectionLetterJour lastCollectionLetterJour()
#{
# CustCollectionLetterJour custCollectionLetterJour;
#
# select firstonly custCollectionLetterJour
# order CollectionLetterNum desc
# where custCollectionLetterJour.AccountNum == this.AccountNum;
#
# return custCollectionLetterJour;
#}
ENDSOURCE
SOURCE #LastInterestJournal
#CustInterestJour lastInterestJournal()
#{
# CustInterestJour custInterestJour;
#
# select firstonly custInterestJour
# order InterestNote desc
# where custInterestJour.AccountNum == this.AccountNum;
#
# return custInterestJour;
#}
ENDSOURCE
SOURCE #LastInvoice
#CustInvoiceJour lastInvoice(NoYes _invoiceCustomer = NoYes::Yes)
#{
# CustInvoiceJour custInvoiceJour;
# ;
#
# select firstonly custInvoiceJour
# index hint InvoiceAccountIdx
# order by InvoiceDate desc, InvoiceId desc
# where custInvoiceJour.InvoiceAccount == this.AccountNum &&
# custInvoiceJour.InvoiceId;
# return custInvoiceJour;
#}
ENDSOURCE
SOURCE #LastInvoiceDate
#//BP Deviation Documented
#display InvoiceDate lastInvoiceDate()
#{
# return this.lastInvoice(NoYes::Yes).InvoiceDate;
#}
ENDSOURCE
SOURCE #LastPayment
#CustTrans lastPayment()
#{
# CustTrans custTrans;
#
# select firstonly custTrans
# index hint AccountDateIdx
# order by TransDate desc, Voucher desc
# where custTrans.AccountNum == this.AccountNum &&
# custTrans.Invoice == '' &&
# custTrans.AmountCur < 0;
#
# return custTrans;
#}
ENDSOURCE
SOURCE #LastPaymentDate
#//BP Deviation Documented
#display TransDate lastPaymentDate()
#{
# return this.lastPayment().TransDate;
#}
ENDSOURCE
SOURCE #lastProjInvoice
#ProjInvoiceJour lastProjInvoice()
#{
# ProjInvoiceJour projInvoiceJour;
# ;
#
# select firstonly projInvoiceJour
# index hint InvoiceAccountIdx
# order by InvoiceDate desc, ProjInvoiceId desc
# where projInvoiceJour.InvoiceAccount == this.AccountNum &&
# projInvoiceJour.ProjInvoiceId;
# return projInvoiceJour;
#}
#
ENDSOURCE
SOURCE #lastProjInvoiceDate
#//BP Deviation Documented
#display InvoiceDate lastProjInvoiceDate()
#{
# return this.lastProjInvoice().InvoiceDate;
#}
ENDSOURCE
SOURCE #lineDiscName
#//BP Deviation Documented
#display LineDiscName lineDiscName()
#{
# return PriceDiscGroup::find(ModuleInventCustVend::Cust,
# PriceGroupType::LineDiscGroup,
# this.LineDisc).Name;
#}
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
# AxCustTable axCustTable;
# Object formDataSource;
# DlvMode dlvMode;
# #ISOCountryRegionCodes
# ;
#
# super(_fieldId);
#
# if (this.isFormDataSource())
# {
# if (formDataSourceHasMethod(this.dataSource(),classstr(AxCustTable)))
# {
# formDataSource = this.dataSource();
# axCustTable = formDataSource.axCustTable();
# }
# }
# else
# {
# axCustTable = this.axCustTable();
# }
#
# if (axCustTable)
# {
# axCustTable.setFieldAsTouched(_fieldId);
# axCustTable.modify();
# if (this.dataSource())
# {
# if (formDataSourceHasMethod(this.dataSource(),identifierstr(fieldModified)))
# {
# formDataSource = this.dataSource();
# formDataSource.fieldModified();
# }
# }
# }
# else
# {
# switch(_fieldId)
# {
# case fieldnum(CustTable, PartyType) :
# if (this.PartyId)
# {
# this.initFromDirParty(DirParty::constructBlank(this.PartyType));
# }
# this.IdentificationNumber = '';
# this.PartyCountry = '';
# this.PartyState = '';
# break;
#
# case fieldnum(CustTable, PartyId) :
# this.initFromDirParty(DirParty::constructFromPartyId(this.PartyId));
# break;
#
# case fieldnum(CustTable, PaymTermId) :
# this.PaymSched = PaymTerm::find(this.PaymTermId).PaymSched;
# break;
#
# case fieldnum(CustTable, Name) :
# DirParty::modifiedNameField(this);
# this.setNameAlias();
# break;
#
# case fieldnum(CustTable, CustGroup) :
# this.initFromCustGroup(CustGroup::find(this.CustGroup));
# break;
#
# case fieldnum(CustTable, PaymMode) :
# this.CustVendTable::paymModeModified();
# break;
#
# case fieldnum(CustTable, ContactPersonId) :
# this.initFromContactInfo();
# break;
#
# case fieldnum(CustTable, BankCentralBankPurposeCode) :
# this.CustVendTable::modifiedBankCentralBankPurposeCode();
# break;
# case fieldnum(CustTable, InventSiteId) :
# this.InventStorageDimMap::modifiedField(fieldnum(InventStorageDimMap, InventSiteId));
# break;
# case fieldnum(CustTable, InventLocation) :
# this.InventStorageDimMap::modifiedField(fieldnum(InventStorageDimMap, InventLocationId));
# break;
# //shipping module
# case fieldnum(CustTable, DlvMode) :
# dlvMode = DlvMode::find(this.DlvMode);
# this.ShipCarrierId = dlvMode.ShipCarrierId;
# this.ShipCarrierAccountCode = dlvMode.ShipCarrierAccountCode;
# break;
#
# case fieldnum(CustTable, OrgId) :
# if(CustParameters::find().CustAccountOrgIdCreate)
# {
# if(this.RecId == 0
# && (this.AccountNum == '' ||
# Box::yesNo("@SYS113290", DialogButton::Yes) == DialogButton::Yes))
# {
# this.AccountNum = this.OrgId;
# }
# else
# {
# if(strcmp(this.OrgId, substr(this.AccountNum, 1, strlen(this.OrgId))) != 0
# && Box::yesNo(strfmt("@SYS113291", this.AccountNum), DialogButton::Yes) == DialogButton::Yes)
# {
# this.OrgId = this.orig().OrgId;
# }
# }
# }
# break;
#
# case fieldnum(CustTable, EnterpriseNumber) :
# if (this.EnterpriseNumber && AddressCountryRegion::find(this.CountryRegionId).isOcode == #isoBE)
# {
# this.vatNum = strkeep(this.EnterpriseNumber, '0123456789.');
# }
# break;
# }
# this.AddressMap::modifiedField(_fieldId);
# }
#}
#
ENDSOURCE
SOURCE #MultiLineDiscName
#//BP Deviation Documented
#display MultiLineDiscName multiLineDiscName()
#{
# return PriceDiscGroup::find(ModuleInventCustVend::Cust,
# PriceGroupType::MultiLineDiscGroup,
# this.MultiLineDisc).Name;
#}
ENDSOURCE
SOURCE #openBalanceCur
#public AmountCur openBalanceCur(TransDate _fromDate = dateNull(),
# TransDate _toDate = dateMax(),
# TransDate _assessmentDate = dateNull(),
# CurrencyCode _currency = CompanyInfo::standardCurrency())
#{
# ;
# return this.CustVendTable::openBalanceCur(_fromDate, _toDate, _assessmentDate, _currency);
#}
ENDSOURCE
SOURCE #OpenBalanceMST
#//BP Deviation Documented
#display AmountMST openBalanceMST(FromDate _fromDate = dateNull(),
# ToDate _toDate = dateMax(),
# TransDate _assessmentDate = dateNull())
#{
# return this.CustVendTable::openBalanceMST(_fromDate, _toDate, _assessmentDate);
#}
ENDSOURCE
SOURCE #openBalanceMSTDoc
#AmountMST openBalanceMSTDoc(TransDate _transDate = dateNull(),
# FromDate _fromDate = dateNull(),
# ToDate _toDate = dateMax())
#{
# return this.CustVendTable::openBalanceMSTDoc(_transDate, _fromDate, _toDate);
#}
#
ENDSOURCE
SOURCE #OpenBalanceMSTDue
#AmountMST openBalanceMSTDue(TransDate _transDate = dateNull(),
# FromDate _fromDate = dateNull(),
# ToDate _toDate = dateMax())
#{
# return this.CustVendTable::openBalanceMSTDue(_transDate, _fromDate, _toDate);
#}
ENDSOURCE
SOURCE #openInvoiceBalanceMST
#//BP Deviation Documented
#display AmountMST openInvoiceBalanceMST(FromDate _fromDate = dateNull(),
# ToDate _toDate = dateMax(),
# TransDate _assessmentDate = dateNull())
#{
# CustTrans custTrans;
# CustTransOpen custTransOpen;
# CustSettlement custSettlement;
# AmountMST openBalanceMST = 0;
# ;
#
# if (_assessmentDate)
# {
# if (!(hasFieldAccess(tablenum(CustSettlement), fieldnum(CustSettlement, SettleAmountMST) &&
# hasFieldAccess(tablenum(CustSettlement), fieldnum(CustSettlement, ExchAdjustment)))))
# throw error("@SYS57330");
#
# select sum(SettleAmountMST),sum(ExchAdjustment) from custSettlement
# group by AccountNum
# where custSettlement.AccountNum == this.AccountNum
# && custSettlement.TransDate > _assessmentDate
# join custTrans
# where custTrans.RecId == custSettlement.TransRecId
# && custTrans.TransDate >= _fromDate
# && custTrans.TransDate <= _toDate
# && (custTrans.Invoice != ''
# || (custTrans.Invoice == '' && custTrans.AmountMST > 0));
#
# openBalanceMST += custSettlement.SettleAmountMST + custSettlement.ExchAdjustment;
# openBalanceMST += this.openInvoiceBalanceMST(_fromDate, _toDate);
# }
# else
# {
# if (!hasFieldAccess(tablenum(CustTransOpen), fieldnum(CustTransOpen, AmountMST)))
# throw error("@SYS57330");
#
# while select sum(AmountMST) from custTransOpen
# group by RefRecId
# where custTransOpen.AccountNum == this.AccountNum
# && custTransOpen.TransDate >= _fromDate
# && custTransOpen.TransDate <= _toDate
# join custTrans
# where custTrans.RecId == custTransOpen.RefRecId
# && (custTrans.Invoice != ''
# || (custTrans.Invoice == '' && custTrans.AmountMST > 0))
# {
# openBalanceMST += custTransOpen.AmountMST;
# }
# }
#
# return openBalanceMST;
#}
ENDSOURCE
SOURCE #openinvoiceBalanceMSTDoc
#AmountMST openinvoiceBalanceMSTDoc(TransDate _transDate = dateNull(),
# FromDate _fromDate = dateNull(),
# ToDate _toDate = dateMax())
#{
# CustTrans custTrans;
# CustTransOpen custTransOpen;
# AmountMST amountMST = 0;
# ;
# while select sum(AmountMST) from custTransOpen
# order by RefRecId
# where custTransOpen.AccountNum == this.AccountNum
# && custTransOpen.TransDate <= _transDate
# exists join custTrans
# where custTrans.RecId == custTransOpen.RefRecId
# && ((custTrans.DocumentDate
# && custTrans.DocumentDate >= _fromDate
# && custTrans.DocumentDate <= _toDate)
# || (!custTrans.DocumentDate
# && custTrans.TransDate >= _fromDate
# && custTrans.TransDate <= _toDate))
# && (custTrans.Invoice != ''
# || (custTrans.Invoice == '' && custTrans.AmountMST > 0))
# {
# amountMST += custTransOpen.AmountMST;
# }
# return amountMST;
#}
#
ENDSOURCE
SOURCE #openInvoiceBalanceMSTDue
#AmountMST openInvoiceBalanceMSTDue(TransDate _transDate = dateNull(),
# FromDate _fromDate = dateNull(),
# ToDate _toDate = dateMax())
#{
# CustTransOpen custTransOpen;
# CustTrans custTrans;
# AmountMST amountMST = 0;
#
# while select sum(AmountMST) from custTransOpen
# group by RefRecId
# where custTransOpen.AccountNum == this.AccountNum
# && custTransOpen.TransDate <= _transDate
# && custTransOpen.DueDate >= _fromDate
# && custTransOpen.DueDate <= _toDate
# join custTrans
# where custTrans.RecId == custTransOpen.RefRecId
# && (custTrans.Invoice != ''
# || (custTrans.Invoice == '' && custTrans.AmountMST > 0))
# {
# amountMST += custTransOpen.AmountMST;
# }
# return amountMST;
#}
#
ENDSOURCE
SOURCE #openPaymentBalanceMST
#//BP Deviation Documented
#display AmountMST openPaymentBalanceMST(FromDate _fromDate = dateNull(),
# ToDate _toDate = dateMax(),
# TransDate _assessmentDate = dateNull())
#{
# CustTrans custTrans;
# CustTransOpen custTransOpen;
# CustSettlement custSettlement;
# AmountMST openBalanceMST = 0;
# ;
#
# if (_assessmentDate)
# {
# if (!(hasFieldAccess(tablenum(CustSettlement), fieldnum(CustSettlement, SettleAmountMST) &&
# hasFieldAccess(tablenum(CustSettlement), fieldnum(CustSettlement, ExchAdjustment)))))
# throw error("@SYS57330");
#
# select sum(SettleAmountMST), sum(ExchAdjustment) from custSettlement
# group by AccountNum
# where custSettlement.AccountNum == this.AccountNum
# && custSettlement.TransDate > _assessmentDate
# join custTrans
# where custTrans.RecId == custSettlement.TransRecId
# && custTrans.TransDate >= _fromDate
# && custTrans.TransDate <= _toDate
# && custTrans.Invoice == ''
# && custTrans.AmountMST < 0;
#
# openBalanceMST = custSettlement.SettleAmountMST + custSettlement.ExchAdjustment;
# openBalanceMST += this.openPaymentBalanceMST(_fromDate, _toDate);
# }
# else
# {
# if (!hasFieldAccess(tablenum(CustTransOpen), fieldnum(CustTransOpen, AmountMST)))
# throw error("@SYS57330");
#
# while select sum(AmountMST) from custTransOpen
# group by RefRecId
# where custTransOpen.AccountNum == this.AccountNum
# && custTransOpen.TransDate >= _fromDate
# && custTransOpen.TransDate <= _toDate
# join custTrans
# where custTrans.RecId == custTransOpen.RefRecId
# && custTrans.Invoice == ''
# && custTrans.AmountMST < 0
# {
# openBalanceMST += custTransOpen.AmountMST;
# }
# }
#
# return openBalanceMST;
#}
ENDSOURCE
SOURCE #openPaymentBalanceMSTDoc
#AmountMST openPaymentBalanceMSTDoc(TransDate _transDate = dateNull(),
# FromDate _fromDate = dateNull(),
# ToDate _toDate = dateMax())
#{
# CustTrans custTrans;
# CustTransOpen custTransOpen;
# AmountMST amountMST;
#
# while select sum(AmountMST) from custTransOpen
# order by RefRecId
# where custTransOpen.AccountNum == this.AccountNum
# && custTransOpen.TransDate <= _transDate
# exists join custTrans
# where custTrans.RecId == custTransOpen.RefRecId
# && ((custTrans.DocumentDate
# && custTrans.DocumentDate >= _fromDate
# && custTrans.DocumentDate <= _toDate)
# || (!custTrans.DocumentDate
# && custTrans.TransDate >= _fromDate
# && custTrans.TransDate <= _toDate))
# && custTrans.AmountMST < 0
# && custTrans.Invoice == ''
# {
# amountMST += custTransOpen.AmountMST;
# }
# return amountMST;
#}
#
ENDSOURCE
SOURCE #openPaymentBalanceMSTDue
#AmountMST openPaymentBalanceMSTDue(TransDate _transDate = dateNull(),
# FromDate _fromDate = dateNull(),
# ToDate _toDate = dateMax())
#{
# CustTransOpen custTransOpen;
# CustTrans custTrans;
# AmountMST amountMST;
#
# while select sum(AmountMST) from custTransOpen
# group by RefRecId
# where custTransOpen.AccountNum == this.AccountNum
# && custTransOpen.TransDate <= _transDate
# && custTransOpen.DueDate >= _fromDate
# && custTransOpen.DueDate <= _toDate
# join custTrans
# where custTrans.RecId == custTransOpen.RefRecId
# && custTrans.Invoice == ''
# && custTrans.AmountMST < 0
# {
# amountMST += custTransOpen.AmountMST;
# }
# return amountMST;
#}
#
ENDSOURCE
SOURCE #paymName
#//BP Deviation Documented
#display Description paymName()
#{
# return this.CustVendTable::paymName();
#}
ENDSOURCE
SOURCE #PriceDiscGroupName
#//BP Deviation Documented
#display PriceDiscName priceDiscGroupName()
#{
# return PriceDiscGroup::find(ModuleInventCustVend::Cust,
# PriceGroupType::PriceGroup,
# this.PriceGroup).Name;
#}
ENDSOURCE
SOURCE #projectListName
#//BP Deviation Documented
#display Name projectListName()
#{
# return "@SYS62154";
#}
ENDSOURCE
SOURCE #PromptCust
#str promptCust()
#{
# return strfmt('%1 %2\n%3 %4\n%5 %6',fieldpname(CustTable, AccountNum), this.AccountNum,
# fieldpname(CustTable, Name), this.Name,
# fieldpname(CustTable, Address), this.Address);
#}
ENDSOURCE
SOURCE #RemainAmountCurPeriod
#//BP Deviation Documented
#display AmountCur remainAmountCurPeriod(TransDate _fromDate = dateNull(),
# TransDate _todate = systemdateget(),
# CurrencyCode _currencyCode = this.Currency)
#{
# CustTrans custTrans;
#
# select sum (AmountCur), sum (SettleAmountCur) from custTrans
# group by CurrencyCode
# where custTrans.AccountNum == this.AccountNum &&
# custTrans.TransDate >= _fromDate &&
# custTrans.TransDate <= _todate &&
# custTrans.CurrencyCode == _currencyCode;
#
# return (custTrans.AmountCur - custTrans.SettleAmountCur);
#}
ENDSOURCE
SOURCE #renamePrimaryKey
#public void renamePrimaryKey()
#{
# boolean isVirtual;
# DataArea company;
# CustTable originalCustTable;
# LedgerJournalTrans ledgerJournalTrans;
# VirtualDataAreaList virtualCompanies;
# container concreteCompanies;
# int concreteCompanyCount;
# CompanyId outerCompany;
# int innerLoopCounter;
# CompanyId innerCompany;
# ;
#
# // Capture the renamed record
# originalCustTable = this.orig();
#
# super();
#
# select firstonly company where company.Id == this.DataAreaId;
# isVirtual = company.IsVirtual;
#
# if (isVirtual)
# {
# // Customer is in a virtual company
#
# // Capture the concrete companies that are part of the customer's virtual company
# while select virtualCompanies where virtualCompanies.VirtualDataArea == this.DataAreaId
# {
# concreteCompanies += virtualCompanies.Id;
# }
#
# concreteCompanyCount = conlen(concreteCompanies);
#
# if (isConfigurationkeyEnabled(configurationkeynum(LedgerAdvIntercompanyAccounting)))
# {
# // Intercompany is enabled - need to loop over all concrete companies
# while select company
# where company.IsVirtual == false
# {
# outerCompany = company.Id;
#
# // Update related records for each concrete company
# changecompany(outerCompany)
# {
# // Reset the ledgerJournalTrans
# ledgerJournalTrans = null;
# ledgerJournalTrans.skipDataMethods(true);
#
# // Loop over concrete companies in the virtual company
# for (innerLoopCounter = 1; innerLoopCounter <= concreteCompanyCount; innerLoopCounter++)
# {
# innerCompany = conpeek(concreteCompanies, innerLoopCounter);
#
# // Update records with this customer as primary account
# update_recordset ledgerJournalTrans
# setting AccountNum = this.AccountNum
# where ledgerJournalTrans.Company == innerCompany &&
# ledgerJournalTrans.AccountType == LedgerJournalACType::Cust &&
# ledgerJournalTrans.AccountNum == originalCustTable.AccountNum;
#
# // Update records with this customer as offset account
# update_recordset ledgerJournalTrans
# setting OffsetAccount = this.AccountNum
# where ledgerJournalTrans.OffsetCompany == innerCompany &&
# ledgerJournalTrans.OffsetAccountType == LedgerJournalACType::Cust &&
# ledgerJournalTrans.OffsetAccount == originalCustTable.AccountNum;
# }
# }
# }
# }
# else
# {
# // Intercompany is disabled - need to loop over concrete companies in the virtual company
# for (innerLoopCounter = 1; innerLoopCounter <= concreteCompanyCount; innerLoopCounter++)
# {
# innerCompany = conpeek(concreteCompanies, innerLoopCounter);
#
# changecompany(innerCompany)
# {
# // Reset the ledgerJournalTrans
# ledgerJournalTrans = null;
# ledgerJournalTrans.skipDataMethods(true);
#
# // Update records with this customer as primary account
# // OffsetAccount will be updated in super() from the relation.
# update_recordset ledgerJournalTrans
# setting AccountNum = this.AccountNum
# where ledgerJournalTrans.Company == innerCompany &&
# ledgerJournalTrans.AccountType == LedgerJournalACType::Cust &&
# ledgerJournalTrans.AccountNum == originalCustTable.AccountNum;
# }
# }
# }
# }
# else
# {
# // Customer that is being updated is not in a virtual company
# // If intercompany is enabled, must update the intercompany transactions for all other companies
# if (isConfigurationkeyEnabled(configurationkeynum(LedgerAdvIntercompanyAccounting)))
# {
# while select company
# where company.IsVirtual == false
# {
# outerCompany = company.Id;
#
# // Update related records for each concrete company
# changecompany(outerCompany)
# {
# // Reset the ledgerJournalTrans
# ledgerJournalTrans = null;
# ledgerJournalTrans.skipDataMethods(true);
#
# // Update records with this customer as primary account
# update_recordset ledgerJournalTrans
# setting AccountNum = this.AccountNum
# where ledgerJournalTrans.Company == originalCustTable.DataAreaId &&
# ledgerJournalTrans.AccountType == LedgerJournalACType::Cust &&
# ledgerJournalTrans.AccountNum == originalCustTable.AccountNum;
# }
# }
# }
# }
#}
ENDSOURCE
SOURCE #SetAccountOnVend
#server void setAccountOnVend(CustTable custTable_Orig)
#{
# VendTable vendTable;
# ;
#
# ttsbegin;
#
# if (this.VendAccount != custTable_Orig.VendAccount)
# {
# if (custTable_Orig.VendAccount)
# {
# vendTable = VendTable::find(custTable_Orig.VendAccount,true);
#
# if (vendTable)
# {
# vendTable.CustAccount = '';
# vendTable.update();
# }
# }
#
# if (this.VendAccount)
# {
# vendTable = VendTable::find(this.VendAccount,true);
# if (vendTable)
# {
# vendTable.CustAccount = this.AccountNum;
# vendTable.update();
# }
# }
#
#
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #SetNameAlias
#void setNameAlias()
#{
# if (! this.NameAlias)
# {
# this.NameAlias = this.Name;
# }
#}
ENDSOURCE
SOURCE #settlementBuffer
#CustSettlement settlementBuffer()
#{
# CustSettlement custSettlement;
# ;
# return custSettlement;
#}
ENDSOURCE
SOURCE #showPartyMatchIcon
#//BP Deviation documented
#display DirPartyMatchIcon showPartyMatchIcon()
#{
# ;
# return DirParty::showPartyMatchIcon(this);
#}
ENDSOURCE
SOURCE #stateName
#//BP Deviation Documented
#display AddressStatename stateName()
#{
# return AddressState::find(this.CountryRegionId, this.State).Name;
#}
ENDSOURCE
SOURCE #SumAccount
#//BP Deviation Documented
#display LedgerAccount sumAccount(CustPostingProfile _custPostingProfile = CustParameters::find().PostingProfile)
#{
# return CustLedgerAccounts::sumAccount(this.AccountNum, _custPostingProfile);
#}
ENDSOURCE
SOURCE #TaxGroupName
#//BP Deviation Documented
#display TaxGroupName taxGroupName()
#{
# return TaxGroupHeading::find(this.TaxGroup).TaxGroupName;
#}
ENDSOURCE
SOURCE #transBuffer
#CustTrans transBuffer()
#{
# CustTrans custTrans;
# ;
#
# return custTrans;
#}
ENDSOURCE
SOURCE #transOpenBuffer
#CustTransOpen transOpenBuffer()
#{
# CustTransOpen custTransOpen;
# ;
#
# return custTransOpen;
#}
ENDSOURCE
SOURCE #Update
#void update(boolean _updateSmmBusRelTable = true, boolean _updateParty = true)
#{
# CustTable this_Orig = this.orig();
# recVersion rv = this_Orig.RecVersion;
# ;
#
#
# ttsbegin;
#
# this.setNameAlias();
#
# if (_updateParty)
# {
# DirParty::updatePartyFromCommon(this.PartyId, this);
# }
#
# super();
#
# if (_updateSmmBusRelTable)
# {
# smmBusRelTable::updateFromCustTableSFA2(this);
# }
#
# this.setAccountOnVend(this_Orig);
#
# if (this_Orig.CustGroup != this.CustGroup)
# {
# ForecastSales::setCustGroupId(this.AccountNum,
# this_Orig.CustGroup,
# this.CustGroup);
# }
#
# smmTransLog::initTrans(this, smmLogAction::update);
#
#
# // If the customer name has changed
# if(this.RecVersion != rv && this_Orig.Name != this.Name)
# {
# // Set the flag for customner lookup nodes for this customer to Update
# SyncCustTableLookup::updateLookupNodes(curext(), this.AccountNum, this.Name);
# }
# ttscommit;
#
#}
#
#
#
ENDSOURCE
SOURCE #validateDelete
#boolean validateDelete()
#{
# boolean ret;
# CustTable custTable;
# SalesTable salesTable;
# ;
#
# ret = super();
#
# if (this.AccountNum)
# {
# select count(RecId) from custTable
# where custTable.InvoiceAccount == this.AccountNum;
#
# if (custTable.RecId)
# {
# ret = checkFailed("@SYS67133");
# }
#
# select count(RecId) from salesTable
# where salesTable.InvoiceAccount == this.AccountNum;
#
# if (salesTable.RecId)
# {
# ret = checkFailed(strfmt("@SYS75284", tablepname(SalesTable)));
# }
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId p1)
#{
# #isoCountryRegionCodes
# boolean ret;
# ;
#
# if(!this.AddressMap::validatePostalCode(p1))
# {
# return false;
# }
#
#
# ret = super(p1);
#
# if (ret)
# {
# switch (p1)
# {
# case fieldnum(CustTable, vatNum) :
# ret = TaxVATNumTable::checkVATNum(this.vatNum, this, p1);
# ret = ret && TaxEnterpriseBranchNumber_BE::checkEnterPriseNumber(this.EnterpriseNumber, this.vatNum, true);
# if (ret)
# {
# ret = this.checkVATNumUsed();
# }
# break;
#
# case fieldnum(CustTable, CreditMax) :
# if (this.CreditMax < 0)
# {
# ret = checkFailed("@SYS69970");
# }
# break;
#
# case fieldnum(CustTable, EnterpriseNumber) :
# if (this.EnterpriseNumber && AddressCountryRegion::find(this.CountryRegionId).isOcode != #isoBE)
# {
# ret = checkFailed("@SYS117686");
# }
# else
# {
# ret = ret && TaxEnterpriseBranchNumber_BE::checkEnterPriseNumber(this.EnterpriseNumber);
# }
# break;
#
# case fieldnum(CustTable, InventLocation) :
# ret = this.InventStorageDimMap::validateField(fieldnum(InventStorageDimMap, InventLocationId));
# break;
#
# case fieldnum(CustTable, OrgId) :
# if(CustParameters::find().CustOrgIdValidate
# && this.CustVendTable::checkOrgId() == false)
# {
# ret = checkFailed("@SYS113286");
# }
# break;
# }
# }
# return ret;
#}
#
ENDSOURCE
SOURCE #validateIdentificationForCreditLimit
#///
#/// Validates whether the IdentificationNumber for the CreditLimit is required.
#///
#///
#/// true if the IdentificationNumber is require. otherwise, false.
#///
#///
#/// This method is called when the IdentificationNumber is not entered.
#/// It returns false if the CreditIdentificationRequire is yes, the MandatoryCreditLimit is yes,
#/// and the CreditMax is greater than zero.
#/// It returns false if the CreditIdentificationRequire is yes, the MandatoryCreditLimit is no,
#/// and the CreditMax is greater than or equal to zero.
#/// It returns false if the CreditIdentificationRequire is the minimum limit and the CreditMax
#/// is greater than or equal to the CreditLimit.
#/// It returns false if the CreditIdentificationRequire is the minimum limit, the MandatoryCreditLimit is no,
#/// the CreditMax is zero, and the CreditLimit is greater than zero.
#///
#private boolean validateIdentificationForCreditLimit()
#{
# boolean ret;
# CustParameters custParameters;
# #define.Zero(0)
# ;
#
# custParameters = CustParameters::find();
# switch(custParameters.CreditIdentificationRequire)
# {
# case CreditIdentificationRequireType::Yes:
# if(this.MandatoryCreditLimit == NoYes::Yes && this.CreditMax > #Zero)
# {
# ret = false;
# }
# else if(this.MandatoryCreditLimit == NoYes::No && this.CreditMax >= #Zero)
# {
# ret = false;
# }
# else
# {
# ret = true;
# }
# break;
# case CreditIdentificationRequireType::MinimumLimit:
# if(this.CreditMax >= custParameters.CreditLimit)
# {
# ret = false;
# }
# else if(this.CreditMax == #Zero && custParameters.CreditLimit > #Zero && this.MandatoryCreditLimit == NoYes::No)
# {
# ret = false;
# }
# else
# {
# ret = true;
# }
# break;
# case CreditIdentificationRequireType::No:
# ret = true;
# break;
# default:
# throw error(strfmt("@SYS12580",custParameters.CreditIdentificationRequire));
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #validateWrite
#///
#/// Validates the current CustTable table buffer.
#///
#///
#/// true if the table buffer is valid; otherwise, false.
#///
#///
#/// It checks the IdentificationNumber. If it is not entered it calls the validateIdentificationForCreditLimit
#/// method to check the necessary conditions for the IdentificationNumber.
#///
#
#boolean validateWrite()
#{
# #isoCountryRegionCodes
# boolean ret;
#
# ret = super();
#
# ret = ret && appl.dimensionSetValidation().checkDimension(this, fieldnum(CustTable, Dimension), true);
#
# if (ret)
# {
# if (PaymTerm::isCashAccount(this.PaymTermId) && this.PaymSched)
# {
# ret = checkFailed("@SYS25074");
# }
#
# if (!this.OneTimeCustomer && TaxVATNumTable::isVATNumMandatory(CustParameters::find().MandatoryVATNum, this))
# {
# ret = checkFailed("@SYS54494");
# }
# }
#
# if (ret)
# {
# ret = appl.dimensionSetValidation().checkDimension(this, fieldnum(CustTable, Dimension), true);
# }
#
# // Add check MandatoryTaxGroup is set on CustParameters.
# if (ret && CustParameters::find().MandatoryTaxGroup && !this.TaxGroup)
# {
# ret = checkFailed("@SYS113299");
# }
#
# if(ret && CustParameters::find().CustMandatoryOrgId && !this.OrgId)
# {
# ret = checkFailed("@SYS113297");
# }
#
# if(!this.IdentificationNumber)
# {
# if(!this.validateIdentificationForCreditLimit())
# {
# switch(this.PartyType)
# {
# case DirPartyType::Organization:
# ret = checkFailed(strfmt("@SYS114304","@SYS114297"));
# break;
# case DirPartyType::Person:
# ret = checkFailed(strfmt("@SYS114304","@SYS114298"));
# break;
# default:
# throw error(strfmt("@SYS12580",this.PartyType));
# }
# }
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #VendorAccountName
#//BP Deviation Documented
#display VendInvoiceAccountName vendorAccountName()
#{
# return VendTable::find(this.VendAccount).Name;
#}
ENDSOURCE
SOURCE #blocked
#static CustVendorBlocked blocked(CustAccount _custAccount)
#{
# return CustTable::find(_custAccount).Blocked;
#}
ENDSOURCE
SOURCE #canCustomerBeUpdated
#static boolean canCustomerBeUpdated(CustAccount _custAccount,
# CustInvoiceAccount _invoiceAccount,
# DocumentStatus _documentStatus = DocumentStatus::None)
#{
# boolean ok = true;
# ;
#
# if (_documentStatus == DocumentStatus::Invoice ||
# _documentStatus == DocumentStatus::PickingList ||
# _documentStatus == DocumentStatus::PackingSlip ||
# _documentStatus == DocumentStatus::FreeTextInvoice)
# {
# ok = (!(CustTable::blocked(_custAccount) != CustVendorBlocked::No ||
# CustTable::blocked(_invoiceAccount) != CustVendorBlocked::No));
# }
# else
# {
# ok = (!(CustTable::blocked(_custAccount) == CustVendorBlocked::All));
# }
# return ok;
#}
ENDSOURCE
SOURCE #checkCreditLimit
#server static boolean checkCreditLimit(CustAccount _custAccount,
# TypeOfCreditmaxCheck _check = CustParameters::find().CreditMaxCheck,
# AmountMST _amountMST = 0,
# boolean _warning = CustParameters::find().CreditLineError == CreditLineErrorType::Warning)
#{
# CustCreditLimit custCL = new CustCreditLimit(CustTable::find(_custAccount));
#
# custCL.addAmountMST(_amountMST);
# custCL.typeOfCreditMaxCheck(_check);
# custCL.warning(_warning);
#
# return (custCL.check() || _warning); // return true if warning is true regardless of the check
#}
#
ENDSOURCE
SOURCE #checkEInvoiceEAN
#public static void checkEInvoiceEAN(EinvoiceEANNum _einvoiceEANNum)
#{
# boolean ok = true;
# EinvoiceEANNum eanNum = _einvoiceEANNum;
#
# int eanSum;
# Counter c;
# int multiply = 3;
# char chkDgt;
# ;
#
# if (strlen(eanNum) != 13)
# {
# throw error(strfmt("@SYS100770", eanNum));
# }
#
# if (!str2IntOk(eanNum))
# {
# throw error(strfmt("@SYS100771", eanNum));
# }
#
# for (c = 12; c >= 1; c--)
# {
# eanSum += multiply * str2int(substr(eanNum, c, 1));
#
# if (multiply == 3)
# {
# multiply = 1;
# }
# else
# {
# multiply = 3;
# }
# }
#
# chkDgt = int2str(any2int(roundUp(eanSum, 10)) - eanSum);
#
# if (substr(eanNum, 13,1) != chkDgt)
# {
# throw error(strfmt("@SYS100772", eanNum));
# }
#}
ENDSOURCE
SOURCE #checkExist
#static boolean checkExist(CustAccount _custAccount)
#{
# boolean ret = true;
#
# if (_custAccount && !CustTable::exist(_custAccount))
# {
# ret = checkFailed(strfmt(CustTable::txtNotExist(), _custAccount));
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #checkExistAndOpen
#static boolean checkExistAndOpen(CustAccount _custAccount,
# AmountCur _amountCur)
#{
# boolean ret;
# CustTable custTable;
# ;
#
# custTable = CustTable::find(_custAccount);
#
# if (! custTable)
# {
# ret = checkFailed(strfmt("@SYS4730", _custAccount));
# }
# else
# {
# ret = custTable.checkAccountBlocked(_amountCur);
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #createOneTimeAccount
#server static CustAccount createOneTimeAccount(Common _common)
#{
# NumberSeq numberSeq;
# CustTable custTable;
# ;
#
# if (!CustTable::createOneTimeAccountValidate())
# return '';
#
# ttsbegin;
#
# numberSeq = NumberSeq::newGetNum(CustParameters::numRefOneTimeCustomerAccount());
#
# custTable = CustTable::find(CustParameters::find().DefaultCust);
#
# custTable.AccountNum = numberSeq.num();
# custTable.PartyId = '';
#
# switch (_common.TableId)
# {
# case tablenum(CustInvoiceTable) :
# custTable.initFromCustInvoiceTable(_common);
# break;
#
# case tablenum(SalesTable) :
# custTable.initFromSalesTable(_common);
# break;
#
# case tablenum(SalesQuotationTable) :
# custTable.initFromSalesQuotationTable(_common);
# break;
#
# default :
# throw error(strfmt("@SYS18917",tableid2name(_common.TableId)));
# }
#
# custTable.insert();
#
# ttscommit;
#
# return custTable.AccountNum;
#}
#
ENDSOURCE
SOURCE #createOneTimeAccountValidate
#static boolean createOneTimeAccountValidate()
#{
# boolean ok = true;
#
# if (!CustTable::find(CustParameters::find().DefaultCust))
# {
# ok = checkFailed("@SYS57574");
# }
# return ok;
#}
ENDSOURCE
SOURCE #creditMax
#static AmountMST creditMax(CustAccount _custAccount)
#{
# return CustTable::find(_custAccount).CreditMax;
#}
ENDSOURCE
SOURCE #deleteOneTimeAccount
#server static void deleteOneTimeAccount(CustAccount _custAccount)
#{
# CustTable custTable = CustTable::find(_custAccount);
# NumberSequenceTable numberSequenceTable;
# NumberSequenceReference numberSequenceReference;
# SalesTable salesTable;
# ;
# if (!custTable)
# return;
#
# select firstonly salesTable
# where salesTable.CustAccount == _custAccount;
#
# if (salesTable.RecId)
# return;
#
# ttsbegin;
#
# delete_from custTable
# where custTable.AccountNum == _custAccount;
#
# numberSequenceReference = CustParameters::numRefOneTimeCustomerAccount();
# if (numberSequenceReference)
# {
# numberSequenceTable = NumberSequenceTable::find(numberSequenceReference.NumberSequence);
# if (numberSequenceTable.Continuous)
# {
# NumberSeq::release(numberSequenceTable.NumberSequence, _custAccount);
# }
# }
#
# ttscommit;
#
#}
#
ENDSOURCE
SOURCE #exist
#static boolean exist(CustAccount _custAccount)
#{
# return _custAccount && (select firstonly RecId from custTable
# index hint AccountIdx
# where custTable.AccountNum == _custAccount).RecId != 0;
#}
ENDSOURCE
SOURCE #existDlvMode
#///
#/// Checks if the delivery mode is used on a customer record.
#///
#///
#/// The DlvModeId value that specifies the delivery mode record.
#///
#///
#/// true if the deliver mode is used on a customer; otherwise, false.
#///
#public static server boolean existDlvMode(DlvModeId _dlvModeId)
#{
# CustTable custTable;
# ;
#
# if (_dlvModeId == '')
# {
# return false;
# }
#
# select firstonly
# RecId from custTable
# where
# custTable.DlvMode == _dlvModeId;
#
# return (custTable.RecId != 0);
#}
#
ENDSOURCE
SOURCE #find
#static CustTable find(CustAccount _custAccount,
# boolean _forUpdate = false)
#{
# CustTable custTable;
# ;
#
# if (_custAccount)
# {
# if (_forUpdate)
# custTable.selectForUpdate(_forUpdate);
#
# select firstonly custTable
# index hint AccountIdx
# where custTable.AccountNum == _custAccount;
# }
# return custTable;
#}
ENDSOURCE
SOURCE #findByCompany
#///
#/// Finds the specified record in the CustTable table.
#///
#///
#/// The company of the customer record.
#///
#///
#/// The account number of the customer record.
#///
#///
#/// A Boolean value that indicates whether to read the record for update; optional.
#///
#///
#/// A record in the CustTable table; otherwise, an empty record.
#///
#public static CustTable findByCompany(
# dataAreaId _company,
# CustAccount _custAccount,
# boolean _forUpdate = false)
#{
# CustTable cust;
# ;
#
# changecompany(_company)
# {
# cust = CustTable::find(_custAccount, _forUpdate);
# }
#
# return cust;
#}
ENDSOURCE
SOURCE #findByPartyId
#static CustTable findByPartyId(DirPartyId _partyId,
# boolean _forUpdate = false)
#{
# CustTable custTable;
# ;
#
# if (_partyId)
# {
# if (_forUpdate)
# custTable.selectForUpdate(_forUpdate);
#
# select firstonly custTable
# where custTable.PartyId == _partyId;
# }
# return custTable;
#}
ENDSOURCE
SOURCE #findRecId
#static CustTable findRecId(recId _recId,
# boolean _forUpdate = false)
#{
# CustTable custTable;
# ;
#
# if (_recId)
# {
# custTable.selectForUpdate(_forUpdate);
#
# select firstonly custTable
# where custTable.RecId == _recId;
# }
# return custTable;
#}
ENDSOURCE
SOURCE #groupId
#static CustGroupId groupId(CustAccount _custAccount)
#{
# return CustTable::find(_custAccount).CustVendTable::groupId();
#}
ENDSOURCE
SOURCE #inventSiteIdCustItem
#///
#/// Looks up site Id for an item depending on the customer if multisite is enabled
#///
#///
#/// The customer buying the item
#///
#///
#/// The id of the ietm
#///
#///
#/// The site from which the item is sold to the customer (e.g. in which the warehouse can be found)
#///
#
#static InventSiteId inventSiteIdCustItem(CustAccount _custAccount, ItemId _itemId)
#{
# InventItemSalesSetup inventItemSalesSetup = InventItemSalesSetup::findDefault(_itemId);
# CustTable custTable;
# CompanyInfo companyInfo;
# InventSiteId inventSiteIdItem;
#
# ;
#
# if(inventItemSalesSetup)
# {
# inventSiteIdItem = inventItemSalesSetup.inventSiteId();
#
# if(inventItemSalesSetup.MandatoryInventSite)
# return inventSiteIdItem;
# }
#
# custTable = CustTable::find(_custAccount);
#
# if(custTable.InventSiteId)
# return custTable.InventSiteId;
#
# if (inventSiteIdItem)
# return inventSiteIdItem;
#
# companyInfo = CompanyInfo::find();
#
# if(companyInfo.fallBackSiteId())
# return companyInfo.fallBackSiteId();
#
# return '';
#}
ENDSOURCE
SOURCE #isCustDKPublic
#public static NoYes isCustDKPublic(CustInvoiceAccount _invoiceAccount)
#{
# boolean ret = false;
# ;
# if (CustTable::find(_invoiceAccount).EinvoiceEANNum)
# {
# ret = true;
# }
# else
# {
# ret = false;
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #lookupCustomer
#client static void lookupCustomer(FormStringControl _formStringControl, CompanyId _companyId = curext())
#{
# Args args;
# CompanyId companyId;
# FormRun formRun;
# ;
#
# // The following block is needed for the case that intercompany transactions is disabled and someone passes
# // in an empty string. Ideally one would remove the "curext()" defaulting from the paramter list, but this
# // code was added as part of a bug fix, and did not have the scope or need of changing the interface.
# if (!_companyId)
# {
# companyId = curext();
# }
# else
# {
# companyId = _companyId;
# if (! xDataArea::exist(companyId))
# {
# throw error(strfmt("@SYS10666", companyId));
# }
# }
#
# changecompany(companyId)
# {
# args = new Args();
# args.name(formstr(CustTableLookup));
# args.caller(_formStringControl);
# args.lookupField(fieldnum(CustTable, AccountNum));
# args.lookupValue(_formStringControl.text());
# formRun = classfactory.formRunClass(args);
# formRun.init();
# _formStringControl.performFormLookup(formRun);
# }
#}
ENDSOURCE
SOURCE #projPriceGroup
#static ProjPriceGroupID projPriceGroup(CustAccount _custAccount)
#{
# ;
# return (select firstonly ProjPriceGroup from custTable
# where custTable.AccountNum == _custAccount).ProjPriceGroup;
#}
#
ENDSOURCE
SOURCE #promptAddress
#static str promptAddress(CustAccount _custAccount, AddressType addressType = AddressType::None)
#{
# CustTable custTable = CustTable::find(_custAccount);
# Address address = DirPartyAddress::findAddress(custTable, addressType);
# ;
# if (address)
# return (custTable.Name + '\n' + address.Address);
#
# return (custTable.Name + '\n' + custTable.Address);
#}
ENDSOURCE
SOURCE #promptConvertCurrencyCode
#client static boolean promptConvertCurrencyCode()
#{
# ;
# return (Box::yesNo("@SYS81865", DialogButton::Yes) == DialogButton::Yes);
#}
ENDSOURCE
SOURCE #txtNotExist
#static TxtNotExist txtNotExist()
#{
# return "@SYS9779";
#}
ENDSOURCE
SOURCE #webLookupCustTable
#client static void webLookupCustTable()
#{
# webTableLookup webTableLookup;
# Query query;
#;
#
# webTableLookup = webTableLookup::newParameters(tablenum(CustTable));
# webTableLookup.addLookupfield(fieldnum(CustTable, AccountNum),true);
# webTableLookup.addLookupfield(fieldnum(CustTable, Name));
#
# query = new Query();
# query.addDataSource(tablenum(CustTable));
# webTableLookup.parmQuery(query);
#
# webTableLookup.run();
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: DBT
; Microsoft Dynamics AX Table : TaxVATNumTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #TaxVATNumTable
Id 791
PROPERTIES
Name #TaxVATNumTable
Label #@SYS55109
FormRef #TaxVATNumTable
TitleField1 #VATNum
TitleField2 #Name
ConfigurationKey #LedgerBasicSalesTax
SecurityKey #LedgerTables
CacheLookup #Found
TableGroup #Main
PrimaryIndex #TaxVATNumIdx
ClusterIndex #TaxVATNumIdx
ENDPROPERTIES
FIELDS
FIELD #VATNum
Id 1
STRING
PROPERTIES
Name #VATNum
Mandatory #Yes
AllowEdit #No
Table #TaxVATNumTable
ExtendedDataType
ARRAY
#VATNum
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Name
Id 2
STRING
PROPERTIES
Name #Name
Mandatory #Yes
Table #TaxVATNumTable
ExtendedDataType
ARRAY
#VATName
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #CountryRegionId
Id 3
STRING
PROPERTIES
Name #CountryRegionId
Mandatory #Yes
AllowEdit #No
Table #TaxVATNumTable
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #CGranFirstName
Id 30001
STRING
PROPERTIES
Name #CGranFirstName
Table #TaxVATNumTable
ExtendedDataType
ARRAY
#FirstName
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #CGranLastName
Id 30002
STRING
PROPERTIES
Name #CGranLastName
Table #TaxVATNumTable
ExtendedDataType
ARRAY
#LastName
#
ENDARRAY
StringSize #25
ENDPROPERTIES
FIELD #CGranMiddleName
Id 30003
STRING
PROPERTIES
Name #CGranMiddleName
Table #TaxVATNumTable
ExtendedDataType
ARRAY
#MiddleName
#
ENDARRAY
StringSize #25
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#VATNum
#Name
#CountryRegionId
ENDGROUPFIELDS
ENDGROUP
GROUP #TaxExemptNumberTable
PROPERTIES
Name #TaxExemptNumberTable
Label #@SYS55109
ENDPROPERTIES
GROUPFIELDS
#VATNum
#Name
#CountryRegionId
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#TaxVATNumIdx
Id 1
PROPERTIES
Name #TaxVATNumIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#VATNum
#CountryRegionId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #validateDelete
#boolean validateDelete()
#{
# boolean ret;
#
# ret = super();
#
# if ((select firstonly RecId from custInvoiceJour
# where custInvoiceJour.vatNum == this.vatNum).RecId != 0)
# ret = checkFailed(strfmt("@SYS56339",tableid2pname(tablenum(CustInvoiceJour))));
#
# if ((select firstonly RecId from vendInvoiceJour
# where vendInvoiceJour.vatNum == this.vatNum).RecId != 0)
# ret = checkFailed(strfmt("@SYS56339",tableid2pname(tablenum(VendInvoiceJour))));
#
# if ((select firstonly RecId from projInvoiceJour
# where projInvoiceJour.vatNum == this.vatNum).RecId != 0)
# ret = checkFailed(strfmt("@SYS56339",tableid2pname(tablenum(ProjInvoiceJour))));
#
# return ret;
#}
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId _fieldId)
#{
# boolean ret;
#
# ret = super(_fieldId);
#
# if (ret)
# {
# switch (_fieldId)
# {
# case fieldnum(TaxVATNumTable, vatNum) :
# ret = TaxVATNumTable::checkVATNum(this.vatNum, this, _fieldId, this.CountryRegionId);
# break;
# }
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #validateWrite
#public boolean validateWrite()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = TaxVATNumTable::checkVATNum(this.vatNum, this, fieldnum(TaxVATNumTable, vatNum), this.CountryRegionId);
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #checkExist
#public static boolean checkExist(VATNum _vatNum, AddressCountryRegionId _countryRegionId )
#{
# boolean ret = true;
# ;
#
# if (!TaxVATNumTable::exist(_vatNum, _countryRegionId))
# {
# ret = checkFailed(strfmt(TaxVATNumTable::txtNotExist(), _vatNum, _countryRegionId));
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #checkVATNum
#static boolean checkVATNum(VATNum vatNum, Common common, fieldId fieldId, AddressCountryRegionId _countryRegionId = "")
#{
# AddressCountryRegionId countryRegion;
# boolean ret = true;
#
# if (vatNum)
# if (TaxVATNumTable::taxVATNumTableEnabled() &&
# common.TableId != tablenum(TaxVATNumTable))
# {
# countryRegion = TaxVATNumTable::resolveCountryRegionFromTable(common);
# if (!TaxVATNumTable::existOptionalCountryRegion(vatNum))
# ret = checkFailed(strfmt("@SYS83770",vatNum,fieldid2pname(common.TableId,fieldId), countryRegion, tableid2pname(tablenum(TaxVATNumTable))));
# }
# else
# {
# if (TaxVATNumTable::taxVATNumTableEnabled())
# ret = TaxVATNumValidate::checkVATNum(vatNum, _countryRegionId);
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #completeVATNum
#static VATNum completeVATNum(VATNum _vatNum, EUSalesListTax _taxCode)
#{
# VATNum vatNum;
# ;
#
# vatNum = TaxVATNumTable::stripVATNum(_vatNum, _taxCode);
# vatNum = _taxCode + vatNum;
#
# return vatNum;
#}
ENDSOURCE
SOURCE #enableLookupVatNum
#static client server void enableLookupVATNum(FormStringControl formStringControl)
#{
# if (TaxVATNumTable::taxVATNumTableEnabled())
# {
# formStringControl.lookupButton(2); // Always lookup button.
# }
#}
ENDSOURCE
SOURCE #exist
#public static boolean exist(VATNum _vatNum, AddressCountryRegionId _countryRegionId )
#{
# boolean found;
# ;
#
# found = (select firstonly
# RecId
# from
# taxVATNumTable
# where
# taxVATNumTable.vatNum == _vatNum &&
# taxVATNumTable.CountryRegionId == _countryRegionId).RecId != 0;
#
# return found;
#}
ENDSOURCE
SOURCE #existOptionalCountryRegion
#static boolean existOptionalCountryRegion(VATNum vatNum)
#{
# return vatNum && (select firstonly RecId from taxVATNumTable
# index hint TaxVATNumIdx
# where taxVATNumTable.vatNum == vatNum).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#public static TaxVATNumTable find(
# VATNum _vatNum,
# AddressCountryRegionId _countryRegionId ,
# boolean _forupdate = false,
# ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
#{
# TaxVATNumTable taxVATNumTable;
# ;
#
# taxVATNumTable.selectForUpdate(_forupdate);
# if (_forupdate && _concurrencyModel != ConcurrencyModel::Auto)
# {
# taxVATNumTable.concurrencyModel(_concurrencyModel);
# }
#
# select firstonly
# taxVATNumTable
# where
# taxVATNumTable.vatNum == _vatNum &&
# taxVATNumTable.CountryRegionId == _countryRegionId;
#
# return taxVATNumTable;
#}
ENDSOURCE
SOURCE #isVATNumMandatory
#static client server boolean isVATNumMandatory(MandatoryVATNum _mandatoryVATNum, Common _common, str _parm = '')
#{
# #isoCountryRegionCodes
# VATNum vatNum;
# AddressCountryRegionId countryRegionId;
# ;
# if (_mandatoryVATNum == TaxVATNumCountryRegionType::None)
# return false;
#
# vatNum = TaxVATNumTable::resolveVATNumFromTable(_common, _parm);
#
# if (!vatNum)
# {
# countryRegionId = TaxVATNumTable::resolveCountryRegionFromTable(_common);
#
# if (countryRegionId == #isoBE && new DictConfigurationKey(configurationkeynum(CRSEBelgium)).enabled())
# {
# return false;
# }
#
# if (_mandatoryVATNum == TaxVATNumCountryRegionType::EU)
# {
# if (AddressCountryRegion::isInEU(countryRegionId))
# return true;
# }
# if (_mandatoryVATNum == TaxVATNumCountryRegionType::DomesticEU)
# {
# if (AddressCountryRegion::isInEU(countryRegionId) || AddressCountryRegion::isDomestic(countryRegionId))
# return true;
# }
# }
#
# return false;
#}
#
ENDSOURCE
SOURCE #jumpRefVatNum
#static void jumpRefVATNum(Common common, Object object, str parm = '')
#{
# Args args;
# FormRun formRun;
# ;
# args = new Args(formstr(TaxVATNumTable));
# args.record(common);
# args.caller(object);
# args.parm(parm);
# formRun = classfactory.formRunClass(args);
# formRun.init();
# formRun.run();
# formRun.detach();
#}
ENDSOURCE
SOURCE #lookupVATNum
#client static void lookupVATNum (FormStringControl ctrl, Common common)
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(TaxVATNumTable), ctrl);
# Query query = new Query();
# QueryBuildDataSource queryBuildDataSource = query.addDataSource(tablenum(TaxVATNumTable));
# QueryBuildRange queryBuildRange = queryBuildDataSource.addRange(fieldnum(TaxVATNumTable, CountryRegionId));
# ;
#
# //Remove countryRegionId restrain to display all tax exempt numbers
# sysTableLookup.addLookupfield(fieldnum(TaxVATNumTable, vatNum));
# sysTableLookup.addLookupfield(fieldnum(TaxVATNumTable, Name));
# sysTableLookup.addLookupfield(fieldnum(TaxVATNumTable, CountryRegionId));
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#}
ENDSOURCE
SOURCE #name
#static VATName name(VATNum _vatNum,
# AddressCountryRegionId _countryRegionId)
#{
# return TaxVATNumTable::find(_vatNum, _countryRegionId).Name;
#}
ENDSOURCE
SOURCE #resolveCountryRegionFromTable
#static client server AddressCountryRegionId resolveCountryRegionFromTable(Common common)
#{
# AddressCountryRegionId countryRegionId;
# CustTable custTable;
# CompanyInfo companyInfo;
# CustInvoiceJour custInvoiceJour;
# CustInvoiceTable custInvoiceTable;
# PurchTable purchTable;
# EUSalesList euSalesList;
# SalesTable salesTable;
# SalesQuotationTable salesQuotationTable;
# TmpCustVendVolume tmpCustVendVolume;
# VendInvoiceJour vendInvoiceJour;
# VendTable vendTable;
# LedgerJournalTrans ledgerJournalTrans;
# TaxVATNumTable taxVATNumTable;
# TaxReport347Table taxReport347Table;
# RCSalesList_UK rcSalesList;
#
# switch(common.TableId)
# {
# case tablenum(CustTable) : custTable = common;
# countryRegionId = custTable.CountryRegionId;
# break;
# case tablenum(CompanyInfo) : companyInfo = common;
# countryRegionId = companyInfo.CountryRegionId;
# break;
# case tablenum(CustInvoiceJour) : custInvoiceJour = common;
# countryRegionId = custInvoiceJour.DlvCountryRegionId;
# break;
# case tablenum(CustInvoiceTable) : custInvoiceTable = common;
# countryRegionId = custInvoiceTable.CountryRegionId;
# break;
# case tablenum(EUSalesList) : euSalesList = common;
# countryRegionId = euSalesList.CountryRegionId;
# break;
# case tablenum(PurchTable) : purchTable = common;
# countryRegionId = purchTable.DlvCountryRegionId;
# break;
# case tablenum(SalesTable) : salesTable = common;
# countryRegionId = salesTable.DeliveryCountryRegionId;
# break;
#
# case tablenum(SalesQuotationTable) : salesQuotationTable = common;
# if (salesQuotationTable.CustAccount)
# {
# countryRegionId = TaxVATNumTable::resolveCountryRegionFromTable(salesQuotationTable.custTable_InvoiceAccount());
# }
# if (salesQuotationTable.BusRelAccount)
# {
# countryRegionId = salesQuotationTable.DeliveryCountryRegionId;
# }
# break;
#
# case tablenum(TmpCustVendVolume) : tmpCustVendVolume = common;
# countryRegionId = tmpCustVendVolume.CountryRegionId;
# break;
# case tablenum(VendInvoiceJour) : vendInvoiceJour = common;
# countryRegionId = TaxVATNumTable::resolveCountryRegionFromTable(vendInvoiceJour.vendTable_InvoiceAccount());
# break;
# case tablenum(VendTable) : vendTable = common;
# countryRegionId = vendTable.CountryRegionId;
# break;
# case tablenum(LedgerJournalTrans) : ledgerJournalTrans = common;
# switch (ledgerJournalTrans.AccountType)
# {
# case LedgerJournalACType::Cust:
# countryRegionId = TaxVATNumTable::resolveCountryRegionFromTable(CustTable::find(ledgerJournalTrans.AccountNum));
# break;
# case LedgerJournalACType::Vend:
# countryRegionId = TaxVATNumTable::resolveCountryRegionFromTable(VendTable::find(ledgerJournalTrans.AccountNum));
# break;
# }
# break;
# case tablenum(TaxVATNumTable) : taxVATNumTable = common;
# countryRegionId = taxVATNumTable.CountryRegionId;
# break;
#
# case tablenum(TaxReport347Table) : taxReport347Table = common;
# countryRegionId = CompanyInfo::find().CountryRegionId;
#
# case tablenum(RCSalesList_UK) : rcSalesList = common;
# countryRegionId = rcSalesList.CountryRegionId;
# break;
#
#
# }
#
# return countryRegionId;
#}
#
ENDSOURCE
SOURCE #resolveVATNumFromTable
#static client server VATNum resolveVATNumFromTable(Common common, str parm = '')
#{
# VATNum vatNum;
# CustTable custTable;
# CompanyInfo companyInfo;
# CustInvoiceJour custInvoiceJour;
# CustInvoiceTable custInvoiceTable;
# PurchTable purchTable;
# EUSalesList euSalesList;
# TaxReport347Table taxReport347Table;
# TaxReport347Tenants taxReport347Tenants;
# TaxReport347Trans taxReport347Trans;
# TaxReport349Table taxReport349Table;
# TaxReport349Trans taxReport349Trans;
# SalesTable salesTable;
# TmpCustVendVolume tmpCustVendVolume;
# VendInvoiceJour vendInvoiceJour;
# VendTable vendTable;
# LedgerJournalTrans ledgerJournalTrans;
# TaxVATNumTable taxVATNumTable;
# RCSalesList_UK rcSalesList;
#
# switch(common.TableId)
# {
# case tablenum(CustTable) : custTable = common;
# vatNum = custTable.vatNum;
# break;
# case tablenum(CompanyInfo) : companyInfo = common;
# switch (fieldname2id(tablenum(CompanyInfo), parm))
# {
# case fieldnum(CompanyInfo, vatNum) : vatNum = companyInfo.vatNum;
# break;
# case fieldnum(CompanyInfo, ImportVATNum) : vatNum = companyInfo.ImportVATNum;
# break;
# }
# break;
# case tablenum(CustInvoiceJour) : custInvoiceJour = common;
# vatNum = custInvoiceJour.vatNum;
# break;
# case tablenum(CustInvoiceTable) : custInvoiceTable = common;
# vatNum = custInvoiceTable.vatNum;
# break;
# case tablenum(EUSalesList) : euSalesList = common;
# vatNum = euSalesList.vatNum;
# break;
# case tablenum(PurchTable) : purchTable = common;
# vatNum = purchTable.vatNum;
# break;
# case tablenum(TaxReport347Table) : taxReport347Table = common;
# vatNum = taxReport347Table.vatNum;
# break;
# case tablenum(TaxReport347Tenants) : taxReport347Tenants = common;
# vatNum = taxReport347Tenants.vatNum;
# break;
# case tablenum(TaxReport347Trans) : taxReport347Trans = common;
# vatNum = taxReport347Trans.vatNum;
# break;
# case tablenum(TaxReport349Table) : taxReport349Table = common;
# vatNum = taxReport349Table.vatNum;
# break;
# case tablenum(TaxReport349Trans) : taxReport349Trans = common;
# vatNum = taxReport349Trans.vatNum;
# break;
# case tablenum(SalesTable) : salesTable = common;
# vatNum = salesTable.vatNum;
# break;
# case tablenum(TmpCustVendVolume) : tmpCustVendVolume = common;
# vatNum = tmpCustVendVolume.vatNum;
# break;
# case tablenum(VendInvoiceJour) : vendInvoiceJour = common;
# vatNum = vendInvoiceJour.vatNum;
# break;
# case tablenum(VendTable) : vendTable = common;
# vatNum = vendTable.vatNum;
# break;
# case tablenum(LedgerJournalTrans) : ledgerJournalTrans = common;
# vatNum = ledgerJournalTrans.vatNumJournal;
# break;
# case tablenum(TaxVATNumTable) : taxVATNumTable = common;
# vatNum = taxVATNumTable.vatNum;
# break;
#
# case tablenum(RCSalesList_UK) : rcSalesList = common;
# vatNum = rcSalesList.vatNum;
# break;
#
# }
# return vatNum;
#}
ENDSOURCE
SOURCE #stripVATNum
#static VATNum stripVATNum(VATNum _vatNum, EUSalesListTax _taxCode)
#{
# VATNum vatNum;
# ;
# vatNum = strrem(_vatNum,' -');
#
# if (strscan(vatNum,_taxCode,1,strlen(_taxCode)) == 1)
# {
# vatNum = strdel(vatNum,1,strlen(_taxCode));
# }
#
# return vatNum;
#}
ENDSOURCE
SOURCE #taxVATNumTableEnabled
#static boolean taxVATNumTableEnabled()
#{
# return new DictConfigurationKey(configurationkeynum(LedgerBasicSalesTax)).enabled();
#}
ENDSOURCE
SOURCE #txtNotExist
#public static TxtNotExist txtNotExist()
#{
# return "@SYS102255";
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
***Element: UTS
; Microsoft Dynamics AX String: Dimension descargados
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #Dimension
Id 132
STRING
PROPERTIES
Name #Dimension
Label #@SYS850
HelpText #@SYS17447
ArrayLength #3
DisplayLength #10
CollectionLabel #@SYS850
Extends #SysDim
ChangeCase #None
ENDPROPERTIES
TYPEELEMENTS
TYPEELEMENT
PROPERTIES
Index #2
Label #Pagador
HelpText #@SYS17448
ENDPROPERTIES
TYPEREFERENCES
TYPEREFERENCETYPE DATASET
PROPERTIES
Table #Dimensions
RelatedField #Num
ENDPROPERTIES
TYPEREFERENCETYPE EXTERNFIXED
PROPERTIES
Table #Dimensions
RelatedField #DimensionCode
Value #1
ENDPROPERTIES
ENDTYPEREFERENCES
ENDTYPEELEMENT
TYPEELEMENT
PROPERTIES
Index #3
Label #Programa
HelpText #@SYS21179
ENDPROPERTIES
TYPEREFERENCES
TYPEREFERENCETYPE DATASET
PROPERTIES
Table #Dimensions
RelatedField #Num
ENDPROPERTIES
TYPEREFERENCETYPE EXTERNFIXED
PROPERTIES
Table #Dimensions
RelatedField #DimensionCode
Value #2
ENDPROPERTIES
ENDTYPEREFERENCES
ENDTYPEELEMENT
ENDTYPEELEMENTS
TYPEREFERENCES
TYPEREFERENCETYPE DATASET
PROPERTIES
Table #Dimensions
RelatedField #Num
ENDPROPERTIES
TYPEREFERENCETYPE EXTERNFIXED
PROPERTIES
Table #Dimensions
RelatedField #DimensionCode
ENDPROPERTIES
ENDTYPEREFERENCES
ENDUSERTYPE
***Element: UTS
; Microsoft Dynamics AX String: CGranProgram descargados
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #CGranProgram
Id 30001
STRING
PROPERTIES
Name #CGranProgram
Label #Programa
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
TYPEREFERENCETYPE DATASET
PROPERTIES
Table #Dimensions
RelatedField #Num
ENDPROPERTIES
TYPEREFERENCETYPE EXTERNFIXED
PROPERTIES
Table #Dimensions
RelatedField #DimensionCode
Value #2
ENDPROPERTIES
ENDTYPEREFERENCES
ENDUSERTYPE
***Element: UTS
; Microsoft Dynamics AX String: CGranDepartment descargados
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #CGranDepartment
Id 30002
STRING
PROPERTIES
Name #CGranDepartment
Label #Departamento
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
TYPEREFERENCETYPE DATASET
PROPERTIES
Table #Dimensions
RelatedField #Num
ENDPROPERTIES
TYPEREFERENCETYPE EXTERNFIXED
PROPERTIES
Table #Dimensions
RelatedField #DimensionCode
ENDPROPERTIES
ENDTYPEREFERENCES
ENDUSERTYPE
***Element: FRM
; Microsoft Dynamics AX Forms unloaded
; --------------------------------------------------------------------------------
FRMVERSION 5
FORM #InventTable
PROPERTIES
Name #InventTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #ClassDeclaration
#final class FormRun extends ObjectRun
#{
# QueryBuildRange criteriaPurch;
# QueryBuildRange criteriaInvent;
# QueryBuildRange criteriaSalesOrder;
#
# NumberSeqFormHandler numberSeqFormHandler;
#}
ENDSOURCE
SOURCE #run
#public void run()
#{
# ;
# SysListPageHelper::handleRunPreSuper(element, tab, 2, 0);
# super();
# SysListPageHelper::handleRunPostSuper(element);
#}
ENDSOURCE
SOURCE #setItemPriceToleranceGroupEnabled
#///
#/// Enables or disables the ItemPriceToleranceGroupId field based upon the status of 'Use invoice matching' for the current company.
#///
#public void setItemPriceToleranceGroupEnabled()
#{
# VendParameters vp;
# boolean enable;
# ;
#
# vp = VendParameters::find();
# enable = (vp.useInvoiceMatching() == NoYes::Yes);
#
# inventTable_ds.object(fieldnum(InventTable, ItemPriceToleranceGroupId)).allowEdit(enable);
# inventTable_ds.object(fieldnum(InventTable, ItemPriceToleranceGroupId)).skip(!enable);
#}
ENDSOURCE
SOURCE #refreshInventTableModule
#void refreshInventTableModule()
#{
# ;
# inventTable_ds.reread();
# purch_ds.reread();
# invent_ds.reread();
# sales_ds.reread();
# inventTable_ds.refresh();
# inventTable_ds.active();
# pricesInvent.update();
# pricesInvent.update();
#}
ENDSOURCE
SOURCE #setFiscalLIFOenabled
#void setFiscalLIFOenabled()
#{;
# inventTable_ds.object(fieldnum(InventTable,FiscalLIFOGroup)).allowEdit(inventTable.ItemType != ItemType::Service);
# inventTable_ds.object(fieldnum(InventTable,FiscalLIFOAvoidCalc)).allowEdit(inventTable.ItemType != ItemType::Service);
# inventTable_ds.object(fieldnum(InventTable,FiscalLIFONormalValue)).allowEdit(inventTable.ItemType != ItemType::Service);
# inventTable_ds.object(fieldnum(InventTable,FiscalLIFONormalValueCalc)).allowEdit(inventTable.ItemType != ItemType::Service);
#}
ENDSOURCE
SOURCE #setBOMRouteEnabled
#void setBOMRouteEnabled()
#{
# InventItemType inventItemType = inventTable.inventItemType();
# boolean canHaveBOM = inventItemType.canHaveBOM();
# boolean canHaveRoute = inventItemType.canHaveRoutes();
# boolean canBeProduced = inventItemType.canBeProduced();
# boolean isConfigActive = inventTable.configActive();
# ;
#
# ctrlBOMConsistOf.enabled(canHaveBOM);
# ctrlBOMDesigner.enabled(canHaveBOM);
# ctrlBOMConfigRoute.enabled(canHaveBOM && isConfigActive);
# ctrlBOMReportFinished.enabled(canBeProduced);
# ctrlBOMReportFinishMax.enabled(canBeProduced);
# ctrlBOMConfigHierarchy.enabled(canHaveBOM && isConfigActive);
#
# element.setNonBOMFields();
#
# ctrlRoute.enabled(canHaveRoute);
#}
ENDSOURCE
SOURCE #setRFIDEnabled
#void setRFIDEnabled()
#{
# InventDimSearch dimSearch = new InventDimSearch();
# ;
#
# if (inventTable.ItemType != ItemType::Service &&
# dimSearch.findActive(inventTable.DimGroupId, fieldnum(InventDim,InventSerialId)))
# {
# inventTable_ds.object(fieldnum(InventTable, ItemTaggingLevel)).allowEdit(true);
# inventTable_ds.object(fieldnum(InventTable, ItemTaggingLevel)).skip(false);
# }
# else
# {
# inventTable_ds.object(fieldnum(InventTable, ItemTaggingLevel)).allowEdit(false);
# inventTable_ds.object(fieldnum(InventTable, ItemTaggingLevel)).skip(true);
# }
#
# if (inventTable.ItemType != ItemType::Service &&
# dimSearch.findActive(inventTable.DimGroupId, fieldnum(InventDim,wmsPalletId)))
# {
# inventTable_ds.object(fieldnum(InventTable, PalletTagging)).allowEdit(true);
# inventTable_ds.object(fieldnum(InventTable, PalletTagging)).skip(false);
# }
# else
# {
# inventTable_ds.object(fieldnum(InventTable, PalletTagging)).allowEdit(false);
# inventTable_ds.object(fieldnum(InventTable, PalletTagging)).skip(true);
# }
#}
ENDSOURCE
SOURCE #setAltItemDimEnabled
#void setAltItemDimEnabled()
#{
# boolean altConfigActive;
# boolean altSizeActive;
# boolean altColorActive;
# InventTable altInventTable;
# ;
#
# altInventTable = InventTable::find(inventTable.AltItemId);
# altConfigActive = altInventTable.RecId && altInventTable.configActive();
# altSizeActive = altInventTable.RecId && altInventTable.sizeActive();
# altColorActive = altInventTable.RecId && altInventTable.colorActive();
#
# inventTable_ds.object(fieldnum(InventTable, AltConfigId)).allowEdit(altConfigActive);
# inventTable_ds.object(fieldnum(InventTable, AltInventSizeId)).allowEdit(altSizeActive);
# inventTable_ds.object(fieldnum(InventTable, AltInventColorId)).allowEdit(altColorActive);
#}
#
#
ENDSOURCE
SOURCE #init
#public void init()
#{
# ;
# //Item list page can open this for edit/create
# SysListPageHelper::handleInitPreSuper(element);
#
# super();
# this.setItemPriceToleranceGroupEnabled();
#
# SysListPageHelper::handleInitPostSuper(element);
#}
#
ENDSOURCE
SOURCE #numberSeqFormHandler
#NumberSeqFormHandler numberSeqFormHandler()
#{
# if (!numberSeqFormHandler)
# numberSeqFormHandler = NumberSeqFormHandler::newForm(InventParameters::numRefItemId().NumberSequence,
# element,
# inventTable_DS,
# fieldnum(InventTable,ItemId)
# );
# return numberSeqFormHandler;
#}
ENDSOURCE
SOURCE #docCursor
#public Common docCursor()
#{
# return inventTable;
#}
ENDSOURCE
SOURCE #setNonBOMFields
#void setNonBOMFields()
#{
# InventItemType inventItemType = inventTable.inventItemType();
# boolean canHaveBOM = inventItemType.canHaveBOM();
# boolean canBeProduced = inventItemType.canBeProduced();
#
# inventTable_ds.object(fieldnum(InventTable, Phantom)).allowEdit(canHaveBOM);
# inventTable_ds.object(fieldnum(InventTable, Phantom)).skip(!canHaveBOM);
#
# inventTable_ds.object(fieldnum(InventTable, AutoReportFinished)).allowEdit(canBeProduced && !inventTable.Phantom);
# inventTable_ds.object(fieldnum(InventTable, AutoReportFinished)).skip(!(canBeProduced && !inventTable.Phantom));
#
# // PBA begin
# inventTable_ds.object(fieldnum(InventTable, pbaItemConfigurable)).allowEdit(canHaveBOM);
# inventTable_ds.object(fieldnum(InventTable, pbaItemConfigurable)).skip(!canHaveBOM);
#
# if ( ! canHaveBOM )
# {
# inventTable.pbaItemConfigurable = NoYes::No;
# inventTable.pbaHideDialog = NoYes::No;
# inventTable.pbaHideApproval = NoYes::No;
# inventTable.pbaMandatoryConfig = NoYes::No;
# }
# // PBA end
#}
#
ENDSOURCE
SOURCE #Close
#void close()
#{
# ;
# if (numberSeqFormHandler)
# numberSeqFormHandler.formMethodClose();
#
# super();
#}
ENDSOURCE
SOURCE #setItemDimEnabled
#void setItemDimEnabled()
#{
# boolean canHaveBOM = inventTable.inventItemType().canHaveBOM();
# boolean configActive = inventTable.configActive();
# boolean sizeActive = inventTable.sizeActive();
# boolean colorActive = inventTable.colorActive();
# boolean itemDim = InventDim::hasItemDimActive(inventTable.DimGroupId);
# boolean multiItemDim = InventDim::hasMultipleItemDimActive(inventTable.DimGroupId);
# ;
#
# element.lock();
#
# configs.enabled(configActive);
# inventSizes.enabled(sizeActive);
# inventColors.enabled(colorActive);
#
# inventDimCombination.enabled(itemDim);
# extCodeValueTable.enabled(!itemDim);
#
#
# inventTable_ds.object(fieldnum(InventTable, StandardConfigId)).allowEdit(configActive);
# inventTable_ds.object(fieldnum(InventTable, StandardConfigId)).skip(!configActive);
#
# inventTable_ds.object(fieldnum(InventTable, Configurable)).allowEdit(configActive && canHaveBOM);
# inventTable_ds.object(fieldnum(InventTable, Configurable)).skip(!(configActive && canHaveBOM));
# if (inventTable.Configurable && !(configActive && canHaveBOM))
# inventTable.Configurable = NoYes::No;
#
# inventTable_ds.object(fieldnum(InventTable, ConfigSimilar)).allowEdit(configActive && canHaveBOM);
# inventTable_ds.object(fieldnum(InventTable, ConfigSimilar)).skip(!(configActive && canHaveBOM));
# if (inventTable.ConfigSimilar && !(configActive && canHaveBOM))
# inventTable.ConfigSimilar = NoYes::No;
#
# inventTable_ds.object(fieldnum(InventTable, StandardInventSizeId)).allowEdit(sizeActive);
# inventTable_ds.object(fieldnum(InventTable, StandardInventSizeId)).skip(!sizeActive);
#
# inventTable_ds.object(fieldnum(InventTable, StandardInventColorId)).allowEdit(colorActive);
# inventTable_ds.object(fieldnum(InventTable, StandardInventColorId)).skip(!colorActive);
#
# inventTable_ds.object(fieldnum(InventTable, ItemDimCombinationAutoCreate)).allowEdit(multiItemDim);
# inventTable_ds.object(fieldnum(InventTable, ItemDimCombinationAutoCreate)).skip(!multiItemDim);
#
# inventTable_ds.object(fieldnum(InventTable, ItemDimCostPrice)).allowEdit(itemDim);
# inventTable_ds.object(fieldnum(InventTable, ItemDimCostPrice)).skip(!itemDim);
#
# inventTable_ds.object(fieldnum(InventTable, ItemIdCompany)).allowEdit(!itemDim);
# inventTable_ds.object(fieldnum(InventTable, ItemIdCompany)).skip(itemDim);
#
# element.setAltItemDimEnabled();
#
# element.unLock();
#}
#
#
ENDSOURCE
SOURCE #DoReread
#void doReread(Object caller = null)
#{
# inventTable_ds.reread();
# purch_ds.reread();
# invent_ds.reread();
# sales_ds.reread();
# inventTable_ds.refresh();
# inventTable_ds.active();
#
# if (caller && SysDictClass::isEqualOrSuperclass(classidget(caller),classnum(FormRun)))
# {
# if (caller.name() == formstr(bomCalcTable))
# {
# pricesInvent.update();
# pricesInvent.update();
# }
# }
#}
ENDSOURCE
SOURCE #PBAsetEnabled
#void pbAsetEnabled()
#{
# inventTable_ds.object(fieldnum(InventTable, pbaHideDialog)).allowEdit(inventTable.pbaItemConfigurable);
# inventTable_ds.object(fieldnum(InventTable, pbaHideDialog)).skip(!inventTable.pbaItemConfigurable);
#
# inventTable_ds.object(fieldnum(InventTable, pbaHideApproval)).allowEdit(inventTable.pbaItemConfigurable);
# inventTable_ds.object(fieldnum(InventTable, pbaHideApproval)).skip(!inventTable.pbaItemConfigurable);
#
# inventTable_ds.object(fieldnum(InventTable, pbaAutoStart)).allowEdit(inventTable.pbaItemConfigurable);
# inventTable_ds.object(fieldnum(InventTable, pbaAutoStart)).skip(!inventTable.pbaItemConfigurable);
#
# inventTable_ds.object(fieldnum(InventTable, pbaMandatoryConfig)).allowEdit(inventTable.pbaItemConfigurable);
# inventTable_ds.object(fieldnum(InventTable, pbaMandatoryConfig)).skip(!inventTable.pbaItemConfigurable);
#}
ENDSOURCE
ENDMETHODS
OBJECTBANK
PROPERTIES
ENDPROPERTIES
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #InventTable
Table #InventTable
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD ItemType
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#void modified()
#{
# super();
#
# element.setNonBOMFields();
# element.setItemDimEnabled();
# element.setRFIDEnabled();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD AltItemId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# element.setAltItemDimEnabled();
# inventTable_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD Phantom
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# ;
# super();
#
# element.setNonBOMFields();
# element.redraw();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD AltConfigId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{
# ;
# ConfigTable::lookupConfigIdSimple(_formControl,inventTable.AltItemId);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD AltInventSizeId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{
# ;
# InventSize::lookupSizeIdSimple(_formControl,inventTable.AltItemId);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD AltInventColorId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{
# ;
# InventColor::lookupColorIdSimple(_formControl,inventTable.AltItemId);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD PBAItemConfigurable
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# element.pbAsetEnabled();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD PBAAutoStart
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# inventTable.modifiedField(fieldnum(InventTable,pbaAutoStart));
# inventTable_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD PBAMandatoryConfig
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# inventTable.modifiedField(fieldnum(InventTable,pbaMandatoryConfig));
# inventTable_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD DimGroupId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# ;
# super();
# element.setItemDimEnabled();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ItemGroupId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# InventItemGroup inventItemGroup;
#
# super();
#
# inventItemGroup = InventItemGroup::find(inventTable.ItemGroupId);
# purch.initTaxItemGroupFromSlsPrchItemGrp(inventItemGroup);
# sales.initTaxItemGroupFromSlsPrchItemGrp(inventItemGroup);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #linkActive
#void linkActive()
#{
# ;
# element.numberSeqFormHandler().formMethodDataSourceLinkActive();
# super();
#}
ENDSOURCE
SOURCE #WRITE
#// AOSRunMode::Client
#void write()
#{
# ttsbegin;
#
# purch.ItemId = inventTable.ItemId;
# invent.ItemId = inventTable.ItemId;
# sales.ItemId = inventTable.ItemId;
# inventitemLocation.ItemId = inventTable.ItemId;
#
# super();
#
# element.numberSeqFormHandler().formMethodDataSourceWrite();
#
# ttscommit;
#
# // update sales price
#
# sales_ds.reread();
#}
#
ENDSOURCE
SOURCE #validateWrite
#boolean validateWrite()
#{
# boolean ret = true;
# ;
#
# purch.ItemId = inventTable.ItemId;
# invent.ItemId = inventTable.ItemId;
# sales.ItemId = inventTable.ItemId;
# inventitemLocation.ItemId = inventTable.ItemId;
#
# if (!inventTable.RecId && InventTable::exist(inventTable.ItemId))
# return checkFailed(strfmt("@SYS58214", inventTable.ItemId));
#
# ret = super();
# ret = element.numberSeqFormHandler().formMethodDataSourceValidateWrite(ret) && ret;
# if (!ret)
# return false;
#
# if (!inventTable.checkItemDimCombination())
# return false;
#
# if (!UnitConvert::canConvert(purch.UnitId, invent.UnitId, inventTable.ItemId))
# ret = checkFailed(strfmt("@SYS28690", purch.UnitId, invent.UnitId));
#
# if (!UnitConvert::canConvert(invent.UnitId, sales.UnitId, inventTable.ItemId))
# ret = checkFailed(strfmt("@SYS28690", invent.UnitId, sales.UnitId));
#
#
# return ret;
#}
#
ENDSOURCE
SOURCE #Delete
#// AOSRunMode::Client
#void delete()
#{
# ttsbegin;
#
# element.numberSeqFormHandler().formMethodDataSourceDelete();
#
# super();
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #create
#// AOSRunMode::Client
#void create(boolean appenD = false)
#{
# ;
# ctrlInventTable_ItemId.setFocus();
#
# element.numberSeqFormHandler().formMethodDataSourceCreatePre();
#
# super(appenD);
#
# element.numberSeqFormHandler().formMethodDataSourceCreate();
#}
#
ENDSOURCE
SOURCE #Active
#int active()
#{
# int ret;
# ;
#
# ret = super();
#
# element.setBOMRouteEnabled();
# element.setRFIDEnabled();
# element.setItemDimEnabled();
# element.pbAsetEnabled();
# element.setFiscalLIFOEnabled();
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #Purch
Table #InventTableModule
JoinSource #InventTable
LinkType #InnerJoin
InsertAtEnd #No
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD Price
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# purch_Ds.updateNewPrice();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD PriceUnit
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# purch_Ds.updateNewPrice();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD Markup
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# purch_Ds.updateNewPrice();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD UnitId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
# ;
#
# ret = super();
#
# if (ret)
# {
# if (!UnitConvert::canConvert(purch.UnitId, invent.UnitId, inventTable.ItemId))
# return checkFailed(strfmt("@SYS28690", purch.UnitId, invent.UnitId));
# }
#
# return ret;
#}
#
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #validateWrite
#boolean validateWrite()
#{
# ;
# purch.ItemId = inventTable.ItemId;
# return super();
#}
#
ENDSOURCE
SOURCE #init
#void init()
#{
# #DEFINE.PURCHDATASOURCENO(2)
# super();
#
# criteriaPurch = this.query().dataSourceNo(#PURCHDATASOURCENO).addRange(fieldnum(InventTableModule,ModuleType));
# criteriaPurch.value(queryValue(ModuleInventPurchSales::Purch));
# criteriaPurch.status(RangeStatus::Hidden);
#
# this.query().dataSourceNo(#PURCHDATASOURCENO).addSortIndex(indexnum(InventTableModule,ItemModuleIdx));
# this.query().dataSourceNo(#PURCHDATASOURCENO).indexIsHint(true);
#}
ENDSOURCE
SOURCE #UpdateNewPrice
#void updateNewPrice()
#{
# if (purch && inventTable.SalesModel && inventTable.SalesPriceModelBasic == SalesPriceModelBasic::PurchPrice)
# {
# purch_DS.write();
# sales_DS.reread();
# }
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #Invent
Table #InventTableModule
JoinSource #InventTable
LinkType #InnerJoin
InsertAtEnd #No
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD Price
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# invent_DS.updateNewPrice();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD PriceUnit
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# invent_DS.updateNewPrice();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD Markup
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# invent_DS.updateNewPrice();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #validateWrite
#boolean validateWrite()
#{
# ;
# invent.ItemId = inventTable.ItemId;
# return super();
#}
#
ENDSOURCE
SOURCE #init
#void init()
#{
# #DEFINE.INVENTDATASOURCENO(3)
# super();
#
# criteriaInvent= this.query().dataSourceNo(#INVENTDATASOURCENO).addRange(fieldnum(InventTableModule,ModuleType));
# criteriaInvent.value(queryValue(ModuleInventPurchSales::Invent));
# criteriaInvent.status(RangeStatus::Hidden);
#
# this.query().dataSourceNo(#INVENTDATASOURCENO).addSortIndex(indexnum(InventTableModule,ItemModuleIdx));
# this.query().dataSourceNo(#INVENTDATASOURCENO).indexIsHint(true);
#}
ENDSOURCE
SOURCE #UpdateNewPrice
#void updateNewPrice()
#{
# DialogBox dialogBox;
# ;
#
# if (invent && inventTable.SalesModel && inventTable.SalesPriceModelBasic == SalesPriceModelBasic::CostPrice)
# {
# dialogBox = new DialogBox(DialogBoxType::YesNoBox, strfmt('%1 %2?', '@SYS40695', '@SYS77785'), '@SYS6998','', 1);
# if( dialogBox.retval() == DialogButton::Yes )
# {
# invent_DS.write();
# sales_DS.reread();
# }
# }
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #Sales
Table #InventTableModule
JoinSource #InventTable
LinkType #InnerJoin
InsertAtEnd #No
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD UnitId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
# ;
#
# ret = super();
#
# if (ret)
# {
# if (!UnitConvert::canConvert(invent.UnitId, sales.UnitId, inventTable.ItemId))
# return checkFailed(strfmt("@SYS28690", invent.UnitId, sales.UnitId));
# }
#
# return ret;
#}
#
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #validateWrite
#boolean validateWrite()
#{
# ;
# sales.ItemId = inventTable.ItemId;
# return super();
#}
#
ENDSOURCE
SOURCE #init
#void init()
#{
# #DEFINE.SALESDATASOURCENO(4)
# super();
#
# criteriaSalesOrder= this.query().dataSourceNo(#SALESDATASOURCENO).addRange(fieldnum(InventTableModule,ModuleType));
# criteriaSalesOrder.value(queryValue(ModuleInventPurchSales::Sales));
# criteriaSalesOrder.status(RangeStatus::Hidden);
#
# this.query().dataSourceNo(#SALESDATASOURCENO).addSortIndex(indexnum(InventTableModule,ItemModuleIdx));
# this.query().dataSourceNo(#SALESDATASOURCENO).indexIsHint(true);
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #InventItemLocation
Table #InventItemLocation
JoinSource #InventTable
LinkType #InnerJoin
InsertAtEnd #No
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #validateWrite
#boolean validateWrite()
#{
# ;
# inventItemLocation.ItemId = inventTable.ItemId;
# return super();
#}
#
ENDSOURCE
SOURCE #Init
#void init()
#{
# QueryBuildRange queryBuildRange;
#
# ;
#
# super();
#
# queryBuildRange = this.query().dataSourceTable(tablenum(InventItemLocation)).addRange(fieldnum(InventItemLocation,InventDimId));
# queryBuildRange.value(queryValue(InventDim::inventDimIdBlank()));
# queryBuildRange.status(RangeStatus::Hidden);
#
# this.query().dataSourceTable(tablenum(InventItemLocation)).addSortIndex(indexnum(InventItemLocation,ItemDimIdx));
# this.query().dataSourceTable(tablenum(InventItemLocation)).indexIsHint(true);
#}
#
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
ENDOBJECTBANK
JOINS
Purch InventTable
Invent InventTable
Sales InventTable
InventItemLocation InventTable
ENDJOINS
DESIGN
PROPERTIES
Caption #@SYS7407
TitleDatasource #InventTable
HTMLHelpFile #HTMLHelpFileIWorker
HTMLHelpTopic #AxShared.chm::/html/7F60CC0A-3806-4144-A685-582529D80EE6.htm
HideIfEmpty #No
ENDPROPERTIES
CONTAINER
CONTROL TAB
PROPERTIES
Name #Tab
AutoDeclaration #Yes
Width #Column width
Height #Column height
Tabs #11
Columns #1
ENDPROPERTIES
CONTAINER
CONTROL TABPAGE
PROPERTIES
Name #Overview
Caption #@SYS9039
ENDPROPERTIES
CONTAINER
CONTROL GRID
PROPERTIES
Name #Grid
Width #Column width
Height #Column height
DataSource #InventTable
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #ctrlInventTable_ItemId
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2a944a98-4940-4bf9-bcd5-3deb2e8edb56.htm
DataSource #InventTable
DataField #ItemId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #InventTable_ItemName
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/243986d6-3e2c-4ccb-a80c-ae953d8606bb.htm
DataSource #InventTable
DataField #ItemName
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #InventTable_NameAlias
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/8ede0323-0790-48d2-8ed5-744e84a3ddad.htm
DataSource #InventTable
DataField #NameAlias
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #InventTable_ItemGroupId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/8568e6c7-57fa-44c7-bc33-78c02a31c4be.htm
DataSource #InventTable
DataField #ItemGroupId
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #InventTable_ItemType
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/1dc0f263-1d78-4c87-9a4a-9766d4c96a28.htm
Selection #255
DataSource #InventTable
DataField #ItemType
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #General
Caption #@SYS2952
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Column1
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/D66814C8-5632-4065-BAED-16F64024F489.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Identification
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/99E81F4D-D2AA-40AB-8382-7AA5097A6F0D.htm
DataSource #InventTable
DataGroup #Identification
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #ctrlItemId
AutoDeclaration #Yes
DataSource #InventTable
DataField #ItemId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Name
Width #Column width
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/AE9EF650-937F-4925-9C8F-11A760C69351.htm
Caption #@SYS7407
DataSource #InventTable
DataGroup #Name
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Name_ItemName
DataSource #InventTable
DataField #ItemName
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Name_NameAlias
DataSource #InventTable
DataField #NameAlias
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #Name_ItemType
DataSource #InventTable
DataField #ItemType
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Name_M_txtDefault
HelpText #@SYS58702
DisplayLength #30
MultiLine #Yes
DataSource #InventTable
DataMethod #txtDefault
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Column2
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/3F577A08-870A-41C2-9394-561B42BF4AC8.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Groups
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/3BBFA138-CA8F-4164-86C5-FBC90F3285BD.htm
DataSource #InventTable
DataGroup #Groups
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #InvenItemtLocationGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/ECE49E37-5A09-4C7F-B184-D68C27F0A724.htm
Caption #@SYS2828
DataSource #InventItemLocation
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #InventItemLocation_CountGroupId
DataSource #InventItemLocation
DataField #CountGroupId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #FiscalLIFO
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/1AFDD48D-0F1D-4AA6-9484-B4A2E9A10B70.htm
DataSource #InventTable
DataGroup #FiscalLIFO
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Column3
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/A9F1AE9C-F58E-4747-9D1C-D49CF8EBC176.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #ProductConfigurator
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/B473CF93-CC63-44BA-BCD2-620439CAC5ED.htm
DataSource #InventTable
DataGroup #ProductConfigurator
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #ctrlStandardConfigId
DataSource #InventTable
DataField #StandardConfigId
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Lookup
#void lookup()
#{
#;
# ConfigTable::lookupConfigId(this,inventTable.ItemId);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #ctrlConfigurable
DataSource #InventTable
DataField #Configurable
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #ctrlConfigSimilar
DataSource #InventTable
DataField #ConfigSimilar
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ProductBuilder
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/367708FF-DA12-42CE-9B23-AD60A0DDCDAA.htm
DataSource #InventTable
DataGroup #ProductBuilder
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #ProductBuilder_PBAItemConfigurable
DataSource #InventTable
DataField #PBAItemConfigurable
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #ProductBuilder_PBAHideDialog
DataSource #InventTable
DataField #PBAHideDialog
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #ProductBuilder_PBAHideApproval
DataSource #InventTable
DataField #PBAHideApproval
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #ProductBuilder_PBAAutoStart
DataSource #InventTable
DataField #PBAAutoStart
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #ProductBuilder_PBAMandatoryConfig
DataSource #InventTable
DataField #PBAMandatoryConfig
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ItemdimensionsSetup
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2EECD454-DE43-4A87-A6FC-EB562E0AB251.htm
DataSource #InventTable
DataGroup #ItemDimensionsSetup
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ItemdimensionsDefault
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/5B5AA721-3D74-4CCB-99BF-11E390AA55C2.htm
DataSource #InventTable
DataGroup #ItemDimensionsDefault
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #Setup
Visible #No
Caption #@SYS2186
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #PriceUpdate
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/E86DA39D-1CEB-4135-8816-23819E5A3A54.htm
DataSource #InventTable
DataGroup #PriceUpdate
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SetupColumn2
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/66CE841D-77B5-4725-9101-A5AB6F2C0F8B.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #ItemData
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/B34AC4FA-D0D1-4126-9CEE-ADCBDE55F248.htm
Caption #@SYS23860
DataSource #InventTable
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #ItemData_InventUnitId
Label #@SYS16617
DataSource #Invent
DataField #UnitId
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #ItemData_UnitVolume
DataSource #InventTable
DataField #UnitVolume
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #ItemData_TaxPackagingQty
DataSource #InventTable
DataField #TaxPackagingQty
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #ItemData_NetWeight
DataSource #InventTable
DataField #NetWeight
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #ItemData_TaraWeight
DataSource #InventTable
DataField #TaraWeight
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #grossWeight
AllowEdit #No
DataSource #InventTable
DataMethod #grossWeight
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #PhysicalDimensions
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/FE77CBCE-F779-4268-BA4A-3D3F02A5DDA3.htm
DataSource #InventTable
DataGroup #PhysicalDimensions
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #WarehouseManagement
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/3E6AEB84-DE4C-44DD-AD01-A311C11B491D.htm
DataSource #InventTable
DataGroup #WarehouseManagement
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #RFIDTagging
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/13119992-5836-4202-B0D8-72996B76E0D2.htm
DataSource #InventTable
DataGroup #RFIDTagging
ENDPROPERTIES
CONTAINER
CONTROL COMBOBOX
PROPERTIES
Name #RFIDTagging_ItemTaggingLevel
DataSource #InventTable
DataField #ItemTaggingLevel
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #RFIDTagging_PalletTagging
ConfigurationKey #WMSPallet
DataSource #InventTable
DataField #PalletTagging
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #References
Caption #@SYS14018
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #PurchaseOrderGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/F34B2454-4F15-49D8-AD87-DB4A7B3D1C89.htm
Caption #@SYS15812
DataSource #Purch
DataGroup #Setup
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Purch_UnitId
Label #@SYS22997
DataSource #Purch
DataField #UnitId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Purch_MarkupGroupId
DataSource #Purch
DataField #MarkupGroupId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Purch_TaxItemGroupId
DataSource #Purch
DataField #TaxItemGroupId
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #Purch_OverDeliveryPct
DataSource #Purch
DataField #OverDeliveryPct
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #Purch_UnderDeliveryPct
DataSource #Purch
DataField #UnderDeliveryPct
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #Purch_InterCompanyBlocked
DataSource #Purch
DataField #InterCompanyBlocked
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #BOMGroup
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2DF49979-9EF6-449B-A242-078424F4A4E1.htm
DataSource #InventTable
DataGroup #BOM
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SalesOrderGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/67F8AF9D-5D02-46A9-902F-A75BB94B431B.htm
Caption #@SYS7443
DataSource #Sales
DataGroup #Setup
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Sales_UnitId
Label #@SYS79797
DataSource #Sales
DataField #UnitId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Sales_MarkupGroupId
DataSource #Sales
DataField #MarkupGroupId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Sales_TaxItemGroupId
DataSource #Sales
DataField #TaxItemGroupId
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #Sales_OverDeliveryPct
DataSource #Sales
DataField #OverDeliveryPct
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #Sales_UnderDeliveryPct
DataSource #Sales
DataField #UnderDeliveryPct
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #Sales_InterCompanyBlocked
DataSource #Sales
DataField #InterCompanyBlocked
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ProductionGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/F5195CAA-FBF0-4A55-AF91-5CF638323828.htm
DataSource #InventTable
DataGroup #Production
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #InventTransferOrders
Caption #@SYS78286
DataSource #Invent
DataGroup #DeliveryPercent
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ProjectGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/D12C6AE7-AB83-47F5-80AD-8E1B47524F38.htm
DataSource #InventTable
DataGroup #Project
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #BOMCalculationGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/A90210CD-B656-4EA0-8FD9-DB60F62EA728.htm
DataSource #InventTable
DataGroup #BOMCalculation
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ItemCovGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/F91C8126-EFB1-49B7-9B18-8AB9EBEEDE8A.htm
DataSource #InventTable
DataGroup #ItemCoverage
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #PriceDisc
Caption #@SYS19789
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #PriceDiscPurch
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/0E004336-9720-491B-B9C4-A47F394CFC53.htm
Caption #@SYS111222
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Prices
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/8DB72B50-6FD8-4566-9BAE-539F8BD15805.htm
FrameType #None
DataSource #Purch
DataGroup #Prices
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #PurchDisc
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2AD61921-26EC-4BD3-9D31-1FFB36577E17.htm
FrameType #None
DataSource #Purch
DataGroup #Discount
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Purch_LineDisc
DataSource #Purch
DataField #LineDisc
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Purch_MultiLineDisc
DataSource #Purch
DataField #MultiLineDisc
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #Purch_EndDisc
DataSource #Purch
DataField #EndDisc
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #PurchSupplementaryItem
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/1D06E4E9-ABAB-4A91-8D7D-FFB259BCBEB3.htm
FrameType #None
DataSource #Purch
DataGroup #SupplementaryItem
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #PurchSuppItemGroupId
DataSource #Purch
DataField #SuppItemGroupId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #PriceDiscInvent
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/75CF4D0A-8FE7-4C3A-8668-B1E2BBAECE29.htm
Caption #@SYS111223
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #PricesInvent
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/82C55B91-99AF-4AC2-84BF-5484BB4F4500.htm
FrameType #None
DataSource #Invent
DataGroup #Prices
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #PriceDiscSales
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/97ACA68F-D9AF-4C95-A675-1C31C0E8AB49.htm
Caption #@SYS111224
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #PricesSales
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/D7555837-FB48-4B16-AC8D-CAFF5FFA1D6B.htm
FrameType #None
DataSource #Sales
DataGroup #Prices
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SalesDisc
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/57055A33-E9E7-49F9-A759-6AF5113BFB91.htm
FrameType #None
DataSource #Sales
DataGroup #Discount
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Sales_LineDisc
DataSource #Sales
DataField #LineDisc
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Sales_MultiLineDisc
DataSource #Sales
DataField #MultiLineDisc
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #Sales_EndDisc
DataSource #Sales
DataField #EndDisc
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SalesSupplementaryItem
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/6E407A14-B823-42A7-92B0-DB834691AC9D.htm
FrameType #None
DataSource #Sales
DataGroup #SupplementaryItem
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesSuppItemGroupId
DataSource #Sales
DataField #SuppItemGroupId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #Various
Visible #No
Caption #@SYS1284
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #VariousCol1
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/1028B663-77D8-4BDB-BCAE-718ECE5348C2.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #groupItemCompany
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/AB091DBE-9299-44C5-BEB2-CA7B1F942D96.htm
DataSource #InventTable
DataGroup #ItemCompany
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #groupInterCompany_companyItem
DataSource #InventTable
DataField #ItemIdCompany
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ItemAlternative
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/C073976B-8AD0-4CB2-9775-879CD93653F3.htm
DataSource #InventTable
DataGroup #ItemAlternative
ENDPROPERTIES
CONTAINER
CONTROL COMBOBOX
PROPERTIES
Name #UseAltItemId
DataSource #InventTable
DataField #UseAltItemId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #AltItemId
DataSource #InventTable
DataField #AltItemId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #AltConfigId
AutoDeclaration #Yes
DataSource #InventTable
DataField #AltConfigId
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Lookup
#void lookup()
#{
#;
# ConfigTable::lookupConfigId(this,inventTable.AltItemId,false);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ItemAlternative_AltInventSizeId
AutoDeclaration #Yes
DataSource #InventTable
DataField #AltInventSizeId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ItemAlternative_AltInventColorId
AutoDeclaration #Yes
DataSource #InventTable
DataField #AltInventColorId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Settlement
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/AAAD6508-899C-421C-BD45-73D5B9F562CB.htm
DataSource #InventTable
DataGroup #Settlement
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #VariousCol2
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/DE341B52-CEB6-42A6-BA28-A00B2C0C7A9D.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #ABC
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/69DAC01F-C299-48D8-9825-7168435A79F0.htm
DataSource #InventTable
DataGroup #ABC
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ForeignTrade
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/D03E3CEF-BAD8-48C0-BF3C-E43149D02A8B.htm
DataSource #InventTable
DataGroup #ForeignTrade
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #VariousCol3
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/93C4582A-8B75-4E0D-8B7C-7A60CA96CAEA.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Measurement
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/B74C15E3-3AB5-49EF-893F-861FFF6C8ECD.htm
DataSource #InventTable
DataGroup #Measurement
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Forecast1
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/E547272E-F285-4DD9-87B5-0F21FA96D355.htm
DataSource #InventTable
DataGroup #Forecast
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #Dimension
Caption #@SYS14926
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #DimensionGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/92FF2FCE-AB5F-44A2-B4B4-367784E11F4E.htm
FrameType #None
DataSource #InventTable
DataGroup #Dimension
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL BUTTONGROUP
PROPERTIES
Name #ButtonGroup
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventTransItem
MenuItemName #InventTransItem1
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventOnHandItem
MenuItemName #InventOnhandItem
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #SetupMenu
HelpText #@SYS28777
Text #@SYS2186
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Texts
SaveRecord #No
MenuItemName #InventTxt
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Configs
AutoDeclaration #Yes
SaveRecord #No
MenuItemName #ConfigTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventSizes
AutoDeclaration #Yes
MenuItemName #InventSizes
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventColors
AutoDeclaration #Yes
MenuItemName #InventColors
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventDimCombination
AutoDeclaration #Yes
MenuItemName #InventDimCombination
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventItemOrderSetup
MenuItemName #InventItemOrderSetup
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventItemOrderSetupDim
MenuItemName #InventItemOrderSetupDim
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventItemLocation
SaveRecord #No
MenuItemName #InventItemLocation
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ReqItemTable
MenuItemName #ReqItemTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventItemBarcode
MenuItemName #InventItemBarcode
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventItemGTIN
MenuItemName #InventItemGTIN
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventTestItemQualityGroup
MenuItemName #InventTestItemQualityGroup
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Setup_Separator1
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProductPresentation
MenuItemName #ECPpresentation
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Setup_Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CustExternalItem
Text #@SYS54851
MenuItemName #CustExternalItem
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #VendExternalItem
Text #@SYS54852
MenuItemName #VendExternalItem
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ExtCodeValueTable
AutoDeclaration #Yes
MenuItemName #ExtCodeValueTable
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Setup_Separator3
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Commission
SaveRecord #No
MenuItemName #CommissionCalc
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #UnitRecalc
SaveRecord #No
MenuItemName #UnitConvert
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Setup_Separator4
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Posting
SaveRecord #No
MenuItemName #InventPosting
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventProdComSetup
MenuItemType #Action
MenuItemName #InventProdComSetup
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #TradeAgreements
HelpText #@SYS28753
Text #@SYS13768
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesPrice
MenuItemName #PriceDiscTable_PriceSales
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesLineDisc
MenuItemName #PriceDiscTable_LineDiscSales
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesMultiLineDisc
MenuItemName #PriceDiscTable_MultiLineDiscSales
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesEndDisc
MenuItemName #PriceDiscTable_EndDiscSales
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #TradeAgreements_Separator1
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #PurchPrice
MenuItemName #PriceDiscTable_PricePurch
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #PurchLineDisc
MenuItemName #PriceDiscTable_LineDiscPurch
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #PurchMultiLineDisc
MenuItemName #PriceDiscTable_MultiLineDiscPurch
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #PurchEndDisc
MenuItemName #PriceDiscTable_EndDiscPurch
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #TradeAgreements_Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SuppItemTable_Sales
MenuItemName #SuppItemTable_Sales
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #TradeAgreements_Separator3
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SuppItemTable_Purch
MenuItemName #SuppItemTable_Purch
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #Functions
HelpText #@SYS28752
Text #@SYS10340
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ItemTypeChange
SaveRecord #No
MenuItemType #Action
MenuItemName #InventItemTypeChange
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #EditDimensions
MenuItemName #InventTransEditDimensions
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InterCompanyCreateItem
MenuItemName #InterCompanyCreateItem
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #Inquiries
HelpText #@SYS28754
Text #@SYS3850
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Lots
SaveRecord #No
MenuItemName #InventLotItem
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventBatch
MenuItemName #InventBatch
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Inquiries_Separator1
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #PurchLineOpenOrder
MenuItemName #PurchLineOpenOrder
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesLineOpenOrder
MenuItemName #SalesLineOpenOrder
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Inquiries_Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProdTable
MenuItemName #ProdTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventNonConformanceTable
MenuItemName #InventNonConformanceTable
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Inquiries_Separator3
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ReqTransact
SaveRecord #No
MenuItemName #ReqTransNet
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventReqMaster
MenuItemName #ReqTransGross
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Inquiries_Separator4
AllowEdit #No
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesATP
MenuItemName #SalesATP
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventSupply
MenuItemName #InventSupply
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Inquiries_Separator6
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Statistics
AllowEdit #No
SaveRecord #No
MenuItemName #InventStatistics
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Inquiries_Separator5
AllowEdit #No
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CostControlCommittedCost
AllowEdit #No
SaveRecord #No
MenuItemName #costcontrolCommittedCost
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #Forecast
HelpText #@SYS28775
Text #@SYS26551
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #BudgetPurch
SaveRecord #No
MenuItemName #ForecastPurchItem
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #BudgetSales
SaveRecord #No
MenuItemName #ForecastSalesItem
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Invent
SaveRecord #No
MenuItemName #ForecastInvent
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #BOM
HelpText #@SYS28776
ConfigurationKey #BOM
Text #@SYS7916
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# inventTable_ds.active();
#
# super();
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ctrlBOMConsistOf
AutoDeclaration #Yes
MenuItemName #BOMConsistOf
DataSource #InventTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ctrlBOMDesigner
AutoDeclaration #Yes
MenuItemName #BOMDesigner
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #BOMPartOf
SaveRecord #No
MenuItemName #BOMPartOf
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #BOM_Separator1
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ctrlBOMConfigRoute
AutoDeclaration #Yes
SaveRecord #No
MenuItemName #BOMConfigRoute
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ctrlBOMConfigHierarchy
AutoDeclaration #Yes
MenuItemName #ConfigHierarchy
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #BOM_Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ctrlBOMReportFinished
AutoDeclaration #Yes
SaveRecord #No
MenuItemType #Action
MenuItemName #BOMReportFinished
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ctrlBOMReportFinishMax
AutoDeclaration #Yes
MenuItemName #BOMReportFinishMax
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #BOM_Separator3
Height #100
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ctrlRoute
AutoDeclaration #Yes
MenuItemName #RouteInventProd
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #AxdSendItem
MultiSelect #No
MenuItemType #Action
MenuItemName #AxdSendItem
ENDPROPERTIES
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #CtrlProjectControl
HelpText #@SYS56214
Text #@SYS56214
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjStatistic
MenuItemName #ProjStatistic
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjCostControl
Text #@SYS103931
MenuItemName #projCostControl
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #projInvoiceControl
MenuItemName #projInvoiceControl
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjCashFlow
ConfigurationKey #ProjAdvCashFlow
MenuItemName #ProjCashFlow
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventItemPrice
MenuItemName #InventItemPrice
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDDESIGN
ENDFORM
***Element: FRM
; Microsoft Dynamics AX Forms unloaded
; --------------------------------------------------------------------------------
FRMVERSION 5
FORM #CGranFilterNorma19
PROPERTIES
Name #CGranFilterNorma19
ENDPROPERTIES
METHODS
Version: 3
SOURCE #filePathLookupTitle
#str filePathLookupTitle()
#{
# return 'Lookup Title: Boll';
#}
#
#
ENDSOURCE
SOURCE #fileNameLookupFilename
#str fileNameLookupFilename()
#{
#
# return '';
#}
ENDSOURCE
SOURCE #fileNameLookupInitialPath
#str fileNameLookupInitialPath()
#{
# return '';
#}
ENDSOURCE
SOURCE #fileNameLookupFilter
#container fileNameLookupFilter()
#{
# return ['All files','*.*'];
#}
ENDSOURCE
SOURCE #classDeclaration
#public class FormRun extends ObjectRun
#{
#}
ENDSOURCE
ENDMETHODS
OBJECTBANK
PROPERTIES
ENDPROPERTIES
ENDOBJECTBANK
JOINS
ENDJOINS
DESIGN
PROPERTIES
Caption #Generar Norma 19 por Filtro
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Group
AutoDeclaration #Yes
Caption #Filtros
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesId
AutoDeclaration #Yes
ExtendedDataType
ARRAY
#SalesId
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #NIF
AutoDeclaration #Yes
ExtendedDataType
ARRAY
#CustAccount
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Name
AutoDeclaration #Yes
ExtendedDataType
ARRAY
#Name
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Group1
AutoDeclaration #Yes
Caption #Ruta para guardar el fichero
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #filePath
AutoDeclaration #Yes
ExtendedDataType
ARRAY
#FilePath
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ButtonGroup
AutoDeclaration #Yes
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL BUTTON
PROPERTIES
Name #OK
AutoDeclaration #Yes
Text #Aceptar
ENDPROPERTIES
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #Cancel
AutoDeclaration #Yes
Text #Cancelar
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#//CarlosGranados: Cierro el formulario
#void clicked()
#{
# element.close();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDDESIGN
ENDFORM
***Element: FRM
; Microsoft Dynamics AX Forms unloaded
; --------------------------------------------------------------------------------
FRMVERSION 5
FORM #SalesTable
PROPERTIES
Name #SalesTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #ClassDeclaration
#class FormRun
#extends ObjectRun
#{
# SalesTableForm salesTableForm;
# SalesTableType salesTableType;
# SalesId newSalesId;
#
# boolean isReturnFieldsEnabled;
# SalesTable2LineUpdatePrompt salesTable2LineUpdatePrompt;
#
# boolean advanced;
#
# QueryBuildRange queryBuildRangeProjId;
# QueryBuildRange queryBuildRangeSalesId;
# boolean showChild;
#
# InventDimCtrl_Frm_Mov inventDimFormSetup;
# SysFormSplitter_Y _formSplitterVertical;
#
# SalesId oldSalesId;
#
# boolean headerError;
# boolean askingModifyInvoiced;
#
# List salesLineFieldList;
# ListIterator salesLineFieldListIterator;
#
# QuotationId lastQuotation;
# TransDate lastQuotationDate;
# ConfirmId lastConfirm;
# TransDate lastConfirmDate;
# PickingListId lastPickingList;
# TransDate lastPickingListDate;
# PackingSlipId lastPackingSlip;
# TransDate lastPackingSlipDate;
# InvoiceId lastInvoice;
# TransDate lastInvoiceDate;
# //PBA begin
# boolean autoConfig;
# boolean deleting;
# // PBA end
#
# Object tmpSalesTableTaxTransForm;
#
# RecId interCompanyIsPriceDiscSearchNeeded;
#
# boolean cashDiscOnInvoice;
#
# boolean allowSetFocusOnItemId;
#
# Addressing oldThirdPartyBillingAddr;
# //CarlosGranados
# filePath filePathNorma19;
# //END CarlosGranados
#}
#
ENDSOURCE
SOURCE #CGranValidatefilePathSaveProposal
#//CarlosGranados: Validación de Ruta
#boolean CGranValidatefilePathSaveProposal (filepath _filepath)
#{
# boolean ret;
# ;
#
# if (!_filePath)
# {
# ret = false;
# throw warning("Debes especificar la ruta para guardar los ficheros");
# }
# else
# ret = true;
#
# if(!WINAPI::folderExists(_filePath))
# {
# ret = false;
# throw warning("Debes especificar una ruta válida para guardar los ficheros");
# }
# else
# ret = true;
#
# return ret;
#
#}
ENDSOURCE
SOURCE #CGranShowDialogCheckProgramDirFilePath
#//CarlosGranados:Dialog con Ruta Local
#boolean CGranShowDialogCheckProgramDirFilePath ()
#{
# SalesTable SalesTable_CreatingProposalClean;
# dialog Dialog;
# DialogGroup DialogGroup, DialogGroupPath;
# boolean ret;
# FormDateControl fromdateControl,todateControl,filePathcontrol;
# DialogField DialogFilePath;
# ;
#
#
# Dialog = new Dialog();
# Dialog.caption(strfmt("Generar fichero Norma 19 Id.de pedido %1",SalesTable.SalesId));
# DialogGroupPath = Dialog.addGroup("Guardar ficheros de Norma 19");
# DialogFilePath = Dialog.addField(typeid(filePath), "Especifica ruta local para guardar la Norma19");
#
# filePathcontrol = DialogFilePath.control();
# filePathcontrol.mandatory(true);
#
# while(Dialog.run())
# {
# filePathNorma19 = DialogFilePath.value();
#
# if(! this.CGranValidatefilePathSaveProposal(filePathNorma19))
# {
# ret = false;
# Dialog.doInit();
# }
# else
# {
# ret = true;
# break;
# }
#
# }
#
# if(!Dialog.closedOk())
# {
# info("Has cancelado la generación del fichero");
# ret = false;
# }
# else {
# info (strfmt("El fichero de Norma 19 se ha generado en :%1",DialogFilePath.value()));
# }
#
#
# return ret;
#}
ENDSOURCE
SOURCE #docCursor
#public Common docCursor()
#{
# Common docCursor;
#
# docCursor = super();
#
# if (docCursor.TableId == tablenum(InventDim))
# {
# docCursor = salesLine;
# }
#
# return docCursor;
#}
ENDSOURCE
SOURCE #enableCreditCardMenuItems
#public void enableCreditCardMenuItems()
#{
# ;
#
# creditCardPreauthorize.enabled(
# CustParameters::find().CreditCardPreAuthorization &&
# salesTable.CreditCardCustRefId != 0);
#
# creditCardWizard.enabled(
# salesTable.payment().CreditCardPaymentType == CreditCardPaymentType::CreditCard &&
# CreditCardProcessors::validateCurrencyForUSDProviders(salesTable.CurrencyCode));
#}
ENDSOURCE
SOURCE #applyBackOrderLinesSelection
#///
#/// If form was called by BackOrderLines list page, applies additional ranges to the form data source to show only sales orders that were selected in a list page.
#///
#///
#/// If form called not from BackOrderLines list page no action is taken.
#///
#
#private void applyBackOrderLinesSelection()
#{
# Map selectedSalesIds;
# MapEnumerator en;
# ;
#
# if (!this.isCalledFromSalesLineBackOrderListPage())
# return;
#
# // Apply filter to show only Sales Orders selected in a list form.
# selectedSalesIds = element.args().caller().getSalesIdsSelected();
# if (selectedSalesIds)
# {
# // Dynalínks should be cleared before applying a ranges to prevent displaying only lines, selected in list page!
# salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).clearDynalinks();
#
# en = new MapEnumerator(selectedSalesIds);
# while(en.moveNext())
# {
# salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable,SalesId)).value(en.currentValue());
# }
# }
#
#}
#
#
ENDSOURCE
SOURCE #isCalledFromSalesLineBackOrderListPage
#private boolean isCalledFromSalesLineBackOrderListPage()
#{
# Object myCaller;
# FormRun callerForm;
# boolean calledFromListPage = false;
# ;
# if (element.args())
# {
# myCaller = element.args().caller();
# if (myCaller && SysDictClass::is(myCaller, classnum(SysSetupFormRun)))
# {
# callerForm = myCaller;
# if (callerForm.name() == formstr(SalesLineBackOrderListPage))
# {
# calledFromListPage = true;
# }
# }
# }
# return calledFromListPage;
#}
#
ENDSOURCE
SOURCE #hideQualityManagement
#void hideQualityManagement()
#{
# ;
# qualityOrderStatusDisplayTable.visible(false);
# qualityOrderStatusDisplayLine.visible(false);
# inventNonConformanceTableHeader.visible(false);
# inventQualityOrderTableHeader.visible(false);
# inventNonConformanceTableLine.visible(false);
# inventQualityOrderTableLine.visible(false);
# inventTestCertOfAnalysisTable.visible(false);
#}
ENDSOURCE
SOURCE #returnedItem
#boolean returnedItem()
#{;
# return salesTable.SalesType == SalesType::ReturnItem;
#}
ENDSOURCE
SOURCE #setReturnFields
#void setReturnFields()
#{
# boolean allowEditOrCreate = !salesTable.returnItem();
# ;
#
# salesLine_ds.allowCreate(allowEditOrCreate);
#
# // Sales header enabling and disabling
#
# salesAvailableDlvDatesHeader.enabled(allowEditOrCreate && salesAvailableDlvDatesHeader.enabled());
#
# salesTable_ds.object(fieldnum(SalesTable, Deadline)).allowEdit(allowEditOrCreate);
# salesTable_ds.object(fieldnum(SalesTable, InventLocationId)).allowEdit(allowEditOrCreate );
# salesTable_ds.object(fieldnum(SalesTable, Reservation)).allowEdit(allowEditOrCreate);
#
# salesTable_ds.object(fieldnum(SalesTable, ItemTagging)).allowEdit(allowEditOrCreate);
# salesTable_ds.object(fieldnum(SalesTable, CaseTagging)).allowEdit(allowEditOrCreate);
# salesTable_ds.object(fieldnum(SalesTable, PalletTagging)).allowEdit(allowEditOrCreate);
#
# delivery.allowEdit(allowEditOrCreate);
# miscDelivery.allowEdit(allowEditOrCreate);
# transport.allowEdit(allowEditOrCreate);
# payment.allowEdit(allowEditOrCreate);
#
# // Salesline enabling and disabling
#
# salesAvailableDlvDatesLine.enabled(allowEditOrCreate && salesAvailableDlvDatesLine.enabled());
#
# // ItemId, SalesQty, Blocked, Complete, Return lot id
# salesLine_ds.object(fieldnum(SalesLine, ItemId)).allowEdit(allowEditOrCreate && salesLine_ds.object(fieldnum(SalesLine, ItemId)).allowEdit());
# salesLine_ds.object(fieldnum(SalesLine, SalesQty)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, Blocked)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, Complete)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, InventTransIdReturn)).allowEdit(allowEditOrCreate);
#
# // Inventory dimensions
# inventDim_ds.allowEdit(allowEditOrCreate);
#
# salesLine_ds.object(fieldnum(SalesLine, LedgerAccount)).allowEdit(allowEditOrCreate);
#
# // Quantity
# salesLine_ds.object(fieldnum(SalesLine, SalesDeliverNow)).allowEdit(allowEditOrCreate);
#
# // Price discount
# salesLine_ds.object(fieldnum(SalesLine, LinePercent)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, LineDisc)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, MultiLnDisc)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, MultiLnPercent)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, PriceUnit)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, SalesMarkup)).allowEdit(allowEditOrCreate);
#
# // Bar code
# salesLine_ds.object(fieldnum(SalesLine, BarCode)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, BarCodeType)).allowEdit(allowEditOrCreate);
#
# // Project
# salesLine_ds.object(fieldnum(SalesLine, ProjId)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, ProjCategoryId)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, ProjTransId)).allowEdit(allowEditOrCreate);
#
# // Packing materials
# salesLine_ds.object(fieldnum(SalesLine, PackingUnit)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, PackingUnitQty)).allowEdit(allowEditOrCreate);
#
# // Address
# salesLine_ds.object(fieldnum(SalesLine, DeliveryName)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, DeliveryStreet)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, DeliveryZipCode)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, DeliveryCity)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, DeliveryCounty)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, DeliveryState)).allowEdit(allowEditOrCreate);
#
# salesLine_ds.object(fieldnum(SalesLine, DeliveryCountryRegionId)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, TaxItemGroup)).allowEdit(allowEditOrCreate);
# salesLine_ds.object(fieldnum(SalesLine, TaxGroup)).allowEdit(allowEditOrCreate);
#
# lineDelivery.allowEdit(allowEditOrCreate && lineDelivery.allowEdit());
# miscLineDelivery.allowEdit(allowEditOrCreate && miscLineDelivery.allowEdit());
# lineInventory.allowEdit(allowEditOrCreate && lineInventory.allowEdit());
#}
#
ENDSOURCE
SOURCE #PBAConfigureLine
#void pbaConfigureLine()
#{
# PBATablePBAInstance pbaTablePBAInstance;
# SalesLine salesLineFind;
# ;
#
# salesLine_DS.write();
#
# if ( ! autoConfig )
# {
# PBAExecute::execute(salesLine,pbaTablePBAInstance, salesLine.CustAccount);
# }
#
# autoConfig = false;
#
# salesLineFind = SalesLine::find(salesLine.SalesId, salesLine.LineNum);
#
# // syncs sales table with db
# salesLine_ds.research();
#
# // updates table ui
# salesLine_DS.reread();
#
# // finds the current selected sales line
# salesLine_ds.findRecord(salesLineFind);
#}
ENDSOURCE
SOURCE #automaticTotalDiscount
#public void automaticTotalDiscount()
#{
# SalesTable localSalesTable;
# ;
# if(CustParameters::find().AutomaticTotalDiscount)
# {
# for (localSalesTable = salesTable_ds.getFirst(true) ? salesTable_ds.getFirst(true) : salesTable_ds.cursor(); localSalesTable; localSalesTable = salesTable_ds.getNext())
# {
# localSalesTable.updateFinalDisc();
# }
# salesTable_ds.reread();
# salesTable_ds.refresh();
#
# //This will trigger the creditlimit calculation when salesTable.validateWrite is called
# salesTable_ds.setTouched();
# }
#}
ENDSOURCE
SOURCE #updateRFIDTagging
#void updateRFIDTagging()
#{
# RFIDItemTaggingLevel taggingLevel;
# boolean itemTagging = true;
# boolean caseTagging = true;
# boolean palletTagging = true;
# ;
#
# if (inventDimFormSetup.mustEnableField(fieldnum(InventDim, InventSerialId)))
# {
# if (salesLine.ItemTagging)
# {
# caseTagging = false;
# }
# else
# {
# caseTagging = true;
# }
#
# if (salesLine.CaseTagging)
# {
# itemTagging = false;
# }
# else
# {
# itemTagging = true;
# }
# }
# else
# {
# itemTagging = false;
# caseTagging = true;
# }
#
# if (inventDimFormSetup.mustEnableField(fieldnum(InventDim, wmsPalletId))
# && salesline.inventTable().PalletTagging)
# {
# palletTagging = true;
# }
# else
# {
# palletTagging = false;
# }
#
# if (itemTagging || caseTagging)
# {
# taggingLevel = salesLine.inventTable().ItemTaggingLevel;
#
# switch (taggingLevel)
# {
# case RFIDItemTaggingLevel::None :
# itemTagging = false;
# caseTagging = false;
# break;
#
# case RFIDItemTaggingLevel::ItemLevel :
# caseTagging = false;
# break;
#
# case RFIDItemTaggingLevel::CaseLevel :
# itemTagging = false;
# break;
# }
# }
#
# salesLine_ds.object(fieldnum(SalesLine, ItemTagging)).allowEdit ( itemTagging);
# salesLine_ds.object(fieldnum(SalesLine, ItemTagging)).skip (!itemTagging);
# salesLine_ds.object(fieldnum(SalesLine, CaseTagging)).allowEdit ( caseTagging);
# salesLine_ds.object(fieldnum(SalesLine, CaseTagging)).skip (!caseTagging);
# salesLine_ds.object(fieldnum(SalesLine, PalletTagging)).allowEdit ( palletTagging);
# salesLine_ds.object(fieldnum(SalesLine, PalletTagging)).skip (!palletTagging);
#}
ENDSOURCE
SOURCE #canClose
#public boolean canClose()
#{
# boolean ret;
# ;
# // PBA begin
# if( ! salesLine.PBAItemLine::checkMandatory() )
# {
# return false;
# }
# // PBA end
#
# ret = super();
#
# if (element.closedCancel() && ret)
# {
# ret = salesTableForm.canClose(salesTable);
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #gotoLines
#void gotoLines()
#{
# salesLineGrid.setFocus();
#}
ENDSOURCE
SOURCE #Run
#void run()
#{
# int designatedTabNo = 1;
# ;
#
# if (!advanced)
# {
# designatedTabNo = 2;
# }
# else if (this.isCalledFromListPage())
# {
# designatedTabNo = 3;
# }
#
# SysListPageHelper::handleRunPreSuper(element, tabHeader, designatedTabNo, designatedTabNo);
# super();
# SysListPageHelper::handleRunPostSuper(element, tabHeader);
#}
ENDSOURCE
SOURCE #PrevGroup
#void prevGroup()
#{
# if (advanced)
# salesTable_SalesIdAdvanced.setFocus();
# else
# salesTable_SalesIdSimple.setFocus();
#}
ENDSOURCE
SOURCE #NextGroup
#void nextGroup()
#{;
# if (!SalesLine::exist(salesTable.SalesId))
# salesLine_ds.create();
#
# salesLine_ItemId.setFocus();
#}
ENDSOURCE
SOURCE #init
#public void init()
#{
# boolean wasCalledFromSalesLineBackOrderListPage = this.isCalledFromSalesLineBackOrderListPage();
# ;
# if (element.args() && element.args().dataset() == tablenum(ProjTable))
# showChild = element.args().caller().showChild();
#
# // To avoid issues with not alligned data source structures of this form and BackOrderLine list page
# // do not call to the SysListPageHelper::handleInitPreSuper when this form is opened from BackOrderLine list page!
# if (!wasCalledFromSalesLineBackOrderListPage)
# {
# SysListPageHelper::handleInitPreSuper(element);
# }
#
# isReturnFieldsEnabled = false;
#
# super();
#
# advanced = true;
#
# // Initialization specifically for projects
# // Only show sales orders associated to projects if form is called from the project main menu
# if (element.args().parmEnumType() == enumnum(SalesTableFormId) && element.args().parmEnum() == SalesTableFormId::Project)
# {
# if (! element.args().record()) // called from menu
# salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, ProjId)).value(SysQuery::valueNotEmptyString());
# }
#
# // Initialization specifically for Journals and Blanket orders
# // Do not allow order type change if form was called from Sales journal or Blanket order menu items
# if (element.args().parmEnumType() == enumnum(SalesTableFormId) && (element.args().parmEnum() == SalesTableFormId::Blanket || element.args().parmEnum() == SalesTableFormId::Journal))
# {
# salesTable_ds.object(fieldnum(SalesTable, SalesType)).allowEdit(false);
# salesTable_SalesType.allowEdit(false);
# }
#
# // Initialization specifically for BackOrderLines list page...
# if (wasCalledFromSalesLineBackOrderListPage)
# this.applyBackOrderLinesSelection();
#
# salesTableForm = SalesTableForm::construct((element.args().parmEnumType() ? element.args().parmEnum() : maxint()),
# element.args().record());
#
# salesLineFieldList = salesTableForm.createSalesLineFieldList();
# salesLineFieldListIterator = new ListIterator(salesLineFieldList);
# salesTableForm.setCreditInvoicingButton(buttonCustVendCreditInvoicingHeader,
# buttonCustVendCreditInvoicingLines);
#
#
# TaxVATNumTable::enableLookupVATNum(vatNum);
#
# element.updateDesign(InventDimFormDesignUpdate::Init);
# element.updateRFIDTagging();
#
# salesLineGrid.visibleColsValue(8+conlen(inventDimFormSetup.dimFieldsActive(inventDimFormSetup.parmDimParmVisibleGrid())));
#
# [advanced] = salesTableForm.isAdvanced();
#
# element.toggelSimpleAdvanced();
# salesTable_ds.object(fieldnum(SalesTable, SalesType)).allowEdit(salesTableForm.editSalesType());
#
# salesTable_ds.query(salesTableForm.querySalesTable(salesTable_ds.query()));
# salesLine_ds.query(salesTableForm.querySalesLine(salesLine_ds.query()));
#
# _formSplitterVertical = new SysFormSplitter_Y(ctrlSplitVertical, table, this);
# groupNotificationToTheCentralBank.visible(CustParameters::find().CustPaym_NO);
#
# if (!TaxParameters::find().CashDiscOnInvoice)
# salesTable_ds.object(fieldnum(SalesTable, CashDiscPercent)).allowEdit(false);
#
# allowSetFocusOnItemId = true;
#
# if (!InventParameters::find().UseQualityManagement)
# {
# element.hideQualityManagement();
# }
#
# if (!wasCalledFromSalesLineBackOrderListPage)
# {
# SysListPageHelper::handleInitPostSuper(element);
# }
#
# this.enableCreditCardMenuItems();
# shipCarrierAddress_ds.query(Address::queryThirdPartyAddr(shipCarrierAddress_ds.query()));
# shipCarrierAddressInLine_ds.query(Address::queryThirdPartyAddr(shipCarrierAddressInLine_ds.query()));
#}
#
ENDSOURCE
SOURCE #Close
#void close()
#{;
# salesTableForm.isAdvanced(advanced);
# xSysLastValue::saveLast(salesTableForm);
#
# if (salesTableType)
# {
# salesTableType.formMethodClose();
# }
#
# super();
#}
ENDSOURCE
SOURCE #salesTable
#SalesTable salesTable()
#{
# return salesTable;
#}
ENDSOURCE
SOURCE #inventDimSetupObject
#Object inventDimSetupObject()
#{
# return inventDimFormSetup;
#}
ENDSOURCE
SOURCE #updateDesign
#void updateDesign(InventDimFormDesignUpdate mode)
#{
# InventMovement movement = InventMovement::construct(salesLine);
#
# switch (mode)
# {
# case InventDimFormDesignUpdate::Init :
# if (!inventDimFormSetup)
# inventDimFormSetup = InventDimCtrl_Frm_Mov_Sales::newFromFormMovement(element, movement);
#
# case InventDimFormDesignUpdate::Active :
# inventDimFormSetup.formActiveSetup(movement.inventTable().DimGroupId,movement);
# inventDimFormSetup.formSetControls(true);
# break;
#
# case InventDimFormDesignUpdate::FieldChange :
# inventDimFormSetup.formActiveSetup(movement.inventTable().DimGroupId,movement);
# inventDimFormSetup.formSetControls(false);
# break;
#
# default : throw error(strfmt("@SYS54195",funcname()));
# }
#}
#
ENDSOURCE
SOURCE #checkCreditNoteLine
#void checkCreditNoteLine()
#{
# // Additional check of returned item disables all these fields, if the -ve qty salesline is of type returned item.
# boolean creditNote = salesLine.creditNoteLine() && !salesTable.returnItem();
# boolean editCostPrice = !salesLine.InventTransIdReturn || !InventTable::find(salesLine.ItemId).inventModelGroup().inventModelType().stdCostBased();
# boolean editInventTransIdReturn = creditNote && !salesLine.BlanketRefTransId;
# ;
#
# salesLine_ds.object(fieldnum(SalesLine, Scrap)).allowEdit(creditNote && salesLine.deliveredInTotal() == 0);
# salesLine_ds.object(fieldnum(SalesLine, Scrap)).skip(!creditNote);
#
# salesLine_ds.object(fieldnum(SalesLine, InventTransIdReturn)).allowEdit(editInventTransIdReturn);
# salesLine_ds.object(fieldnum(SalesLine, InventTransIdReturn)).skip(!editInventTransIdReturn);
#
# salesLine_ds.object(fieldnum(SalesLine, CostPrice)).allowEdit((creditNote && editCostPrice));
# salesLine_ds.object(fieldnum(SalesLine, CostPrice)).skip(!(creditNote && editCostPrice));
#
# if (salesLine.Scrap && salesLine.SalesQty >= 0)
# salesLine.Scrap = NoYes::No;
#}
#
ENDSOURCE
SOURCE #createLineAllowed
#boolean createLineAllowed()
#{
# boolean createLine;
# ;
# if (salesTable.returnItem())
# createLine = false;
# else
# createLine = salesTableForm.createLineAllowed();
#
# return createLine;
#}
#
ENDSOURCE
SOURCE #setEditItemAllowed
#void setEditItemAllowed(boolean allowEdit)
#{;
# salesLine_ds.object(fieldnum(SalesLine, ItemId)).allowEdit (allowEdit);
#}
#
ENDSOURCE
SOURCE #SetCaptionText
#void setCaptionText()
#{;
# element.design().caption(strfmt('%1 %2 %3 %4 %5 %6 %7 %8',"@SYS9694",salesTable.SalesId,',',"@SYS7399", salesTableForm.captionName(),',',"@SYS5398",salesLine.itemName()));
#}
ENDSOURCE
SOURCE #EditSales
#void editSales(boolean allowEdit, boolean allowDelete = allowEdit)
#{;
# if (element.args() && element.args().dataset() == tablenum(SalesTable))
# {
# salesTable_ds.allowEdit (allowEdit);
# salesTable_ds.allowCreate (false);
# salesTable_ds.allowDelete (false);
# salesLine_ds.allowEdit (allowEdit);
# salesLine_ds.allowCreate (allowEdit);
# salesLine_ds.allowDelete (allowEdit);
#
# }
# else
# {
# salesTable_ds.allowEdit (allowEdit);
# salesTable_ds.allowDelete (allowEdit && allowDelete);
# salesLine_ds.allowEdit (allowEdit);
# salesLine_ds.allowCreate (allowEdit);
# salesLine_ds.allowDelete (allowEdit && allowDelete);
# }
#}
ENDSOURCE
SOURCE #ToggelSimpleAdvanced
#void toggelSimpleAdvanced(boolean _advanced = advanced)
#{
# element.lock();
#
# advanced = _advanced;
#
# if (!advanced)
# {
# tabHeader.showTabs (false);
# tabLine.showTabs (false);
#
# tabHeaderSimple.visible (true);
# tabHeaderOverview.visible (false);
# tabHeaderGeneral.visible (false);
# tabHeaderSetUp.visible (false);
# tabHeaderAddress.visible (false);
# tabHeaderDelivery.visible (false);
# tabHeaderPriceCalc.visible (false);
# tabHeaderPostings.visible (false);
# tabHeaderOther.visible (false);
# tabHeaderDimension.visible (false);
#
# tabLineOverview.visible (true);
# tabLineGeneral.visible (false);
# tabLineSetUp.visible (false);
# tabLineQty.visible (false);
# tabLineOther.visible (false);
# tabLinePriceDisc.visible (false);
# tabLineDimension.visible (false);
#
# buttonToggelSimple.visible (true);
# buttonToggelAdvanced.visible (false);
# buttonHeaderSetup.visible (false);
# buttonHeaderFunction.visible (false);
# buttonHeaderTradeAgreements.visible (false);
# buttonHeaderQuickQuote.visible (true);
#
# buttonLine.visible (false);
#
# tabHeader.tab(2);
# tabLine.tab(1);
# }
# else
# {
# tabHeader.showTabs (true);
# tabLine.showTabs (true);
#
# tabHeaderOverview.visible (true);
# tabHeaderGeneral.visible (true);
# tabHeaderSetUp.visible (true);
# tabHeaderAddress.visible (true);
# tabHeaderDelivery.visible (true);
# tabHeaderPriceCalc.visible (true);
# tabHeaderPostings.visible (true);
# tabHeaderOther.visible (true);
# tabHeaderDimension.visible (true);
#
# tabLineOverview.visible (true);
# tabLineGeneral.visible (true);
# tabLineSetUp.visible (true);
# tabLineQty.visible (true);
# tabLineOther.visible (true);
# tabLinePriceDisc.visible (true);
# tabLineDimension.visible (true);
#
# tabHeaderSimple.visible (false);
#
# buttonToggelSimple.visible (false);
# buttonToggelAdvanced.visible (true);
# buttonHeaderSetup.visible (true);
# buttonHeaderFunction.visible (true);
# buttonHeaderTradeAgreements.visible (true);
# buttonHeaderQuickQuote.visible (false);
#
# buttonLine.visible (true);
#
# tabHeader.tab(1);
# }
#
# element.resetSize();
#
# element.unLock();
#
# if (advanced)
# salesTable_SalesIdAdvanced.setFocus();
# else
# salesTable_SalesIdSimple.setFocus();
#}
ENDSOURCE
SOURCE #NewSalesId
#SalesId newSalesId(SalesId _newSalesId = newSalesId)
#{
# newSalesId = _newSalesId;
# return _newSalesId;
#}
ENDSOURCE
SOURCE #changeType
#void changeType()
#{
# ;
# if (salesTableType)
# salesTableType.formMethodSalesTypeModifiedPreChange(element, salesTable_ds, true);
#
# salesTableType = salesTable.type();
#
# salesTableType.formMethodSalesTypeModifiedPostChange(element, salesTable_ds, true);
#
# salesTableForm.enableAvailableDlvDatesButtons(salesTable,
# salesAvailableDlvDatesHeader,
# salesAvailableDlvDatesLine);
#}
#
ENDSOURCE
SOURCE #doRefresh
#void doRefresh(boolean _lineRefreshNeeded = false)
#{
# salesTable_ds.reread();
# salesTable_ds.refresh();
#
# if (_lineRefreshNeeded)
# {
# salesLine_ds.reread();
# salesLine_ds.refresh();
# }
# else
# {
# salesLine_ds.research();
# }
#
# interCompanyPurchSalesReference_ds.executeQuery();
#}
ENDSOURCE
SOURCE #PBAsetEnabled
#void pbAsetEnabled()
#{
# InventTable inventTable = InventTable::find(salesline.ItemId);
# ;
# pbaExecute.enabled(inventTable.pbaItemConfigurable &&
# (!inventDim.mustCheckItemDimCombination(inventTable.DimGroupId) ||
# InventDimCombination::exist(inventTable.ItemId,inventDim)) && !salesTable.returnItem());
#
#}
#
ENDSOURCE
SOURCE #interCompanyIsPriceDiscSearchNeeded
#RecId interCompanyIsPriceDiscSearchNeeded()
#{;
# return interCompanyIsPriceDiscSearchNeeded;
#}
#
ENDSOURCE
SOURCE #isCalledFromListPage
#private boolean isCalledFromListPage()
#{
# Object myCaller;
# FormRun callerForm;
# boolean calledFromListPage = false;
# ;
#
# if (element.args())
# {
# myCaller = element.args().caller();
# if (myCaller && SysDictClass::is(myCaller, classnum(SysSetupFormRun)))
# {
# callerForm = myCaller;
# if (callerForm.design().windowType() == 2) //ListPage
# {
# calledFromListPage = true;
# }
# }
# }
# return calledFromListPage;
#}
#
ENDSOURCE
ENDMETHODS
OBJECTBANK
PROPERTIES
ENDPROPERTIES
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #SalesTable
Table #SalesTable
Index #SalesIdx
StartPosition #Last
InsertAtEnd #No
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD PaymentSched
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# if (salesTable.PaymentSched)
# {
# buttonPaymentSchedule.enabled(true);
# }
# else
# {
# buttonPaymentSchedule.enabled(false);
# }
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD SalesType
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# element.changeType();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ContactPersonId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{;
# super();
# salesTable_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD SalesId
PROPERTIES
AllowEdit #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD VATNum
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#public void jumpRef()
#{
# if (TaxVATNumTable::taxVATNumTableEnabled())
# TaxVATNumTable::jumpRefVATNum(salesTable, element);
# else
# super();
#}
ENDSOURCE
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{;
# if (TaxVATNumTable::taxVATNumTableEnabled())
# TaxVATNumTable::lookupVATNum(vatNum,salesTable);
# else
# super(_formControl, _filterStr);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD Payment
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# salesTable_ds.object(fieldnum(SalesTable, DlvMode)).mandatory(salesTable.dlvModeMandatory());
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InterCompanyAutoCreateOrders
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# if (salesTable.InterCompanyAutoCreateOrders)
# {
# salesTableForm.interCompanyAutoCreateOrdersNow(true);
# }
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InterCompanyOrder
PROPERTIES
AllowEdit #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD CashDisc
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# CashDisc cashDisc;
# ;
#
# super();
#
# cashDisc = CashDisc::find(salesTable.CashDisc);
# salesTable.CashDiscPercent = cashDisc.Percent;
#
# salesTable.dataSource().refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD EInvoiceLineSpec
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# salesTable_ds.showDimAccount();
#}
#
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ReturnItemNum
PROPERTIES
AllowEdit #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#public void jumpRef()
#{
# ;
# salesTable.jumpRefReturnItemNum(element);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InventLocationId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{
# if (salesTable.InventSiteId)
# {
# InventLocation::lookupBySiteIdAllTypes(_formControl, salesTable.InventSiteId);
# }
# else
# {
# super(_formControl, _filterStr);
# }
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD CustAccount
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# ;
#
# super();
#
# if ((select firstonly salesLine where salesLine.SalesId == salesTable.SalesId).RecId)
# {
# salesLine_ds.executeQuery();
# }
# shipCarrierAddress_ds.executeQuery();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #validateDelete
#boolean validateDelete()
#{
# boolean ret;
# ;
#
# // Are you sure you want to delete replacement order? A return order is attached.
# if (salesTable.ReturnItemNum && SalesTable::findReturnItemNum(salesTable.ReturnItemNum).ReturnReplacementId == salesTable.SalesId
# && Box::yesNo("@SYS106592", DialogButton::No) == DialogButton::No)
# {
# ret = false;
# }
# else
# {
# ret = super();
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #executeQuery
#public void executeQuery()
#{
# ;
# buttonHeaderFunction.enabled (false);
# buttonLineFunction.enabled (false);
#
# super();
#}
ENDSOURCE
SOURCE #setTouched
#void setTouched()
#{
# // required by form MarkupTrans to communicate changes to the caller
# ;
# salesTableForm.setTouched(salesTable);
#}
ENDSOURCE
SOURCE #lastJournals
#void lastJournals()
#{
# container lastJournals;
# ;
#
# if (salesTable.DocumentStatus || salesTable.QuotationId)
# {
# lastJournals = salesTable.lastJournals();
#
# [lastQuotation, lastQuotationDate] = conpeek(lastJournals, SalesTableType::posQuotation());
# [lastConfirm, lastConfirmDate] = conpeek(lastJournals, SalesTableType::posConfirmation());
# [lastPickingList, lastPickingListDate] = conpeek(lastJournals, SalesTableType::posPickingList());
# [lastPackingSlip, lastPackingSlipDate] = conpeek(lastJournals, SalesTableType::posPackingSlip());
# [lastInvoice, lastInvoiceDate] = conpeek(lastJournals, SalesTableType::posInvoice());
# }
# else
# {
# lastQuotation = '';
# lastQuotationDate = dateNull();
# lastConfirm = '';
# lastConfirmDate = dateNull();
# lastPickingList = '';
# lastPickingListDate = dateNull();
# lastPackingSlip = '';
# lastPackingSlipDate = dateNull();
# lastInvoice = '';
# lastInvoiceDate = dateNull();
# }
#}
ENDSOURCE
SOURCE #reread
#public void reRead()
#{
# if (salesTableType)
# {
# salesTableType.formMethodDataSourceDelete(element, salesTable_ds, true);
# }
#
# super();
#}
ENDSOURCE
SOURCE #validateWrite
#boolean validateWrite()
#{
# CustParameters custParameters = CustParameters::find();
# boolean ret;
# ;
# if (salesTable.RecId != 0
# && salesTable.InterCompanyOrder)
# {
# salesTable.DeliveryDateControlType = SalesDeliveryDateControlType::None;
# }
#
# ret = super();
#
# if (!askingModifyInvoiced && ret && !salesTable.Touched)
# {
# askingModifyInvoiced = true;
# ret = salesTable.checkUpdate();
# askingModifyInvoiced = false;
# }
#
# if (ret && salesTableType && !salesTableType.formMethodDataSourceValidateWrite(element, salesTable_ds))
# {
# ret = false;
# }
#
# if (ret && salesTable.DeliveryDateControlType)
# {
# ret = SalesCalcAvailableDlvDates::validateWritePrompt(salesTable);
# }
#
# if (ret)
# {
# salesTable2LineUpdatePrompt = SalesTable2LineUpdatePrompt::construct(salesTable);
# if (!salesTable2LineUpdatePrompt.prompt())
# ret = false;
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #WRITE
#void write()
#{
# DialogButton copyAddress;
# boolean convertCurrency = false;
# TradeCurencyConversion tradeCurencyConversion = TradeCurencyConversion::ExchRate;
# boolean salesLineExists;
# boolean markupTransExists;
# ;
#
# if (!askingModifyInvoiced)
# {
# salesLineExists = SalesLine::exist(salesTable.SalesId);
# markupTransExists = MarkupTrans::exist(salesTable.TableId, salesTable.RecId);
# if (salesLineExists || markupTransExists)
# {
# if (salesTable.CurrencyCode != salesTable.orig().CurrencyCode)
# {
# [convertCurrency, tradeCurencyConversion] = SalesTable::promptConvertCurrencyCode();
# }
# }
#
# if (salesLineExists)
# {
# if (salesTable.DeliveryAddress != salesTable.orig().DeliveryAddress)
# {
# copyAddress = SalesTable::promptCopyDeliveryAddress();
# }
# }
#
# ttsbegin;
#
# if (copyAddress != DialogButton::Cancel && copyAddress != DialogButton::No)
# {
# salesTable.copyAddressToLine(copyAddress, salesTable);
# }
#
# if (salesLineExists || markupTransExists)
# {
# if (convertCurrency)
# {
# salesTable.convertCurrencyCode(salesTable.CurrencyCode, tradeCurencyConversion);
# }
# else
# {
# // Cancel has been choosen in the Convert Currency Code dialogue:
# // No attempts to recalc currency code should be made;
# // All changes made to the currency code have to be rolled back;
# // No additional warnings should be issued concerning currency code change operation.
# if (salesTable.CurrencyCode != salesTable.orig().CurrencyCode)
# {
# salesTable.CurrencyCode = salesTable.orig().CurrencyCode;
# }
# }
# }
#
# salesTable.Touched = NoYes::No;
#
# if (salesTableType)
# {
# salesTableType.formMethodDataSourceWrite(element, salesTable_ds);
# }
#
# super();
#
# salesTableForm.salesTable(salesTable);
#
# if (salesTable2LineUpdatePrompt)
# {
# salesTable2LineUpdatePrompt.run();
# salesTable2LineUpdatePrompt = null;
# }
#
# ttscommit;
#
# salesTableType = null;
# }
#
# if (headerError)
# {
# element.gotoLines();
# }
#
#}
ENDSOURCE
SOURCE #linkActive
#void linkActive()
#{
# ProjTable projTableLink;
# ProjInvoiceTable projInvoiceTableLink;
# ProjWIPTable projWIPTable;
# CostControlTransCommittedCost costControlTransCommittedCost;
# QueryBuildRange projIdSalesTable;
# ;
#
# switch(element.args().dataset())
# {
# case tablenum(CostControlTransCommittedCost):
# costControlTransCommittedCost = element.args().record();
# queryBuildRangeSalesId.value(queryValue(costControlTransCommittedCost.RefId));
# break;
#
# case tablenum(ProjTable) :
# projTableLink = element.args().record();
# if (showChild)
# queryBuildRangeProjId.value(projTableLink.ProjId+'*');
# else
# queryBuildRangeProjId.value(queryValue(projTableLink.ProjId));
# break;
# case tablenum(ProjInvoiceTable):
# projIdSalesTable = salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).findRange(fieldnum(SalesTable,ProjId));
#
# while (projIdSalesTable)
# {
# salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).clearRange(fieldnum(SalesTable,ProjId));
# projIdSalesTable = salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).findRange(fieldnum(SalesTable,ProjId));
# }
#
# projInvoiceTableLink = element.args().record();
#
# while select ProjId from projTableLink
# where projTableLink.ProjInvoiceProjId == projInvoiceTableLink.ProjInvoiceProjId
# {
# salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable,ProjId)).value(projTableLink.ProjId);
# }
# break;
#
# case tablenum(ProjWIPTable) :
# projIdSalesTable = salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).findRange(fieldnum(SalesTable,ProjId));
#
# while (projIdSalesTable)
# {
# salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).clearRange(fieldnum(SalesTable,ProjId));
# projIdSalesTable = salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).findRange(fieldnum(SalesTable,ProjId));
# }
#
# projWIPTable = element.args().record();
#
# while select ProjId from projTableLink
# where projTableLink.wipProject == projWIPTable.ProjId
# {
# salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable,ProjId)).value(projTableLink.ProjId);
# }
#
# break;
#
# case tablenum(smmActivities) :
# smmActivityParentLink::updateQuery(this.query().dataSourceTable(tablenum(SalesTable)), element.args().record());
# break;
# }
#
# if (salesTableForm.linkActive())
# {
# salesTableForm.salesTable(element.args().record());
# salesTable_ds.query(salesTableForm.querySalesTable(salesTable_ds.query()));
# }
#
# if (salesTableType)
# {
# salesTableType.formMethodDataSourceLinkActive(element, salesTable_ds);
# }
#
# super();
#}
ENDSOURCE
SOURCE #Init
#void init()
#{
# Query query;
# QueryBuildRange queryBuildRange;
# ProdTable prodTable;
# ;
#
# switch(element.args().dataset())
# {
# case tablenum(ProjTable) :
# salesTable_ds.autoQuery(false);
# query = new Query();
# queryBuildRangeProjId = query.addDataSource(tablenum(SalesTable)).addRange(fieldnum(SalesTable, ProjId));
# salesTable_ds.query(query);
# break;
#
# case tablenum(CostControlTransCommittedCost) :
# salesTable_ds.autoQuery(false);
# query = new Query();
# queryBuildRangeSalesId = query.addDataSource(tablenum(SalesTable)).addRange(fieldnum(SalesTable, SalesId));
# salesTable_ds.query(query);
# break;
#
# }
#
# super();
#
# switch(element.args().dataset())
# {
# case tablenum(ProdTable) :
# prodTable = element.args().record();
# if (prodTable.InventRefType == InventRefType::Sales && prodTable.InventRefId)
# {
# salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).clearDynalinks();
# salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).addDynalink(fieldnum(SalesTable, SalesId),element.args().record(),fieldnum(ProdTable, InventRefId));
# queryBuildRange = salesTable_ds.query().dataSourceTable(tablenum(SalesTable)).findRange(fieldnum(SalesTable, SalesStatus));
# if (queryBuildRange)
# {
# queryBuildRange.value(SysQuery::valueUnlimited());
# }
# }
# break;
# }
#
# salesTable_ds.cacheAddMethod(tablemethodstr(SalesTable, qualityOrderStatusDisplay));
# salesTable_ds.cacheAddMethod(tablemethodstr(SalesTable, salesIdBlanket));
#
#}
#
ENDSOURCE
SOURCE #Delete
#void delete()
#{;
# if (salesTable.checkDelete())
# {
# if (salesTableType)
# {
# salesTableType.formMethodDataSourceDelete(element, salesTable_ds);
# }
#
# super();
# buttonHeaderFunction.enabled (salesTable.RecId);
# }
#}
ENDSOURCE
SOURCE #Create
#void create(boolean append = true)
#{
# SalesTable newSalesTable;
# ;
# salesTableForm.interCompanyAutoCreateOrders();
#
# element.editSales(true);
#
# if (salesTableForm.create())
# {
# newSalesTable = SalesTable::find(salesTableForm.newSalesId());
#
# if (newSalesTable)
# {
# super(append);
#
# salesTable.data(newSalesTable);
# salesTable_ds.reread();
#
# tabLineOverview.setFocus();
# }
# }
# else
# {
# element.editSales(salesTableForm.editHeaderAllowed(), salesTableForm.deleteHeaderAllowed());
# }
#}
ENDSOURCE
SOURCE #Active
#int active()
#{
# int ret;
# SalesTableType editSalesTableType;
# SalesTotals salesTotals;
# boolean allowDelete, editDisc;
# ;
# ret = super();
#
# editSalesTableType = salesTable.type();
# salesTableForm.salesTable(salesTable);
# salesTableForm.enableAvailableDlvDatesButtons(salesTable, salesAvailableDlvDatesHeader, salesAvailableDlvDatesLine);
#
# // Enables or disables the sales order fields.
# if ((salesTable.SalesType == SalesType::ReturnItem && !isReturnFieldsEnabled)
# || (salesTable.SalesType != SalesType::ReturnItem && isReturnFieldsEnabled))
# {
# element.setReturnFields();
# isReturnFieldsEnabled = !isReturnFieldsEnabled;
# }
#
# buttonHeaderQuickQuote.enabled(salesTableForm.editHeaderAllowed());
# buttonLineQuickQuote. enabled(salesTableForm.editHeaderAllowed());
# buttonHeaderFunction. enabled(salesTable.RecId);
# buttonLineFunction. enabled(salesTable.RecId);
# salesUpdateRemain. enabled(editSalesTableType.canUpdateRemainingQty());
#
# salesTableForm.enableAvailableDlvDatesButtons(salesTable, salesAvailableDlvDatesHeader, salesAvailableDlvDatesLine);
# element.editSales(salesTableForm.editHeaderAllowed());
#
# salesTable_ds.object(fieldnum(SalesTable, CustAccount) ).allowEdit(editSalesTableType.editCustAccount());
# salesTable_ds.object(fieldnum(SalesTable, InvoiceAccount)).allowEdit(editSalesTableType.editInvoiceAccount());
# salesTable_ds.object(fieldnum(SalesTable, vatNum) ).allowEdit(editSalesTableType.editVATNum());
# salesTable_ds.object(fieldnum(SalesTable, InclTax) ).allowEdit(editSalesTableType.editInclTax());
#
# salesTable_ds.object(fieldnum(SalesTable, DlvMode) ).mandatory(salesTable.dlvModeMandatory());
#
# if (tabHeaderPostings.isActivePage())
# {
# this.lastJournals();
# }
#
# if (tmpSalesTableTaxTransForm && !tmpSalesTableTaxTransForm.closed())
# {
# salesTotals = SalesTotals::construct(salesTable);
# salesTotals.calc();
# tmpSalesTableTaxTransForm.pushTaxObject(salesTotals.tax());
# }
#
# allowDelete = editSalesTableType.checkDelete(false);
# salesTable_ds.allowDelete(allowDelete);
#
# editDisc = editSalesTableType.editDisc();
# salesTable_ds.object(fieldnum(SalesTable,PriceGroupId) ).enabled(editDisc);
# salesTable_ds.object(fieldnum(SalesTable,MultiLineDisc) ).enabled(editDisc);
# salesTable_ds.object(fieldnum(SalesTable,EndDisc) ).enabled(editDisc);
# salesTable_ds.object(fieldnum(SalesTable,DiscPercent) ).enabled(editDisc);
# salesTable_ds.object(fieldnum(SalesTable,LineDisc) ).enabled(editDisc);
# salesTable_ds.object(fieldnum(SalesTable,MarkupGroup) ).enabled(editDisc);
# salesLine_ds.object (fieldnum(SalesLine, LinePercent) ).enabled(editDisc);
# salesLine_ds.object (fieldnum(SalesLine, LineDisc) ).enabled(editDisc);
# salesLine_ds.object (fieldnum(SalesLine, MultiLnDisc) ).enabled(editDisc);
# salesLine_ds.object (fieldnum(SalesLine, MultiLnPercent)).enabled(editDisc);
#
# salesTableForm.interCompanySetHeaderAccess(interCompanyAllowIndirectCreationOrig,groupIntercompanyPurchTable);
#
# salesTable_Reference_ds.executeQuery();
#
# buttonHeaderInterCompany.enabled(salesTableForm.interCompanyShowButtonHeader());
#
# eInvoice. visible(CustTable::isCustDKPublic(salesTable.InvoiceAccount));
# eInvoiceLine.visible(CustTable::isCustDKPublic(salesTable.InvoiceAccount));
#
# this.showDimAccount();
#
# headerInquiry_CostControlCommittedCost.enabled(salesTable.ProjId ? true : false);
#
# allowSetFocusOnItemId = false;
#
# element.enableCreditCardMenuItems();
#
# //CarlosGranados
# if (SalesTable.SalesStatus == SalesStatus::Delivered)
# CGranMenuButton.enabled(true);
# else
# CGranMenuButton.enabled(false);
# //END CarlosGranados
#
#
# return ret;
#}
#
ENDSOURCE
SOURCE #editHeader
#void editHeader()
#{
# this.editSales();
#}
ENDSOURCE
SOURCE #editSales
#void editSales()
#{;
# element.editSales(salesTableForm.editHeaderAllowed(), salesTableForm.deleteHeaderAllowed());
#}
ENDSOURCE
SOURCE #reReadLines
#void reReadLines()
#{
# salesLine_ds.executeQuery();
#}
ENDSOURCE
SOURCE #lastConfirm
#//BP Deviation Documented
#display ConfirmId lastConfirm()
#{
# return lastConfirm;
#}
ENDSOURCE
SOURCE #lastConfirmDate
#//BP Deviation Documented
#display TransDate lastConfirmDate()
#{
# return lastConfirmDate;
#}
ENDSOURCE
SOURCE #lastInvoice
#//BP Deviation Documented
#display InvoiceId lastInvoice()
#{
# return lastInvoice;
#}
ENDSOURCE
SOURCE #lastInvoiceDate
#//BP Deviation Documented
#display TransDate lastInvoiceDate()
#{
# return lastInvoiceDate;
#}
ENDSOURCE
SOURCE #lastPackingSlip
#//BP Deviation Documented
#display PackingSlipId lastPackingSlip()
#{
# return lastPackingSlip;
#}
ENDSOURCE
SOURCE #lastPackingSlipDate
#//BP Deviation Documented
#display TransDate lastPackingSlipDate()
#{
# return lastPackingSlipDate;
#}
ENDSOURCE
SOURCE #lastPickingList
#//BP Deviation Documented
#display PickingListId lastPickingList()
#{
# return lastPickingList;
#}
ENDSOURCE
SOURCE #lastPickingListDate
#//BP Deviation Documented
#display TransDate lastPickingListDate()
#{
# return lastPickingListDate;
#}
ENDSOURCE
SOURCE #lastQuotation
#//BP Deviation Documented
#display QuotationId lastQuotation()
#{
# return lastQuotation;
#}
ENDSOURCE
SOURCE #lastQuotationDate
#//BP Deviation Documented
#display TransDate lastQuotationDate()
#{
# return lastQuotationDate;
#}
ENDSOURCE
SOURCE #leave
#public boolean leave()
#{
# boolean ret;
# ;
#
# ret = super();
#
# salesTableForm.interCompanyAutoCreateOrders();
#
# // PBA begin
# if (!salesLine.PBAItemLine::checkMandatory() )
# {
# return false;
# }
# // PBA end
#
# return ret;
#}
ENDSOURCE
SOURCE #showDimAccount
#void showDimAccount()
#{
# if (salesTable.eInvoiceLineSpec == NoYes::No)
# {
# eInvoice_EInvoiceLineSpec.enabled(true);
# eInvoice_EInvoiceAccountCode.enabled(true);
# eInvoiceLine_EInvoiceAccountCode.enabled(false);
# }
# else
# {
# eInvoice_EInvoiceAccountCode.enabled(false);
# eInvoiceLine_EInvoiceAccountCode.enabled(true);
# }
#}
#
#
ENDSOURCE
SOURCE #checkCreditLimit
#void checkCreditLimit()
#{
# TypeOfCreditmaxCheck typeOfCreditmaxCheck = CustParameters::find().CreditMaxCheck;
# SalesUpdate qtySpec = (typeOfCreditmaxCheck == TypeOfCreditmaxCheck::BalanceDelivered ? SalesUpdate::PackingSlip :
# typeOfCreditmaxCheck == TypeOfCreditmaxCheck::BalanceAll ? SalesUpdate::All : 0);
# SalesTotals salesTotals = SalesTotals::construct(salesTable, qtySpec);
# ;
# salesTable.checkCreditLimit(salesTotals);
#}
#
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #SalesLine
Table #SalesLine
Index #SalesLineIdx
CounterField #LineNum
JoinSource #SalesTable
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD ItemId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{
# Args args;
# FormRun formRun;
#
# ;
# // PBa
# if (PBAParameters::find().LookupMethod == PBALookupMethod::Configurable)
# {
# args = new Args(formstr(PBAItemIdLookup));
# args.caller(element);
# args.record(salesLine);
# formRun = classfactory.formRunClass(args);
# formRun.init();
# this.performFormLookup(formRun, _formControl);
# }
# else
# super(_formControl, _filterStr);
#
#}
ENDSOURCE
SOURCE #Modified
#void modified()
#{
# ItemId itemId;
# ;
#
# super();
#
# itemId = salesLine.ItemId;
#
# salesTableForm.resetSalesLine(salesLine);
#
# salesLine.ItemId = itemId;
#
# salesLine_ds.itemIdModified();
#
# salesLine.setDeliveryDateControlType(InventDim::findOrCreate(inventDim).InventDimId);
# SalesLine::modifySalesQty(salesLine,inventDim);
#
# // PBA begin
# element.pbAsetEnabled();
# // PBA end
#
# element.updateRFIDTagging();
#}
#
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD SalesQty
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# ;
# if (salesLine.SalesQty > 0 && salesLine.type().mustSalesQtyBeNegative())
# error("@SYS98119");
#
# salesLine.InventDimId = InventDim::findOrCreate(inventDim).InventDimId;
#
# salesLine.modifyWMSLocation(inventDim, fieldnum(InventDim,InventLocationId), InventTable::find(salesLine.ItemId).DimGroupId);
# super();
#
# element.checkCreditNoteLine();
#
# interCompanyIsPriceDiscSearchNeeded = salesLine.RecId;
#
# salesLine_ds.refresh();
#
# // PBA begin
# if (PBATableInstance::existsPost(salesLine.InventTransId))
# {
# if (salesLine.orig().SalesPrice &&
# salesLine.orig().SalesPrice != salesLine.SalesPrice)
# {
# if (PBAParameters::find().PriceCalc == NoYes::Yes)
# {
# //salesLine.SalesPrice = salesLine.orig().SalesPrice;
# salesLine.calcLineAmount();
# }
# else
# {
# if (Box::yesNo("@SYS97951", DialogButton::Yes, "@SYS97952") == DialogButton::Yes)
# {
# element.pbaConfigureLine();
# return;
# }
# }
# }
# if (salesLine.orig().SalesQty != salesLine.SalesQty)
# {
# if (Box::yesNo("@SYS97953", DialogButton::Yes, "@SYS97952") == DialogButton::Yes)
# {
# element.pbaConfigureLine();
# }
# else
# {
# //clean up BOM, Route and PBA id fields
# salesLine.ItemBOMId = '';
# salesLine.ItemRouteId = '';
# salesLine.ItemPBAId = '';
# }
# }
# }
# // PBA end
#}
#
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD SalesUnit
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{;
# salesLine.InventDimId = InventDim::findOrCreate(inventDim).InventDimId;
#
# super();
#
# salesLine.setPriceDisc(inventDim);
# interCompanyIsPriceDiscSearchNeeded = salesLine.RecId;
# salesLine.calcPackingUnitQty(inventDim);
# salesLine_ds.refresh();
#}
#
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD SalesPrice
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#public void modified()
#{
# super();
#
# salesLine_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD LineAmount
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# salesLine_ds.active();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD PriceUnit
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# salesLine_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InventTransIdReturn
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{;
# InventTrans::lookupTransIdReturn(_formControl, salesLine.ItemId, inventDim);
#}
ENDSOURCE
SOURCE #modified
#public void modified()
#{
# super();
#
# element.checkCreditNoteLine();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ProjId
PROPERTIES
AllowEdit #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD LedgerAccount
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{;
# LedgerTable::lookupAccountNum(_formControl, LedgerPostingType::InventReceipt);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD CustAccount
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{;
# SalesTable::lookupDeliveryAccount(_formControl, salesLine.invoiceAccount());
#}
ENDSOURCE
SOURCE #modified
#public void modified()
#{
# super();
# salesLine_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ItemBOMId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{;
# InventTable::lookupBOMId(_formControl, salesLine.ItemId, inventDim);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ItemRouteId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{;
# InventTable::lookupRouteId(_formControl, salesLine.ItemId, inventDim);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD DeliveryZipCode
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#public void jumpRef()
#{
# ;
#
# super();
#// ZipCode::formJumpRef(salesTable);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ItemTagging
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# element.updateRFIDTagging();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD CaseTagging
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# element.updateRFIDTagging();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ItemPBAId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{
# //PBA begin
# ;
# PBAVersion::lookupPBAId(_formControl, salesLine.ItemId);
# //PBA end
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ActivityNumber
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{
#;
# HierarchyTreeTable::lookupHierarchyTree(_formControl, ProjTable::find(salesLine.ProjId));
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ProjTransId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#public void jumpRef()
#{
# ;
# ProjItemTrans::jumpRefTransId(salesLine, element);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ExpectedRetQty
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{;
# salesLine.InventDimId = InventDim::findOrCreate(inventDim).InventDimId;
# super();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #inventDim
#InventDim inventDim()
#{
# return inventDim;
#}
ENDSOURCE
SOURCE #itemIdModified
#void itemIdModified()
#{
# ;
# salesLine.itemIdChanged();
# inventDim.data(InventDim::find(salesLine.InventDimId));
# salesLine.modifyItemDim(inventDim, fieldnum(InventDim,InventLocationId), InventTable::find(salesLine.ItemId).DimGroupId);
#
# InventMovement::bufferSetTransQtyUnit(salesLine);
#
# element.updateDesign(InventDimFormDesignUpdate::FieldChange);
#}
ENDSOURCE
SOURCE #setTouched
#void setTouched()
#{
# // required by form MarkupTrans to communicate changes to the caller
# ;
# salesTableForm.setTouched(salesTable);
#}
ENDSOURCE
SOURCE #initValue
#void initValue()
#{;
# salesLine.initFromSalesTable(salesTable);
# super();
#}
ENDSOURCE
SOURCE #init
#public void init()
#{
# super();
#
# salesLine_ds.cacheAddMethod(tablemethodstr(SalesLine, invoicedInTotal));
# salesLine_ds.cacheAddMethod(tablemethodstr(SalesLine, deliveredInTotal));
# salesLine_ds.cacheAddMethod(tablemethodstr(SalesLine, reservedPhysicalInSalesUnit));
# salesLine_ds.cacheAddMethod(tablemethodstr(SalesLine, reservedOnOrderInSalesUnit));
# salesLine_ds.cacheAddMethod(tablemethodstr(SalesLine, onOrderInSalesUnit));
# salesLine_ds.cacheAddMethod(tablemethodstr(SalesLine, qualityOrderStatusDisplay));
#}
ENDSOURCE
SOURCE #salesTable_ds
#FormDataSource salesTable_ds()
#{
# return salesTable_ds;
#}
ENDSOURCE
SOURCE #WRITE
#void write()
#{
# SalesLine _salesLine;
# SalesLine salesLineFind;
# ;
#
# if (!salesTable.checkCreditCard())
# {
# salesTable_ds.setTouched();
# }
#
# // PBA begin
# autoConfig = salesLine.PBAItemLine::doConfigureOnWrite();
# // PBA end
#
# if (!askingModifyInvoiced)
# {
# salesLine.InventDimId = InventDim::findOrCreate(inventDim).InventDimId;
# salesTableForm.salesLine_Write(salesLine);
#
# super();
#
# if (salesLine.InventDimId != inventDim.InventDimId)
# {
# inventDim.data(InventDim::find(salesLine.InventDimId));
# inventDim_ds.setCurrent();
# }
#
# salesLine_ds.reread();
#
# if (PurchTable::find(salesLine.InventRefId).InterCompanyOrder
# || salesTable.InterCompanyOrder)
# {
# _salesLine.data(salesLine.data());
# salesLine_ds.executeQuery();
# salesLine_ds.findRecord(_salesLine);
# interCompanyPurchSalesReference_ds.executeQuery();
# }
# salesTable_ds.reread();
# salesTable_ds.refresh();
# //lines have changed so salesTable.estimated migth need to be re-calculated
# salesTable_ds.setTouched();
# }
# // PBA begin
# if ( autoConfig )
# {
# // start the configuration process
# salesLine.PBAItemLine::autoConfig();
#
# // finds the current selected sales line
# salesLineFind = SalesLine::find(salesLine.SalesId, salesLine.LineNum);
#
# // syncs sales table with db
# salesLine_ds.research();
#
# // updates table ui
# salesLine_DS.reread();
#
# // finds the current selected sales line
# salesLine_ds.findRecord(salesLineFind);
# }
# // PBA end
#
# interCompanyIsPriceDiscSearchNeeded = 0;
#
# if(salesTable.CashDiscPercent && salesLine.SalesQty < 0)
# {
# if(salesLine.creditNoteLine())
# {
# info("@SYS99047");
# }
# }
#}
#
ENDSOURCE
SOURCE #LinkActive
#void linkActive()
#{
# super();
#
# /* Set caption */
# if (!salesLine)
# {
# element.setCaptionText();
# salesLine_ds.create();
# }
#}
ENDSOURCE
SOURCE #Delete
#void delete()
#{
# SalesId salesId;
# boolean interCompanySalesLineExist;
# ;
# if (salesLine.checkDelete())
# {
# salesId = salesLine.SalesId;
# interCompanySalesLineExist = salesLine.interCompanySalesLineExist();
#
# //For PBA mandaroty configuration item deleting
# deleting = true;
# super();
# deleting = false;
#
# if (SalesTable::exist(salesId))
# {
# if (SalesParameters::find().DeleteHeading == NoYes::Yes && SalesTable::find(salesId).SalesStatus == SalesStatus::Invoiced)
# {
# salesTable.delete();
# salesTable_ds.research();
# }
# else
# {
# salesTable_ds.reread();
# salesTable_ds.refresh();
#
# if (interCompanySalesLineExist)
# {
# interCompanyPurchSalesReference_ds.research();
# }
# }
# }
# else
# {
# salesTable_ds.research();
# }
#
# salesTableForm.setTouched(salesTable);
# }
#}
ENDSOURCE
SOURCE #Create
#void create(boolean append = true)
#{
# ;
# element.setEditItemAllowed(true);
#
# // PBA begin
# if(!salesLine.PBAItemLine::checkMandatory())
# {
# return;
# }
# // PBA end
#
# if (salesTable.checkUpdate())
# super(append);
#
# if (salesLine.ItemId) // filter exist on itemId
# this.itemIdModified();
#
# salesLine_ds.refresh();
#
# //Won't create new salesline if current one was not created correctly
# if (!salesLine.ItemId)
# {
# salesTableForm.salesLine_Create(salesLine);
# }
#
# if (allowSetFocusOnItemId)
# salesLine_ItemId.setFocus();
#
#}
#
ENDSOURCE
SOURCE #Active
#int active()
#{
# int ret;
# boolean returnItem = salesTable.returnItem();
# ;
# ret = super();
#
# buttonLineSetup. enabled(true);
# buttonHeaderFunction. enabled(!returnItem);
# buttonHeaderTradeAgreements. enabled(!returnItem);
# buttonLineFunction. enabled(!returnItem && salesTable.RecId);
# buttonLineInquiry. enabled(!returnItem);
# buttonLinePriceCalc. enabled(!returnItem);
# configuration. enabled(!returnItem);
# buttonLineExplosion. enabled(true);
# bomConsistOfTree. enabled(true);
# buttonLineProduction. enabled(true);
# buttonAttachedSalesLines. enabled(salesTable.type().canHaveAttachedOrders());
# inventTransPick. enabled(true);
# wmsOrderAllowCreate. enabled(true);
#
# salesLine_ds.object(fieldnum(SalesLine, SalesUnit)).allowEdit(salesLine.SalesQty == salesLine.RemainSalesPhysical);
# salesLine_ds.object(fieldnum(SalesLine, SalesDeliverNow)).allowEdit(salesLine.DeliveryType != TradeLineDlvType::DropShip);
#
# element.setCaptionText();
#
# if (salesLine.RecId)
# {
# element.setEditItemAllowed(false);
# }
# else
# {
# element.setEditItemAllowed(true);
# }
#
# salesLine_ds.allowCreate(element.createLineAllowed());
# salesLine_ds.allowEdit (salesTableForm.editLineAllowed());
# salesLine_ds.allowDelete(salesTableForm.deleteLineAllowed(salesLine));
#
# element.checkCreditNoteLine();
#
# element.updateDesign(InventDimFormDesignUpdate::Active);
# element.updateRFIDTagging();
#
# if (headerError)
# {
# salesTable.Touched = NoYes::Yes;
# headerError = false;
# }
#
# // PBA begin
# element.pbAsetEnabled();
# // PBA end
#
# buttonLineInterCompany.enabled(salesTableForm.interCompanyShowButtonLine());
# salesTableForm.interCompanySetLineAccess(salesLine,address,lineAddress);
#
# if (salesLine.ProjId)
# {
# lineInquiry_CostControlCommittedCost.enabled(true);
# }
# else
# {
# lineInquiry_CostControlCommittedCost.enabled(false);
# }
#
# allowSetFocusOnItemId = true;
#
# return ret;
#}
#
ENDSOURCE
SOURCE #validateWrite
#public boolean validateWrite()
#{
# boolean ret;
# ;
#
# salesTableForm.setTouched(salesTable);
# salesLine.InventDimId = InventDim::findOrCreate(inventDim).InventDimId;
#
# if (salesLine.RecId != 0
# && salesLine.InterCompanyInventTransId
# && salesTable.InterCompanyOrder)
# {
# salesLine.DeliveryDateControlType = SalesDeliveryDateControlType::None;
# }
#
# ret = super();
#
# if (!askingModifyInvoiced && ret)
# {
# askingModifyInvoiced = true;
# ret = salesTable.checkUpdate();
# if (!ret)
# {
# salesLine_ds.reread();
# salesTable_ds.reread();
# }
# askingModifyInvoiced = false;
# }
#
# if (ret)
# {
# ret = salesTableForm.salesLine_validateWrite(salesLine, inventDim);
# }
#
# if (ret && salesLine.DeliveryDateControlType)
# {
# ret = SalesCalcAvailableDlvDates::validateWritePrompt(salesLine,false,true,true,false);
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #leave
#public boolean leave()
#{
# boolean ret;
# ;
# ret = super();
#
# // PBA begin
# if (!deleting)
# {
# if( ! salesLine.PBAItemLine::checkMandatory() )
# {
# return false;
# }
# }
# // PBA end
#
# return ret;
#}
ENDSOURCE
SOURCE #checkCreditLimit
#void checkCreditLimit()
#{
# ;
# salesLine.checkCreditLimit();
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #InventDim
Table #InventDim
JoinSource #SalesLine
LinkType #InnerJoin
DelayActive #No
InsertAtEnd #No
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD inventBatchId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# salesLine.modifyItemDim(inventDim,fieldnum(InventDim,InventBatchId),InventTable::find(salesLine.ItemId).DimGroupId);
#
# if (salesLine.DeliveryDateControlType)
# SalesCalcAvailableDlvDates::modifiedField(salesLine,0,false,false,inventDim);
#}
ENDSOURCE
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = salesLine.validateModifyItemDim(inventDim,fieldnum(InventDim,InventBatchId),InventTable::find(salesLine.ItemId).DimGroupId);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD wMSLocationId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# salesLine.modifyItemDim(inventDim,fieldnum(InventDim,wmsLocationId),InventTable::find(salesLine.ItemId).DimGroupId);
#
# if (salesLine.DeliveryDateControlType)
# SalesCalcAvailableDlvDates::modifiedField(salesLine,0,false,false,inventDim);
#}
ENDSOURCE
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = salesLine.validateModifyItemDim(inventDim,fieldnum(InventDim,wmsLocationId),InventTable::find(salesLine.ItemId).DimGroupId);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD wMSPalletId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# salesLine.modifyItemDim(inventDim,fieldnum(InventDim,wmsPalletId),InventTable::find(salesLine.ItemId).DimGroupId);
#
# if (salesLine.DeliveryDateControlType)
# SalesCalcAvailableDlvDates::modifiedField(salesLine,0,false,false,inventDim);
#}
ENDSOURCE
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = salesLine.validateModifyItemDim(inventDim,fieldnum(InventDim,wmsPalletId),InventTable::find(salesLine.ItemId).DimGroupId);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD inventSerialId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# salesLine.modifyItemDim(inventDim,fieldnum(InventDim,InventSerialId),InventTable::find(salesLine.ItemId).DimGroupId);
#
# if (salesLine.DeliveryDateControlType)
# SalesCalcAvailableDlvDates::modifiedField(salesLine,0,false,false,inventDim);
#}
ENDSOURCE
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = salesLine.validateModifyItemDim(inventDim,fieldnum(InventDim,InventSerialId),InventTable::find(salesLine.ItemId).DimGroupId);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InventLocationId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{;
# super();
#
# salesLine.modifyItemDim(inventDim,fieldnum(InventDim,InventLocationId),InventTable::find(salesLine.ItemId).DimGroupId);
#
# if (!salesLine.RecId && salesLine.DeliveryDateControlType != SalesDeliveryDateControlType::None)
# {
# SalesCalcAvailableDlvDates::modifiedField(salesLine,0,false,false,inventDim);
# salesLine.ConfirmedDlv = salesLine.ShippingDateConfirmed ? salesLine.ShippingDateConfirmed : salesLine.ShippingDateRequested;
# }
#
# if(salesLine_ds && salesLine)
# salesLine_ds.refresh();
#}
ENDSOURCE
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = salesLine.validateModifyItemDim(inventDim,fieldnum(InventDim,InventLocationId),InventTable::find(salesLine.ItemId).DimGroupId);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD configId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# salesLine.modifyItemDim(inventDim,fieldnum(InventDim,ConfigId),InventTable::find(salesLine.ItemId).DimGroupId);
#
# if (salesLine.DeliveryDateControlType)
# SalesCalcAvailableDlvDates::modifiedField(salesLine,0,false,false,inventDim);
#}
ENDSOURCE
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{
# ;
# if(!ConfigTable::configure(_formControl,
# salesLine.ItemId,
# InventDim::findOrCreate(inventDim).InventDimId,
# salesLine.deliveryDate(),
# salesLine.ItemBOMId,
# salesLine.QtyOrdered))
# {
# super(_formControl,_filterStr);
# }
#}
#
ENDSOURCE
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = salesLine.validateModifyItemDim(inventDim,fieldnum(InventDim,ConfigId),InventTable::find(salesLine.ItemId).DimGroupId);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InventSizeId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# salesLine.modifyItemDim(inventDim,fieldnum(InventDim,InventSizeId),InventTable::find(salesLine.ItemId).DimGroupId);
#
# if (salesLine.DeliveryDateControlType)
# SalesCalcAvailableDlvDates::modifiedField(salesLine,0,false,false,inventDim);
#}
ENDSOURCE
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = salesLine.validateModifyItemDim(inventDim,fieldnum(InventDim,InventSizeId),InventTable::find(salesLine.ItemId).DimGroupId);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InventColorId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# salesLine.modifyItemDim(inventDim,fieldnum(InventDim,InventColorId),InventTable::find(salesLine.ItemId).DimGroupId);
#
# if (salesLine.DeliveryDateControlType)
# SalesCalcAvailableDlvDates::modifiedField(salesLine,0,false,false,inventDim);
#}
ENDSOURCE
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = salesLine.validateModifyItemDim(inventDim,fieldnum(InventDim,InventColorId),InventTable::find(salesLine.ItemId).DimGroupId);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InventSiteId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# salesLine.modifyItemDim(inventDim,fieldnum(InventDim,InventSiteId),InventTable::find(salesLine.ItemId).DimGroupId);
#
# if (!salesLine.RecId)
# {
# if (salesLine.DeliveryDateControlType != SalesDeliveryDateControlType::None)
# {
# SalesCalcAvailableDlvDates::modifiedField(salesLine,0,false,false,inventDim);
# salesLine.ConfirmedDlv = salesLine.ShippingDateConfirmed ? salesLine.ShippingDateConfirmed : salesLine.ShippingDateRequested;
# }
# }
#
# if(salesLine_ds && salesLine)
# salesLine_ds.refresh();
#}
ENDSOURCE
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = salesLine.validateModifyItemDim(inventDim,fieldnum(InventDim,InventSiteId),InventTable::find(salesLine.ItemId).DimGroupId);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #write
#public void write()
#{
#// super();
#}
ENDSOURCE
SOURCE #initValue
#void initValue()
#{;
# inventDim.data(InventDim::find(salesLine.InventDimId));
#
# super();
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #InterCompanyPurchSalesReference
Table #InterCompanyPurchSalesReference
AllowCheck #No
AllowEdit #No
AllowCreate #No
AllowDelete #No
JoinSource #SalesTable
ENDPROPERTIES
FIELDLIST
ENDFIELDLIST
ENDOBJECTPOOL
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #PurchTable_Reference
Table #PurchTable
AllowCheck #No
AllowEdit #No
AllowCreate #No
AllowDelete #No
JoinSource #InterCompanyPurchSalesReference
LinkType #InnerJoin
ENDPROPERTIES
FIELDLIST
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #interCompanySalesType
#//BP Deviation Documented
#display InterCompanySalesType interCompanySalesType(PurchTable _purchTable)
#{
# InterCompanySalesType salesType;
# SalesStatus salesStatus;
# DocumentStatus documentStatus;
# date documentDate;
# Num documentNum;
# ;
# [salesType,salesStatus,documentStatus,documentDate,documentNum] = salesTableForm.interCompanySalesCache(_purchTable);
# return salesType;
#}
#
ENDSOURCE
SOURCE #interCompanySalesStatus
#//BP Deviation Documented
#display SalesStatus interCompanySalesStatus(PurchTable _purchTable)
#{
# InterCompanySalesType salesType;
# SalesStatus salesStatus;
# DocumentStatus documentStatus;
# date documentDate;
# Num documentNum;
# ;
# [salesType,salesStatus,documentStatus,documentDate,documentNum] = salesTableForm.interCompanySalesCache(_purchTable);
# return salesStatus;
#}
#
ENDSOURCE
SOURCE #interCompanyDocumentStatus
#//BP Deviation Documented
#display DocumentStatus interCompanyDocumentStatus(PurchTable _purchTable)
#{
# InterCompanySalesType salesType;
# SalesStatus salesStatus;
# DocumentStatus documentStatus;
# date documentDate;
# Num documentNum;
# ;
# [salesType,salesStatus,documentStatus,documentDate,documentNum] = salesTableForm.interCompanySalesCache(_purchTable);
# return documentStatus;
#}
#
ENDSOURCE
SOURCE #interCompanyDocumentNum
#//BP Deviation Documented
#display DocumentNum interCompanyDocumentNum(PurchTable _purchTable)
#{
# InterCompanySalesType salesType;
# SalesStatus salesStatus;
# DocumentStatus documentStatus;
# date documentDate;
# Num documentNum;
# ;
# [salesType,salesStatus,documentStatus,documentDate,documentNum] = salesTableForm.interCompanySalesCache(_purchTable);
# return documentNum;
#}
#
ENDSOURCE
SOURCE #interCompanyDocumentDate
#//BP Deviation Documented
#display DocumentDate interCompanyDocumentDate(PurchTable _purchTable)
#{
# InterCompanySalesType salesType;
# SalesStatus salesStatus;
# DocumentStatus documentStatus;
# date documentDate;
# Num documentNum;
# ;
# [salesType,salesStatus,documentStatus,documentDate,documentNum] = salesTableForm.interCompanySalesCache(_purchTable);
# return documentDate;
#}
#
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #SalesTable_Reference
Table #SalesTable
AllowCheck #No
AllowEdit #No
AllowCreate #No
AllowDelete #No
ENDPROPERTIES
FIELDLIST
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #init
#public void init()
#{
# super();
#
# this.query().dataSourceTable(tablenum(SalesTable)).clearLinks();
# this.query().dataSourceTable(tablenum(SalesTable)).clearDynalinks();
# this.query().dataSourceTable(tablenum(SalesTable)).clearRanges();
# this.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable,SalesId));
#}
ENDSOURCE
SOURCE #executeQuery
#public void executeQuery()
#{
# if (salesTable.InterCompanyPurchId)
# {
# this.query().dataSourceTable(tablenum(SalesTable)).findRange(fieldnum(SalesTable,SalesId)).value(salesTable.SalesId);
# super();
# }
# else
# {
# salesTable_Reference.clear();
# }
#}
ENDSOURCE
SOURCE #interCompanyPurchStatus
#//BP Deviation Documented
#display PurchStatus interCompanyPurchStatus()
#{
# PurchStatus purchStatus;
# InterCompanySalesType salesType;
# SalesStatus salesStatus;
# ;
# [purchStatus,salesType,salesStatus] = salesTableForm.interCompanyOriginalSalesCache(salesTable_Reference);
# return purchStatus;
#}
#
ENDSOURCE
SOURCE #interCompanyOriginalSalesType
#//BP Deviation Documented
#display InterCompanySalesType interCompanyOriginalSalesType()
#{
# PurchStatus purchStatus;
# InterCompanySalesType salesType;
# SalesStatus salesStatus;
# ;
# [purchStatus,salesType,salesStatus] = salesTableForm.interCompanyOriginalSalesCache(salesTable_Reference);
# return salesType;
#}
#
ENDSOURCE
SOURCE #interCompanyOriginalSalesStatus
#//BP Deviation Documented
#display SalesStatus interCompanyOriginalSalesStatus()
#{
# PurchStatus purchStatus;
# InterCompanySalesType salesType;
# SalesStatus salesStatus;
# ;
# [purchStatus,salesType,salesStatus] = salesTableForm.interCompanyOriginalSalesCache(salesTable_Reference);
# return salesStatus;
#}
#
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #ShipCarrierAddress
Table #Address
Index #TypeIdx
AllowCreate #No
JoinSource #SalesTable
ENDPROPERTIES
FIELDLIST
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #next
#// Sales order will never have more than one record of third party shipping address
#public int next()
#{
# ;
#
# return true;
#}
#
ENDSOURCE
SOURCE #write
#public void write()
#{
# ;
#
# super();
#
# salesTable_ds.reread();
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #ShipCarrierAddressInLine
Table #Address
Index #TypeIdx
AllowCreate #No
JoinSource #SalesLine
ENDPROPERTIES
FIELDLIST
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #write
#public void write()
#{
# ;
#
# super();
#
# salesLine_ds.reread();
#}
ENDSOURCE
SOURCE #next
#// Per sales order will never have more than one record of third party shipping address
#public int next()
#{
# ;
#
# return true;
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
ENDOBJECTBANK
JOINS
SalesLine SalesTable
InventDim SalesLine
InterCompanyPurchSalesReference SalesTable
PurchTable_Reference InterCompanyPurchSalesReference
ShipCarrierAddress SalesTable
ShipCarrierAddressInLine SalesLine
ENDJOINS
DESIGN
PROPERTIES
Caption #@SYS25193
SaveSize #Yes
HTMLHelpFile #HTMLHelpFileIWorker
HTMLHelpTopic #AxShared.chm::/html/69F3A3E6-9BE6-46E2-ACEB-A05E3BCC8F47.htm
DataSource #SalesTable
ArrangeWhen #Auto
HideIfEmpty #No
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Table
AutoDeclaration #Yes
Width #Column width
Height #300
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/DC87F0AD-43DD-4F36-955E-E6FF82C5C8F8.htm
FrameType #None
DataSource #SalesTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL TAB
PROPERTIES
Name #TabHeader
AutoDeclaration #Yes
Width #Column width
Height #Column height
Tabs #10
DataSource #SalesTable
ENDPROPERTIES
CONTAINER
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderOverview
AutoDeclaration #Yes
Caption #@SYS9039
DataSource #SalesTable
ENDPROPERTIES
CONTAINER
CONTROL GRID
PROPERTIES
Name #GridHeader
Width #Column width
Height #Column height
VisibleCols #7
VisibleRows #9
DataSource #SalesTable
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_SalesIdAdvanced
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/20acb92c-851a-4c47-acc2-b742e33b10e1.htm
DataSource #SalesTable
DataField #SalesId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_CustAccountAdv
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/996ce646-1849-4a1b-8ef5-23e87aa5b44d.htm
DataSource #SalesTable
DataField #CustAccount
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_CustAccountName
AutoDeclaration #Yes
AllowEdit #No
Label #Nombre
DataSource #SalesTable
DataMethod #CGranNameCust
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_InvoiceAccountAdv
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/d9c3be94-9c71-4067-ad43-7a725c2ed6d6.htm
DataSource #SalesTable
DataField #InvoiceAccount
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_InvoiceAccountName
AutoDeclaration #Yes
AllowEdit #No
Label #Nombre
DataSource #SalesTable
DataMethod #CGranNameCust
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #SalesTable_SalesType
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/5219F2D1-95B5-40CA-A623-7C070790E8CA.htm
DataSource #SalesTable
DataField #SalesType
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public boolean modified()
#{
# boolean ret;
#
# ret = super();
# element.changeType();
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #SalesTable_SalesStatusGrid
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/52dbd3ce-dabc-4aa7-9f2a-7ac3ffd6f3d0.htm
DataSource #SalesTable
DataField #SalesStatus
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_CurrencyCodeGrid
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/f6bd3bb6-63ac-4d25-a8f3-b57bccb5402c.htm
DataSource #SalesTable
DataField #CurrencyCode
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_ProjId
Visible #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/cf69dd3f-b40b-4dda-8947-b4ef3d21f131.htm
ConfigurationKey #ProjBasic
DataSource #SalesTable
DataField #ProjId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesIdBlanket
Visible #No
AllowEdit #No
HelpText #@SYS101269
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/BB00BEF4-7BEE-40DC-91AE-68BAA531AC41.htm
DataSource #SalesTable
DataMethod #SalesIdBlanket
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#void jumpRef()
#{
# SalesIdBlanket salesIdBlanket = salesTable.salesIdBlanket();
#
# if (salesIdBlanket)
# SalesTable::jumpRefSalesIdBlanket(salesIdBlanket);
# else
# super();
#}
#
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_PurchOrderFormNum
Visible #No
DataSource #SalesTable
DataField #PurchOrderFormNum
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #qualityOrderStatusDisplayTable
AutoDeclaration #Yes
Visible #No
AllowEdit #No
DataSource #SalesTable
DataMethod #qualityOrderStatusDisplay
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderSimple
AutoDeclaration #Yes
Caption #@SYS4925
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #GroupHeader
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/9FB8D97A-C373-4227-B283-04390015CAD9.htm
FrameType #None
Caption #@SYS4925
DataSource #SalesTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_SalesIdSimple
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/20acb92c-851a-4c47-acc2-b742e33b10e1.htm
DataSource #SalesTable
DataField #SalesId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Salestable_CustAccountSim
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/996ce646-1849-4a1b-8ef5-23e87aa5b44d.htm
DataSource #SalesTable
DataField #CustAccount
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_InvoiceAccountSim
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/d9c3be94-9c71-4067-ad43-7a725c2ed6d6.htm
DataSource #SalesTable
DataField #InvoiceAccount
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #editContactPersonName
LookupButton #Always
DataSource #SalesTable
DataMethod #editContactPersonName
PresenceDataSource #SalesTable
PresenceDataField #ContactPersonId
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#void lookup()
#{;
# ContactPerson::lookupCustContactPerson(salesTable_ContactPersonIdSimple,
# salesTable.CustAccount,
# this,
# salesTable.ContactPersonId);
#}
#
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_ContactPersonIdSimple
AutoDeclaration #Yes
Visible #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/e8a9f5f5-8d64-49d7-ab26-2ce496ffc637.htm
DataSource #SalesTable
DataField #ContactPersonId
PresenceIndicatorAllowed #No
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_DeliveryName
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/59246cb6-ce2f-4f11-8d84-ec888c8b8cae.htm
DataSource #SalesTable
DataField #DeliveryName
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_DeliveryAddress
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/4fc61233-5215-4325-a6c5-072384ba41a6.htm
MultiLine #Yes
DataSource #SalesTable
DataField #DeliveryAddress
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_SalesTaker
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/3cf70249-929b-4708-a340-fc881b90d190.htm
DataSource #SalesTable
DataField #SalesTaker
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_SalesPoolId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/6eac880e-dba7-4dab-99a7-38d065063fa4.htm
DataSource #SalesTable
DataField #SalesPoolId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_CurrencyCode
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/f6bd3bb6-63ac-4d25-a8f3-b57bccb5402c.htm
DataSource #SalesTable
DataField #CurrencyCode
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_LanguageId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/22fa42ae-2603-4645-98e6-cf71c3c61aef.htm
DataSource #SalesTable
DataField #LanguageId
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #SalesTable_OneTimeCustomer
AllowEdit #No
Skip #Yes
DataSource #SalesTable
DataField #OneTimeCustomer
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #SalesTable_SalesStatus
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/52dbd3ce-dabc-4aa7-9f2a-7ac3ffd6f3d0.htm
DataSource #SalesTable
DataField #SalesStatus
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #SalesTable_DocumentStatus
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/b89ca086-87c7-4b72-bd71-584012afe0a3.htm
DataSource #SalesTable
DataField #DocumentStatus
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderGeneral
AutoDeclaration #Yes
Caption #@SYS2952
DataSource #SalesTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Baseinfo
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/A2EEFAB4-50AC-4B37-BB04-CB8808512FA2.htm
Caption #@SYS19627
DataSource #SalesTable
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_SalesName
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/10baaa07-d06c-4eaa-91cb-8ce198b9b04e.htm
DataSource #SalesTable
DataField #SalesName
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #editContactPersonName1
AutoDeclaration #Yes
LookupButton #Always
DataSource #SalesTable
DataMethod #editContactPersonName
PresenceDataSource #SalesTable
PresenceDataField #ContactPersonId
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#public void jumpRef()
#{
# salesTable_ContactPersonId.jumpRef();
#}
ENDSOURCE
SOURCE #lookup
#void lookup()
#{;
# ContactPerson::lookupCustContactPerson(salesTable_ContactPersonId,
# salesTable.CustAccount,
# editContactPersonName1,
# salesTable.ContactPersonId);
#}
#
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_ContactPersonId
AutoDeclaration #Yes
Visible #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/e8a9f5f5-8d64-49d7-ab26-2ce496ffc637.htm
DataSource #SalesTable
DataField #ContactPersonId
PresenceIndicatorAllowed #No
ENDPROPERTIES
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Customer
VerticalSpacing #5
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/089322D0-9FA0-433C-A79F-8AD41789A6F0.htm
FrameType #None
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #CustAccount
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/996ce646-1849-4a1b-8ef5-23e87aa5b44d.htm
DataSource #SalesTable
DataField #CustAccount
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #OneTimeCustomer
AllowEdit #No
Skip #Yes
DataSource #SalesTable
DataField #OneTimeCustomer
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #InvoiceAccount
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/d9c3be94-9c71-4067-ad43-7a725c2ed6d6.htm
DataSource #SalesTable
DataField #InvoiceAccount
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ContactInfo
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/FBD23665-1E47-4F18-B75D-7BBE2C30C9B8.htm
DataSource #SalesTable
DataGroup #ContactInfo
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Group
DataSource #SalesTable
DataGroup #Payment
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Group_Payment
DataSource #SalesTable
DataField #Payment
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #Group_FixedDueDate
DataSource #SalesTable
DataField #FixedDueDate
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Group_PaymMode
DataSource #SalesTable
DataField #PaymMode
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Group_PaymSpec
DataSource #SalesTable
DataField #PaymSpec
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Group_PaymentSched
DataSource #SalesTable
DataField #PaymentSched
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Group_CashDisc
DataSource #SalesTable
DataField #CashDisc
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #Group_CashDiscPercent
DataSource #SalesTable
DataField #CashDiscPercent
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Group_M_editCreditCard
DataSource #SalesTable
DataMethod #editCreditCard
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Campaign
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/3E40658E-4CA0-45FD-AC96-68725E7CB783.htm
DataSource #SalesTable
DataGroup #Campaign
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #status
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/9491EAF7-A25A-4FC1-BE75-882C77AD9994.htm
DataSource #SalesTable
DataGroup #Status
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #EInvoice
AutoDeclaration #Yes
DataSource #SalesTable
DataGroup #EInvoice
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #EInvoice_EInvoiceLineSpec
AutoDeclaration #Yes
DataSource #SalesTable
DataField #EInvoiceLineSpec
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #EInvoice_EInvoiceAccountCode
AutoDeclaration #Yes
DataSource #SalesTable
DataField #EInvoiceAccountCode
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderSetup
AutoDeclaration #Yes
Caption #@SYS2186
DataSource #SalesTable
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Administration
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/61B76BC4-6BEC-4ED8-911E-5597755551A4.htm
DataSource #SalesTable
DataGroup #Administration
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Inventory
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/9B667B2A-611F-4051-9B13-551C41E58551.htm
DataSource #SalesTable
DataGroup #Inventory
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Posting
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/6C393CD6-3F02-43A8-840F-E7EAA0506037.htm
DataSource #SalesTable
DataGroup #Posting
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SalesTax
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/0A177082-0E7E-4AD3-8C0C-240678F1E103.htm
DataSource #SalesTable
DataGroup #SalesTax
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #TaxGroup
DataSource #SalesTable
DataField #TaxGroup
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #VATNum
AutoDeclaration #Yes
DataSource #SalesTable
DataField #VATNum
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #inclTax
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/cc3080d7-f758-41b9-8859-9d2b7b45d9f2.htm
DataSource #SalesTable
DataField #InclTax
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTax_EnterpriseNumber
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/c9cf02c9-e413-4f51-824f-670c179697e4.htm
DataSource #SalesTable
DataField #EnterpriseNumber
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Reservation
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/7df9ed6c-db82-41cf-80dc-a4f22a39b898.htm
DataSource #SalesTable
DataGroup #Reservation
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Commission
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/44FF681B-8729-455B-B4E2-783328626793.htm
DataSource #SalesTable
DataGroup #Commission
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #GiroMoneyTransferSlip
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/D02B7A93-9619-425B-A234-E38362B5E999.htm
DataSource #SalesTable
DataGroup #GiroMoneyTransferSlip
ENDPROPERTIES
CONTAINER
CONTROL COMBOBOX
PROPERTIES
Name #GiroType
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/c8ac2628-bc3f-4416-a7db-42a2e3a67a22.htm
Label #@SYS12128
DataSource #SalesTable
DataField #GiroType
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #RFIDTaggingLevel
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/DD928F01-DE21-405F-901E-84EB774E1CA5.htm
DataSource #SalesTable
DataGroup #RFIDTagging
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #RFIDTaggingLevel_ItemTagging
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/596ddd6c-ec6f-47cc-96c0-836d4ca2cd03.htm
DataSource #SalesTable
DataField #ItemTagging
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #RFIDTaggingLevel_CaseTagging
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/9391c367-f6a3-4a50-8ba9-a0dd8b65c567.htm
DataSource #SalesTable
DataField #CaseTagging
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #RFIDTaggingLevel_PalletTagging
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/f72355a0-776b-4b09-9277-7641ff25da49.htm
DataSource #SalesTable
DataField #PalletTagging
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderAddress
AutoDeclaration #Yes
Caption #@SYS9362
DataSource #SalesTable
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #HeaderDeliveryAddress
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/4fc61233-5215-4325-a6c5-072384ba41a6.htm
DataSource #SalesTable
DataGroup #DeliveryAddress
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #HeaderAddressDisplay
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/B91E5794-9953-480C-BFCB-69A356F79A06.htm
DataSource #SalesTable
DataGroup #AddressDisplay
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ShipCarrierAddr
ConfigurationKey #ShipCarrier
Caption #@SYS116845
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #CarrierInfo
Visible #No
FrameType #None
DataSource #ShipCarrierAddress
DataGroup #ShipCarrierInfo
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Description
FrameType #None
DataSource #ShipCarrierAddress
DataGroup #Description
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Address1
FrameType #None
DataSource #ShipCarrierAddress
DataGroup #Address
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderDelivery
AutoDeclaration #Yes
Caption #@SYS4508
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Delivery
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/ECB4C9E0-DB91-4B99-9FF7-BD55B33037F3.htm
Caption #@SYS4508
DataSource #SalesTable
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesAvailableDlvDatesHeader
AutoDeclaration #Yes
SaveRecord #No
MenuItemType #Action
MenuItemName #SalesAvailableDlvDates
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #Delivery_ReceiptDateRequested
DataSource #SalesTable
DataField #ReceiptDateRequested
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #Delivery_ShippingDateRequested
DataSource #SalesTable
DataField #ShippingDateRequested
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #Delivery_ReceiptDateConfirmed
DataSource #SalesTable
DataField #ReceiptDateConfirmed
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #Delivery_ShippingDateConfirmed
DataSource #SalesTable
DataField #ShippingDateConfirmed
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #SalesTable_DeliveryDateControl
DataSource #SalesTable
DataField #DeliveryDateControlType
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #Delivery_ShipBlind
DataSource #SalesTable
DataField #ShipCarrierBlindShipment
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #MiscDelivery
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/ECB4C9E0-DB91-4B99-9FF7-BD55B33037F3.htm
Caption #@SYS102988
DataSource #SalesTable
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Delivery_DlvMode
DataSource #SalesTable
DataField #DlvMode
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Delivery_DlvTerm
DataSource #SalesTable
DataField #DlvTerm
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Delivery_DlvReason
DataSource #SalesTable
DataField #DlvReason
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Delivery_ExportReason
DataSource #SalesTable
DataField #ExportReason
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Transport
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/c07ad597-df2d-46e4-a2b4-002432addb24.htm
DataSource #SalesTable
DataGroup #Transport
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SalesTableTimeZoneDelivery
Caption #@SYS110097
ENDPROPERTIES
CONTAINER
CONTROL COMBOBOX
PROPERTIES
Name #Delivery_TimeZoneSite
AllowEdit #No
HelpText #@SYS110100
Label #@SYS102501
DataSource #SalesTable
DataMethod #timeZoneSite
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #CarrierInfo1
DataSource #SalesTable
DataGroup #CarrierInfo
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderPriceCalc
AutoDeclaration #Yes
Caption #@SYS19789
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Currency
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/740487BB-F6D3-40F6-A7D6-2C90E5C4BE65.htm
DataSource #SalesTable
DataGroup #CurrencyShow
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Payment
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/d06b8442-d32b-419d-b142-1054d9d724d5.htm
DataSource #SalesTable
DataGroup #Payment
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Payment_Payment
DataSource #SalesTable
DataField #Payment
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #Payment_FixedDueDate
DataSource #SalesTable
DataField #FixedDueDate
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Payment_PaymMode
DataSource #SalesTable
DataField #PaymMode
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Payment_PaymSpec
DataSource #SalesTable
DataField #PaymSpec
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Payment_PaymentSched
DataSource #SalesTable
DataField #PaymentSched
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Payment_CashDisc
DataSource #SalesTable
DataField #CashDisc
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #Payment_CashDiscPercent
DataSource #SalesTable
DataField #CashDiscPercent
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Payment_M_editCreditCard
ConfigurationKey #CreditCard
SecurityKey #CreditCardInquiry
DataSource #SalesTable
DataMethod #editCreditCard
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public boolean modified()
#{
# boolean ret;
#
# ret = super();
#
# element.enableCreditCardMenuItems();
#
# return ret;
#}
ENDSOURCE
SOURCE #lookup
#public void lookup()
#{
# ;
#
# if (salesTable.payment().CreditCardPaymentType == CreditCardPaymentType::CreditCard)
# {
# CreditCardCust::lookupCreditCard(this, salesTable.InvoiceAccount, salesTable.RecId);
# }
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #DiscMarkup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/0AB567D7-7756-40B9-9904-B30A67F9C571.htm
DataSource #SalesTable
DataGroup #DiscountMiscCharges
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderPostings
AutoDeclaration #Yes
AllowEdit #No
Caption #@SYS25782
DataSource #SalesTable
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
METHODS
Version: 3
SOURCE #pageActivated
#public void pageActivated()
#{
# ;
# salesTable_ds.lastJournals();
# super();
#
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Number
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/9654E5DE-D64F-4B64-9A98-C05AD5A586A0.htm
Caption #@SYS13864
DataSource #SalesTable
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #LastQuotation
AllowEdit #No
Skip #Yes
Label #@SYS98918
DataSource #SalesTable
DataMethod #LastQuotation
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #LastConfirm
AllowEdit #No
Skip #Yes
DataSource #SalesTable
DataMethod #LastConfirm
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #lastPickingList
AllowEdit #No
Skip #Yes
DataSource #SalesTable
DataMethod #lastPickingList
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #LastPackingSlip
AllowEdit #No
Skip #Yes
DataSource #SalesTable
DataMethod #lastPackingSlip
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #LastInvoice
AllowEdit #No
Skip #Yes
DataSource #SalesTable
DataMethod #lastInvoice
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Date
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/03DBD85C-BB21-4222-9832-4ED786FE5B51.htm
Caption #@SYS7402
DataSource #SalesTable
ENDPROPERTIES
CONTAINER
CONTROL DATEEDIT
PROPERTIES
Name #LastQuotationDate
AllowEdit #No
Skip #Yes
ShowLabel #No
DataSource #SalesTable
DataMethod #LastQuotationDate
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #LastConfirmDate
AllowEdit #No
Skip #Yes
ShowLabel #No
DataSource #SalesTable
DataMethod #LastConfirmDate
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #lastPickingListDate
AllowEdit #No
Skip #Yes
ShowLabel #No
DataSource #SalesTable
DataMethod #lastPickingListDate
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #LastPackingSlipDate
AllowEdit #No
Skip #Yes
ShowLabel #No
DataSource #SalesTable
DataMethod #LastPackingSlipDate
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #LastInvoiceDate
AllowEdit #No
Skip #Yes
ShowLabel #No
DataSource #SalesTable
DataMethod #LastInvoiceDate
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderOther
AutoDeclaration #Yes
Caption #@SYS1284
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #HeaderForeignTrade
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/D77A6540-B921-4E07-8BDF-C4E751E0D23C.htm
DataSource #SalesTable
DataGroup #ForeignTrade
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #InterCompany
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/8543E75A-40AA-47B2-B411-E23ECBBBA2ED.htm
ConfigurationKey #TradeInterCompany
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #InterCompanyAdmin
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/121E20D1-5782-4469-B323-410DF450EF57.htm
DataSource #SalesTable
DataGroup #IntercompanyAdmin
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #interCompanyAllowIndirectCreationOrig
AutoDeclaration #Yes
AllowEdit #No
AlignControl #No
MultiLine #Yes
ShowLabel #No
DataSource #SalesTable
DataMethod #interCompanyAllowIndirectCreationOrig
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #GroupNotificationToTheCentralBank
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/98AA26F2-71FC-419D-B1E7-36D56D52E1C6.htm
DataSource #SalesTable
DataGroup #NotificationToTheCentralBank
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderReferences
Caption #@SYS14018
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #References
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/515862BC-4802-41AC-914F-40B5AD6F1DC8.htm
Caption #@SYS14018
DataSource #SalesTable
ArrangeMethod #Horizontal, flush right
DataGroup #ExternalReference
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupIntercompanyPurchTable
AutoDeclaration #Yes
Width #Column width
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/4CCAFD8D-7C25-447A-90C1-66D07E8DE6E0.htm
ConfigurationKey #TradeInterCompany
Caption #@SYS75319
ENDPROPERTIES
CONTAINER
CONTROL GRID
PROPERTIES
Name #Grid1
AllowEdit #No
Width #Column width
Height #80
MultiSelect #No
HighlightActive #No
DataSource #SalesTable_Reference
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_InterCompanyPurchId
Width #75
LabelAlignment #Right
DataSource #SalesTable_Reference
DataField #InterCompanyPurchId
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #intercompanyPurchStatus
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/E0C3A467-B55C-4984-AE12-F006E2CC11B5.htm
LabelAlignment #Right
DataSource #SalesTable_Reference
DataMethod #intercompanyPurchStatus
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #SalesTable_InterCompanyOrder
BackgroundColor #Window background
LabelAlignment #Right
DataSource #SalesTable_Reference
DataField #InterCompanyOrder
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_InterCompanyCompanyId
LabelAlignment #Right
DataSource #SalesTable_Reference
DataField #InterCompanyCompanyId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_IntercompanyPurch_InterCompanyOriginalSalesId
Label #@SYS93838
LabelAlignment #Right
DataSource #SalesTable_Reference
DataField #InterCompanyOriginalSalesId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #intercompanyOriginalSalesType
AllowEdit #No
Width #100
Height #15
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/5DE8BD24-47F3-49C9-9EC8-9338A9FB1A14.htm
LabelAlignment #Right
DataSource #SalesTable_Reference
DataMethod #intercompanyOriginalSalesType
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #intercompanyOriginalSalesStatus
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/DA3F778A-7C14-49E5-9941-40B9EA228326.htm
LabelAlignment #Right
DataSource #SalesTable_Reference
DataMethod #intercompanyOriginalSalesStatus
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_IntercompanyPurch_InterCompanyOriginalCustAccount
Label #@SYS302
LabelAlignment #Right
DataSource #SalesTable_Reference
DataField #InterCompanyOriginalCustAccount
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #SalesTable_InterCompanyDirectDeliveryOrig
BackgroundColor #Window background
LabelAlignment #Right
DataSource #SalesTable_Reference
DataField #InterCompanyDirectDeliveryOrig
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupPurchaseTable
Width #Column width
Height #Column height
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/9A04F97A-E8B4-4AE9-A46E-84BF83796C65.htm
Caption #@SYS25204
ENDPROPERTIES
CONTAINER
CONTROL GRID
PROPERTIES
Name #Grid
Width #Column width
Height #Column height
DataSource #InterCompanyPurchSalesReference
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #PurchTable_PurchId
Width #75
LabelAlignment #Right
DataSource #PurchTable_Reference
DataField #PurchId
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #PurchTable_PurchStatus
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/e67e719d-27f5-43d3-a180-4c68091c65b6.htm
LabelAlignment #Right
DataSource #PurchTable_Reference
DataField #PurchStatus
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #PurchTable_InterCompanyOrder
BackgroundColor #Window background
LabelAlignment #Right
DataSource #PurchTable_Reference
DataField #InterCompanyOrder
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #PurchTable_InterCompanyCompanyId
LabelAlignment #Right
DataSource #PurchTable_Reference
DataField #InterCompanyCompanyId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #PurchTable_InterCompanySalesId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/69e402f4-304d-4eff-9463-59bbf1fa0fb4.htm
LabelAlignment #Right
DataSource #PurchTable_Reference
DataField #InterCompanySalesId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #interCompanySalesType
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/1DB119D7-47DC-4C66-9C86-D70672DFB71A.htm
ConfigurationKey #TradeInterCompany
DataSource #PurchTable_Reference
DataMethod #interCompanySalesType
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #interCompanySalesStatus
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/040178E5-59A5-44E1-A96F-EBE6621E7958.htm
ConfigurationKey #TradeInterCompany
LabelAlignment #Right
DataSource #PurchTable_Reference
DataMethod #interCompanySalesStatus
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #interCompanyDocumentStatus
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/844F6EAC-E88B-4371-9D4B-31C11ED98FAA.htm
ConfigurationKey #TradeInterCompany
LabelAlignment #Right
DataSource #PurchTable_Reference
DataMethod #interCompanyDocumentStatus
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #interCompanyDocumentNum
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/E4ECE14C-4117-474A-BF09-D3D79548F3B7.htm
ConfigurationKey #TradeInterCompany
LabelAlignment #Right
DataSource #PurchTable_Reference
DataMethod #interCompanyDocumentNum
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #interCompanyDocumentDate
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/8E5B6961-FB24-4292-BD86-78F5DA0147D0.htm
ConfigurationKey #TradeInterCompany
LabelAlignment #Right
DataSource #PurchTable_Reference
DataMethod #interCompanyDocumentDate
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabHeaderDimension
AutoDeclaration #Yes
Caption #@SYS14926
DataSource #SalesTable
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Dimension
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/a790834d-649a-459d-999c-dea491bad6c8.htm
DataSource #SalesTable
DataGroup #Dimension
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL BUTTONGROUP
PROPERTIES
Name #ButtonsHeader
ENDPROPERTIES
CONTAINER
CONTROL BUTTON
PROPERTIES
Name #ButtonToggelSimple
AutoDeclaration #Yes
HelpText #@SYS69463
Text #@SYS23466
SaveRecord #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# super();
#
# element.toggelSimpleAdvanced(!advanced);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #ButtonToggelAdvanced
AutoDeclaration #Yes
HelpText #@SYS69464
Text #@SYS24899
SaveRecord #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# super();
#
# element.toggelSimpleAdvanced(!advanced);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonHeaderUpdate
AutoDeclaration #Yes
HelpText #@SYS69476
Text #@SYS78937
MultiSelect #Yes
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#public void clicked()
#{
# ;
#
# salesTableForm.enableUpdateJournalButtons(salesTable,
# buttonUpdateConfirmation,
# buttonUpdatePickingList,
# buttonUpdatePickingListRegistrate,
# buttonUpdatePackingSlip,
# buttonUpdateInvoice,
# null,
# null,
# null,
# null,
# null);
#
# super();
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonUpdateConfirmation
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesFormLetter_Confirmation
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderUpdate_Separator1
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonUpdatePickingList
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesFormLetter_PickingList
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonUpdatePickingListRegistrate
AutoDeclaration #Yes
MultiSelect #Yes
MenuItemName #wmsPickingregistration
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderUpdate_Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonUpdatePackingSlip
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesFormLetter_PackingSlip
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonUpdateInvoice
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesFormLetter_Invoice
DataSource #SalesTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{;
#
# super();
#}
#
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonHeaderProforma
AutoDeclaration #Yes
HelpText #@SYS109859
Text #@SYS71007
MultiSelect #Yes
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{;
# salesTableForm.enableUpdateJournalButtons(salesTable,
# null,
# null,
# null,
# null,
# null,
# null,
# buttonProformaConfirmation,
# buttonProformaPickingList,
# buttonProformaPackingSlip,
# buttonProformaInvoice);
#
# super();
#
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonProformaConfirmation
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesFormLetter_Proforma_Confirmation
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Header_Proforma_Separator1
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonProformaPickingList
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesFormLetter_Proforma_PickingList
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Header_Proforma_Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonProformaPackingSlip
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesFormLetter_Proforma_PackingSlip
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Header_Proforma_Separator3
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonProformaInvoice
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesFormLetter_Proforma_Invoice
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonHeaderSetup
AutoDeclaration #Yes
HelpText #@SYS76660
Text #@SYS2186
SaveRecord #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{;
# buttonPaymentSchedule.enabled(true);
#
# // Disables the Payment schedule button under Setup menubutton for return orders
# if (salesTable.returnItem())
# {
# buttonPaymentSchedule.enabled(false);
# }
# else
# {
# if (!salesTable.PaymentSched)
# {
# buttonPaymentSchedule.enabled(false);
# }
# }
#
# buttonMarkupTransHeading.enabled(salesTable.markupAllowed());
#
# element.enableCreditCardMenuItems();
#
# super();
#}
#
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ButtonMarkupTransHeading
AutoDeclaration #Yes
MenuItemName #MarkupTrans_HeadingSales
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #TaxTransSource
MenuItemName #TaxTransSource
DataSource #SalesTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{;
# element.automaticTotalDiscount();
#
# if (!tmpSalesTableTaxTransForm || (tmpSalesTableTaxTransForm && tmpSalesTableTaxTransForm.closed()))
# {
# tmpSalesTableTaxTransForm = SalesTotals::showTax(salesTable);
# }
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderSetup_Separator1
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonPaymentSchedule
AutoDeclaration #Yes
MenuItemName #CustPaymSchedule
DataSource #SalesTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# CustVendPaymSched custVendPaymSched;
# ;
#
# element.automaticTotalDiscount();
#
# if (salesTable.PaymentSched && !CustPaymSched::exist(salesTable.TableId,salesTable.RecId))
# {
# custVendPaymSched = CustVendPaymSched::construct(SysModule::Cust,salesTable);
# custVendPaymSched.copyPaymSched(PaymSched::find(salesTable.PaymentSched));
# salesTable.createPaymentSched();
# }
# super();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderSetup_Separator2
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Address
AutoDeclaration #Yes
Left #Right edge
MenuItemName #AddressSelect
DataSource #SalesTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#public void clicked()
#{
# ;
#
# oldThirdPartyBillingAddr = salesTable.tpAddress();
#
# super();
#
# // Shipping module
# shipCarrierAddress_ds.reread();
# shipCarrierAddress_ds.refresh();
# shipCarrierAddressInLine_ds.reread();
# shipCarrierAddressInLine_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ContactPerson
MenuItemName #contactPerson
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderSetup_Separator3
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #PrintMgmt
AutoDeclaration #Yes
HelpText #@SYS68918
ConfigurationKey #LogisticsBasic
SecurityKey #CustMisc
Text #@SYS54502
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# PrintMgmtSetupContext setupContext = new PrintMgmtSetupContext();
# List inventDocs = new List(Types::Enum);
# List salesDocs = new List(Types::Enum);
# ;
#
# if (salesTable_ds.cursor() == null)
# return;
#
# super();
#
# salesDocs.addEnd(PrintMgmtDocumentType::SalesOrderConfirmation);
# salesDocs.addEnd(PrintMgmtDocumentType::SalesOrderInvoice);
# salesDocs.addEnd(PrintMgmtDocumentType::SalesOrderPackingSlip);
#
#
# inventDocs.addEnd(PrintMgmtDocumentType::InventPickList);
#
#
# setupContext.addHierarchyContext(PrintMgmtHierarchyType::Sales, PrintMgmtNodeType::SalesTable,salesDocs);
# setupContext.addHierarchyContext(PrintMgmtHierarchyType::Invent, PrintMgmtNodeType::SalesTable,inventDocs);
#
# setupContext.parmCaller(element);
# setupContext.parmReferencedTableBuffer(salesTable_ds.cursor());
# PrintMgmt::launchSetup(setupContext);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesJournalAutoSummary_Sales
MenuItemName #SalesJournalAutoSummary_Sales
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderSetup_Separator4
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CreditCardWizard
AutoDeclaration #Yes
MenuItemName #creditCardwizard
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ShipCarrierEmailAddress
MenuItemName #ShipCarrierEmailAddress
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonHeaderFunction
AutoDeclaration #Yes
HelpText #@SYS69469
Text #@SYS10340
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# SalesTableType salesTableTypeLocal = salesTable.type();
# boolean canDropShip = true;
# boolean canCreatePurchOrder = true;
# boolean creditInvoicing = true;
# boolean returnItem = salesTable.returnItem();
# boolean regularOrder = (salesTable.SalesType == SalesType::Sales) ||
# (salesTable.SalesType == SalesType::ItemReq);
# ;
#
# if (salesTable.SalesStatus == SalesStatus::Invoiced
# || salesTable.SalesStatus == SalesStatus::Canceled
# || salesTable.SalesStatus == SalesStatus::Delivered
# || !salesTableTypeLocal.canCreatePurchOrder())
# {
# canCreatePurchOrder = false;
# canDropShip = false;
# if (CustParameters::find().CreditInvoicing
# && salesTable.SalesStatus == SalesStatus::Invoiced && !returnItem)
# {
# creditInvoicing = false;
# }
# }
#
# if (salesTable.ProjId)
# {
# creditInvoicing = false;
# }
#
# // Control Service buttons
# smaAgreementWizard.enabled(regularOrder);
# smaServiceOrderWizard.enabled(regularOrder);
#
# // Disable buttons for return orders
# salesCopyAllHeader.enabled(!returnItem);
# salesCopyJournalHeader.enabled(!returnItem);
# tradeBLWIChangeCode.enabled(!returnItem);
# salesCreditNoteHeader.enabled(!returnItem);
#
# buttonCreateReleaseOrder.enabled(salesTableTypeLocal.canReleaseOrderBeCreated());
# buttonCreatePurchOrder.enabled(canCreatePurchOrder);
# buttonCreateDropShipment.enabled(canDropShip && salesTableTypeLocal.canCreateDropShipment());
# buttonCustVendCreditInvoicingHeader.enabled(creditInvoicing);
# buttoncustVendCreditInvoicingLines.enabled(creditInvoicing);
#
# super();
#}
#
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesCopyAllHeader
AutoDeclaration #Yes
MenuItemName #SalesCopyAllHeader
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesCopyJournalHeader
AutoDeclaration #Yes
MenuItemName #SalesCopyJournalHeader
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderFunction_Separator1
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesCreditNoteHeader
AutoDeclaration #Yes
MenuItemName #SalesCreditNoteHeader
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonCreatePurchOrder
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #PurchCreateFromSalesorderSales
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonCreateReleaseOrder
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesCreateReleaseOrder
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonCreateDropShipment
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesCreateDropShipment
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderFunction_Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #OpenTrans
MenuItemName #CustOpenTrans
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #TradeBLWIChangeCode
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #TradeBLWIChangeCode
DataSource #SalesTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# ;
# if (! salesTable.RecId)
# {
# salesTable.write();
# }
#
# super();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderFunction_Separator3
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonCustVendCreditInvoicingHeader
AutoDeclaration #Yes
Visible #No
MenuItemName #CustVendCreditInvoicing
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator1
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SMAAgreementWizard
AutoDeclaration #Yes
MenuItemName #SMAAgreementWizard
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SMAServiceOrderWizard
AutoDeclaration #Yes
MenuItemName #SMAServiceOrderWizard
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CreditCardPreauthorize
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #CreditCardPreauthorize
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #CGranMenuButton
AutoDeclaration #Yes
Text #Norma19
ENDPROPERTIES
CONTAINER
CONTROL BUTTON
PROPERTIES
Name #CGranBySelection
AutoDeclaration #Yes
Text #Por selección
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#//CarlosGranados:Llamamos al formulario de creación de la Norma 19 por selección
#void clicked() {
#
# ;
# if (element.CGranShowDialogCheckProgramDirFilePath()) {
#
# }
#
#
#
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #CGranByFilter
AutoDeclaration #Yes
Text #Por filtro
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#//CarlosGranados
#void clicked()
#{
# FormRun formRun;
# Args args = new Args();
# ;
#
# super();
# args.caller(this);
# args.name(formstr( CGranFilterNorma19) );
# formRun = classFactory.formRunClass( Args );
# formRun.init();
# formrun.run();
# formrun.wait();
# element.redraw();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonHeaderInquiry
AutoDeclaration #Yes
HelpText #@SYS69471
Text #@SYS3850
SaveRecord #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# container existingJournals;
# SalesTableType salesTableTypeLocal = salesTable.type();
# boolean returnItem = salesTable.returnItem();
# ;
#
# existingJournals = salesTable.existingJournals();
#
# buttonJournalQuotationConfirmation.enabled (conpeek(existingJournals, SalesTableType::posQuotation()) ? true : false);
# buttonJournalConfirmation.enabled(conpeek(existingJournals, SalesTableType::posConfirmation()) && !returnItem ? true : false);
# buttonJournalPickingList.enabled(conpeek(existingJournals, SalesTableType::posPickingList()) && !returnItem ? true : false);
# buttonJournalPackingSlip.enabled(conpeek(existingJournals, SalesTableType::posPackingSlip()) ? true : false);
# buttonJournalInvoice.enabled(!salesTable.ProjId && conpeek(existingJournals, SalesTableType::posInvoice()) ? true : false);
# buttonSalesTableLinks.enabled(salesTableTypeLocal.canHaveAttachedOrders());
#
# // Disable buttons for return orders
# buttonPurchTable.enabled(purchTable_Reference.RecId && !returnItem);
# checkCreditLimit.enabled(!returnItem);
# priceDiscActual.enabled(!returnItem);
#
# super();
#}
#
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ButtonTotals
MenuItemName #SalesTotals
DataSource #SalesTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# ;
# element.automaticTotalDiscount();
# super();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CheckCreditLimit
AutoDeclaration #Yes
MenuItemType #Action
MenuItemName #SalesCheckCreditLimit
DataSource #SalesTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# ;
# element.automaticTotalDiscount();
# super();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Cov
MenuItemName #LedgerCoverage
DataSource #SalesTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# ;
# element.automaticTotalDiscount();
# super();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderInquiry_Separator1
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #priceDiscActual
AutoDeclaration #Yes
MenuItemName #priceDiscActual
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderInquiry_Separator2
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonJournalQuotationConfirmation
AutoDeclaration #Yes
Text #@SYS98918
MenuItemName #custQuotationJournalConfirmation
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonJournalConfirmation
AutoDeclaration #Yes
MenuItemName #CustConfirmJournal
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonJournalPickingList
AutoDeclaration #Yes
MenuItemName #WMSPickingRoutesJournal
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonJournalPackingSlip
AutoDeclaration #Yes
MenuItemName #CustPackingSlipJournal
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonJournalInvoice
AutoDeclaration #Yes
MenuItemName #CustInvoiceJournal
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderInquiry_Separator3
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonPurchTable
AutoDeclaration #Yes
MenuItemName #PurchTable
DataSource #PurchTable_Reference
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ButtonSalesTableLinks
AutoDeclaration #Yes
MenuItemName #SalesTableLinks
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderInquiry_Separator4
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #HeaderInquiry_CostControlCommittedCost
AutoDeclaration #Yes
AllowEdit #No
SaveRecord #No
MenuItemName #costcontrolCommittedCost
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CreditCardAuthTrans
MenuItemName #CreditCardAuthTrans
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #HeaderInquiry_Separator5
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventNonConformanceTableHeader
AutoDeclaration #Yes
MenuItemName #InventNonConformanceTable
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventQualityOrderTableHeader
AutoDeclaration #Yes
MenuItemName #InventQualityOrderTable
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonHeaderTradeAgreements
AutoDeclaration #Yes
HelpText #@SYS69473
Text #@SYS13768
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesPrice
MenuItemName #PriceDiscTable_PriceSales
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesLineDisc
MenuItemName #PriceDiscTable_LineDiscSales
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesMultiLineDisc
MenuItemName #PriceDiscTable_MultiLineDiscSales
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesEndDisc
MenuItemName #PriceDiscTable_EndDiscSales
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #TradeAgreements_Separator1
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SuppItemTable_Sales
MenuItemName #SuppItemTable_Sales
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ButtonHeaderQuickQuote
AutoDeclaration #Yes
MenuItemName #SalesQuickQuote
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonHeaderInterCompany
AutoDeclaration #Yes
HelpText #@SYS94420
ConfigurationKey #TradeInterCompany
Text #@SYS74106
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# container checkIfUpdate = purchTable_Reference.interCompanySalesTable().checkIfUpdate();
# boolean enablePickingListButton;
#;
# enablePickingListButton = conlen(checkIfUpdate) ? conpeek(checkIfupdate, SalesTableType::posPickingList()) : false;
#
# buttonPurchTableThisCompany. enabled(purchTable_Reference.InterCompanySalesId ? true : false);
# buttonInterCompanyPurchTable. enabled(salesTable.InterCompanyPurchId ? true : false);
# buttonInterCompanyOriginalSalesTable. enabled(salesTable.InterCompanyOriginalSalesId ? true : false);
# buttonInterCompanySalesTable. enabled(purchTable_Reference.InterCompanySalesId ? true : false);
# buttonInterCompanySalesFormLetter_Pickinglist.enabled(enablePickingListButton);
#
# super();
#}
#
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL BUTTON
PROPERTIES
Name #ButtonInterCompanySalesTable
AutoDeclaration #Yes
HelpText #@SYS94562
Text #@SYS93837
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# super();
#
# if (salesTable.SalesType == SalesType::ReturnItem)
# TradeInterCompany::construct(purchTable_Reference).formRun(formstr(ReturnTable),element);
# else
# TradeInterCompany::construct(purchTable_Reference).formRun(formstr(SalesTable),element);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #ButtonInterCompanyOriginalSalesTable
AutoDeclaration #Yes
HelpText #@SYS94563
Text #@SYS93838
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# super();
#
# if (salesTable.SalesType == SalesType::ReturnItem)
# TradeInterCompany::construct(salesTable,true).formRun(formstr(ReturnTable),element);
# else
# TradeInterCompany::construct(salesTable,true).formRun(formstr(SalesTable),element);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ButtonPurchTableThisCompany
AutoDeclaration #Yes
MenuItemName #PurchTable
DataSource #PurchTable_Reference
ENDPROPERTIES
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #ButtonInterCompanyPurchTable
AutoDeclaration #Yes
HelpText #@SYS94560
Text #@SYS75319
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# super();
#
# TradeInterCompany::construct(salesTable).formRun(formstr(PurchTable),element);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #ButtonInterCompanySalesFormLetter_Pickinglist
AutoDeclaration #Yes
HelpText #@SYS94424
Text #@SYS94423
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{;
# if (!purchTable_Reference.RecId && !purchTable_Reference.InterCompanySalesId)
# throw(error("@SYS28047"));
#
# TradeInterCompany::construct(purchTable_Reference).menuFunction(classstr(SalesFormLetter_PickingList),MenuItemType::Action,element);
#}
#
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #CtrlSplitVertical
AutoDeclaration #Yes
Width #Column width
Height #5
AlignControl #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/DD6D1AB6-1A41-4D7B-AEFC-163E623DF926.htm
FrameType #Raised 3D
BackgroundColor #Window background
HideIfEmpty #No
AlignChild #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #mouseUp
#int mouseUp(int x, int y, int button, boolean ctrl, boolean shift)
#{
# int ret;
#
# ret = super(x, y, button, ctrl, shift);
#
# return _formSplitterVertical.mouseUp(x, y, button, ctrl, shift);
#}
ENDSOURCE
SOURCE #mouseMove
#int mouseMove(int x, int y, int button, boolean ctrl, boolean shift)
#{
# int ret;
#
# ret = super(x, y, button, ctrl, shift);
#
# return _formSplitterVertical.mouseMove(x,y,button,ctrl,shift);
#}
ENDSOURCE
SOURCE #mouseDown
#int mouseDown(int x, int y, int button, boolean ctrl, boolean shift)
#{
# int ret;
#
# ret = super(x, y, button, ctrl, shift);
#
# return _formSplitterVertical.mouseDown(x, y, button, ctrl, shift);
#}
ENDSOURCE
ENDMETHODS
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Line
AutoDeclaration #Yes
Width #Column width
Height #Column height
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/e3432930-c481-4a79-a7da-d62033dce4a9.htm
FrameType #None
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL TAB
PROPERTIES
Name #TabLine
AutoDeclaration #Yes
Width #Column width
Height #Column height
Tabs #7
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL TABPAGE
PROPERTIES
Name #TabLineOverview
AutoDeclaration #Yes
Caption #@SYS15451
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL GRID
PROPERTIES
Name #SalesLineGrid
AutoDeclaration #Yes
Width #Column width
Height #Column height
VisibleRows #9
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_ItemId
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/f44c2019-8ad4-4f6d-995d-16838fca4121.htm
DataSource #SalesLine
DataField #ItemId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ItemName
AllowEdit #No
Skip #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/FF61467E-2CD6-4ED8-96E3-D13318BDC5B9.htm
DataSource #SalesLine
DataMethod #ItemName
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_ItemBOMId
DataSource #SalesLine
DataField #ItemBOMId
ENDPROPERTIES
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #InventoryDimensionsGrid
Visible #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/BC84CC81-55F4-406A-9937-9F4136D9175A.htm
BackgroundColor #Window background
DataSource #InventDim
DataGroup #InventoryDimensions
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_Dimension1
AutoDeclaration #Yes
DataSource #SalesLine
DataField #Dimension[1]
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_Dimension2
AutoDeclaration #Yes
Visible #No
DataSource #SalesLine
DataField #Dimension[2]
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_Dimension3
AutoDeclaration #Yes
DataSource #SalesLine
DataField #Dimension[3]
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_SalesQty
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/0182ad7d-bdbf-4203-9d4e-03d388f23711.htm
ShowZero #No
DataSource #SalesLine
DataField #SalesQty
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_SalesUnit
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/aab1a7e0-3781-4168-a7a0-6534144f748a.htm
DataSource #SalesLine
DataField #SalesUnit
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_SalesPrice
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/d435f437-c343-4c31-8c1a-267a91edf7a2.htm
ShowZero #No
DataSource #SalesLine
DataField #SalesPrice
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #SalesLine_CGranDueDate
DataSource #SalesLine
DataField #CGranDueDate
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_LineDiscGrid
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/5132b8a8-b674-4900-bf9e-3492d0204857.htm
ShowZero #No
DataSource #SalesLine
DataField #LineDisc
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_LinePercentGrid
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/507dc973-2670-4b6e-809c-b1145c7a0689.htm
ShowZero #No
DataSource #SalesLine
DataField #LinePercent
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_LineAmount
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/112405fb-2594-47d2-9fdb-788f2dad00f2.htm
DataSource #SalesLine
DataField #LineAmount
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #qualityOrderStatusDisplayLine
AutoDeclaration #Yes
Visible #No
AllowEdit #No
DataSource #SalesLine
DataMethod #qualityOrderStatusDisplay
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #DeliveryGroup
FrameType #None
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL DATEEDIT
PROPERTIES
Name #SalesLine_ReceiptDateRequested
DataSource #SalesLine
DataField #ReceiptDateRequested
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #SalesLine_ShippingDateRequested
DataSource #SalesLine
DataField #ShippingDateRequested
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #SalesLine_ReceiptDateConfirmed
DataSource #SalesLine
DataField #ReceiptDateConfirmed
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #SalesLine_ShippingDateConfirmed
DataSource #SalesLine
DataField #ShippingDateConfirmed
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #SalesLine_DeliveryDateControl2
DataSource #SalesLine
DataField #DeliveryDateControlType
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_DlvMode
DataSource #SalesLine
DataField #DlvMode
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SalesLineTimeZone
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL COMBOBOX
PROPERTIES
Name #SalesLine_TimeZoneSite
AllowEdit #No
HelpText #@SYS110100
Label #@SYS110097
DataSource #SalesLine
DataMethod #timeZoneSite
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabLineGeneral
AutoDeclaration #Yes
Caption #@SYS2952
DataSource #SalesLine
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Sales
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/5B9B4908-2CCE-456F-A393-2E478EA56F40.htm
Caption #@SYS22920
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_Name
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/b68d08f5-9389-4ffb-86b3-8781901ce1a2.htm
MultiLine #Yes
DataSource #SalesLine
DataField #Name
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_ExternalItemId
Width #Column width
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/e8b1f6bd-4a86-47e5-bdd3-ecb328b02420.htm
DataSource #SalesLine
DataField #ExternalItemId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SalesAdminInterCompany
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/D4DE9337-5A31-49D2-9B6B-2E643FB5D17A.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #SalesLineAdministrationGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/10DD5D41-3914-42B8-A2C4-BE8EA412FD59.htm
Caption #@SYS9853
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SalesLineIntercompany
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/AC604793-F94E-4314-89BE-5F9694852E45.htm
DataSource #SalesLine
DataGroup #Intercompany
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SalesLineStatusGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/BE288B22-1EB0-47EF-9A6B-39DE8353CE2D.htm
DataSource #SalesLine
DataGroup #Status
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #EInvoiceLine
AutoDeclaration #Yes
DataSource #SalesLine
DataGroup #EInvoice
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #EInvoiceLine_EInvoiceAccountCode
AutoDeclaration #Yes
DataSource #SalesLine
DataField #EInvoiceAccountCode
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabLineSetup
AutoDeclaration #Yes
Caption #@SYS2186
DataSource #SalesLine
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #LineInventory
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/830A5D56-92ED-4620-B09B-BD2C714867F2.htm
DataSource #SalesLine
DataGroup #Inventory
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Return
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/60B8BD35-FA2B-4DDA-957D-0C4286075FCA.htm
DataSource #SalesLine
DataGroup #ReturnGroup
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_InventTransIdReturn
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/d806a831-d47f-4f1c-ab73-c84049d7b5b9.htm
LookupButton #Always
DataSource #SalesLine
DataField #InventTransIdReturn
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_ReturnCostPrice
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/e146aa18-0777-4ee2-ba06-126733c7b628.htm
DataSource #SalesLine
DataField #CostPrice
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #Return_Scrap
DataSource #SalesLine
DataField #Scrap
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #LinePosting
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/902BF697-A7CE-4DFC-9E9D-AEEEA4749340.htm
DataSource #SalesLine
DataGroup #Posting
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_LedgerAccount
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/023e71c4-6871-41c6-b969-0fdf02092f54.htm
DataSource #SalesLine
DataField #LedgerAccount
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #LineSalesTax
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/B082A965-D2A4-4B1B-A755-2B6DAB1F2A01.htm
DataSource #SalesLine
DataGroup #SalesTax
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #LineCommission
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/F5B6D226-6631-4DF7-AFE4-9914F83E4FB0.htm
DataSource #SalesLine
DataGroup #Commission
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #lineRFIDTaggingLevel
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/408A14C5-01EE-4737-904A-7BDC2AD9D6BF.htm
DataSource #SalesLine
DataGroup #RFIDTagging
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #lineRFIDTaggingLevel_ItemTagging
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/d94fc250-5ed2-49e3-af31-5bb33eb439d8.htm
DataSource #SalesLine
DataField #ItemTagging
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #lineRFIDTaggingLevel_CaseTagging
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/a342e5fc-5e32-47ec-bbff-263225e84a57.htm
DataSource #SalesLine
DataField #CaseTagging
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #lineRFIDTaggingLevel_PalletTagging
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/923033e8-0f27-4d91-a996-02c6565186f7.htm
DataSource #SalesLine
DataField #PalletTagging
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabPageAddress
AutoDeclaration #Yes
ConfigurationKey #TradeMultiShipTo
Caption #@SYS9362
DataSource #SalesLine
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #LineDeliveryAddress
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/b24e0bbb-6a6b-4b92-8b98-a347a9e6f576.htm
DataSource #SalesLine
DataGroup #DeliveryAddress
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #LineAddressDisplay
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/92B4EBBF-872D-41CF-A27C-BF718CD9BF0B.htm
DataSource #SalesLine
DataGroup #AddressDisplay
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #LineSalesTaxAddress
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/0CBE0998-3DA6-49CC-814A-39D97CF53DAA.htm
DataSource #SalesLine
DataGroup #SalesTax
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ShipCarrierLineAddress
ConfigurationKey #ShipCarrier
Caption #@SYS116845
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #LineCarrierInfo
Visible #No
FrameType #None
DataSource #ShipCarrierAddressInLine
DataGroup #ShipCarrierInfo
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #DescriptionInLine
FrameType #None
DataSource #ShipCarrierAddressInLine
DataGroup #Description
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #AddressInLine
FrameType #None
DataSource #ShipCarrierAddressInLine
DataGroup #Address
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabLineDelivery
AutoDeclaration #Yes
Caption #@SYS4508
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #LineDelivery
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/ECB4C9E0-DB91-4B99-9FF7-BD55B33037F3.htm
Caption #@SYS16056
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesAvailableDlvDatesLine
AutoDeclaration #Yes
SaveRecord #No
MenuItemType #Action
MenuItemName #SalesAvailableDlvDates
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #SalesLineDeliveryGroup_ReceiptDateRequested
DataSource #SalesLine
DataField #ReceiptDateRequested
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #SalesLineDeliveryGroup_ShippingDateRequested
DataSource #SalesLine
DataField #ShippingDateRequested
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #SalesLineDeliveryGroup_ReceiptDateConfirmed
DataSource #SalesLine
DataField #ReceiptDateConfirmed
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #SalesLineDeliveryGroup_ShippingDateConfirmed
DataSource #SalesLine
DataField #ShippingDateConfirmed
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #SalesLine_DeliveryDateControl
HelpText #@SYS88210
DataSource #SalesLine
DataField #DeliveryDateControlType
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #MiscLineDelivery
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/ECB4C9E0-DB91-4B99-9FF7-BD55B33037F3.htm
Caption #@SYS102988
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL REALEDIT
PROPERTIES
Name #SalesLineDeliveryGroup_OverDeliveryPct
DataSource #SalesLine
DataField #OverDeliveryPct
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLineDeliveryGroup_UnderDeliveryPct
DataSource #SalesLine
DataField #UnderDeliveryPct
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLineDeliveryGroup_DlvMode
DataSource #SalesLine
DataField #DlvMode
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #SalesLineDeliveryGroup_DeliveryType
DataSource #SalesLine
DataField #DeliveryType
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #TimeZoneDelivery
Caption #@SYS110097
ENDPROPERTIES
CONTAINER
CONTROL COMBOBOX
PROPERTIES
Name #SalesLineDeliveryGroup_TimeZoneSite
AllowEdit #No
HelpText #@SYS110100
Label #@SYS102501
DataSource #SalesLine
DataMethod #timeZoneSite
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #CarrierInfoLine
DataSource #SalesLine
DataGroup #CarrierInfo
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabLineQty
AutoDeclaration #Yes
Caption #@SYS14578
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL GRID
PROPERTIES
Name #Qty
Width #Column width
Height #Column height
VisibleRows #9
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesLine_ItemId1
Skip #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/f44c2019-8ad4-4f6d-995d-16838fca4121.htm
DataSource #SalesLine
DataField #ItemId
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_SalesDeliverNow1
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/5e2bb722-1bc0-4d2e-b758-3af3d87e614b.htm
ShowZero #No
DataSource #SalesLine
DataField #SalesDeliverNow
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #InvoicedInTotal
AllowEdit #No
HelpText #@SYS27450
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/336380FA-8FAC-4ED2-BE76-6193A80AB653.htm
ShowZero #No
Label #@SYS14205
DataSource #SalesLine
DataMethod #InvoicedInTotal
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_RemainSalesFinancial1
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/04a34fc5-7283-45bf-a4e3-14d70e0f4daa.htm
ShowZero #No
DataSource #SalesLine
DataField #RemainSalesFinancial
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #DeliveredInTotal
AllowEdit #No
HelpText #@SYS27452
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/11105745-2A53-4DC2-9141-D3722D744E25.htm
ShowZero #No
Label #@SYS1316
DataSource #SalesLine
DataMethod #DeliveredInTotal
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_RemainSalesPhysical1
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/4294b27a-d5ae-4f17-bce7-b9702c499d55.htm
ShowZero #No
DataSource #SalesLine
DataField #RemainSalesPhysical
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #pickedInTotalSalesUnit
AllowEdit #No
HelpText #@SYS68906
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/FA56611A-E17D-44F7-B381-851D0CA1AE7D.htm
Label #@SYS15980
DataSource #SalesLine
DataMethod #pickedInTotalSalesUnit
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #ReservedPhysicalInSalesUnit
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/0293C974-5777-4427-A96C-37FF023F032D.htm
ShowZero #No
DataSource #SalesLine
DataMethod #reservedPhysicalInSalesUnit
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #ReservedOnOrderInSalesUnit
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/428FA967-6A1C-42C5-900B-2A703230525D.htm
ShowZero #No
DataSource #SalesLine
DataMethod #reservedOnOrderInSalesUnit
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #OnOrderInSalesUnit
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/38E7FE51-0F82-4869-A3F4-5AD648F84EE4.htm
ShowZero #No
DataSource #SalesLine
DataMethod #OnOrderInSalesUnit
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabLinePriceDisc
AutoDeclaration #Yes
Caption #@SYS19789
DataSource #SalesLine
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Disc
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/97BFD1EB-6A40-4212-8862-D6D4F819F1CC.htm
Caption #@SYS11829
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_LinePercent
Width #Column width
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/507dc973-2670-4b6e-809c-b1145c7a0689.htm
ShowZero #No
DataSource #SalesLine
DataField #LinePercent
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_LineDisc
Width #Column width
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/5132b8a8-b674-4900-bf9e-3492d0204857.htm
ShowZero #No
DataSource #SalesLine
DataField #LineDisc
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_MultilineDisc
Width #Column width
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/4b06dab4-2081-4f04-9573-0991a7162f0f.htm
ShowZero #No
DataSource #SalesLine
DataField #MultiLnDisc
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_MultilinePurchasePercent
Width #Column width
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/6ff46d02-2cd3-46f4-a679-8394ea3698ed.htm
ShowZero #No
DataSource #SalesLine
DataField #MultiLnPercent
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Prices
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/CFDB717E-C7D3-4605-8116-6ABF10C07E36.htm
Caption #@SYS12983
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL REALEDIT
PROPERTIES
Name #PriceUnit
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/5534fb07-8429-4abd-b9b1-e079ca38c0c1.htm
DataSource #SalesLine
DataField #PriceUnit
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #SalesLine_SalesMarkUp
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/c79f720d-d8a9-44f4-8a3a-2d5362f4b71d.htm
ShowZero #No
DataSource #SalesLine
DataField #SalesMarkup
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabLineOther
AutoDeclaration #Yes
Caption #@SYS1284
DataSource #SalesLine
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #ItemReference
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/874063BB-18E2-467B-B320-573D0F53A376.htm
DataSource #SalesLine
DataGroup #ItemReference
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #BlanketOrder
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/8B717DBB-49CB-42C8-BE4A-CD2B964177A5.htm
DataSource #SalesLine
DataGroup #BlanketOrder
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Barcode
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/61F33EA9-0B0C-4EFB-BCFB-22137A283889.htm
DataSource #SalesLine
DataGroup #Barcode
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Externalreference
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/A71EC057-DF08-49EC-961E-A6FDF9DB8BFB.htm
DataSource #SalesLine
DataGroup #ExternalReference
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ForeignTrade
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/301C5DB6-EDF1-41ED-840E-785D023D734B.htm
DataSource #SalesLine
DataGroup #ForeignTrade
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #BomRoute
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/6FB71792-334D-41C1-B746-F737B114E4C3.htm
DataSource #SalesLine
DataGroup #BOMRoute
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #ItemBOMNum
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/0c662572-5037-414a-90df-f744aa80cbf3.htm
DataSource #SalesLine
DataField #ItemBOMId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ItemRouteNum
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/e7a35e56-ef6a-4160-90b9-536d1fb40abb.htm
DataSource #SalesLine
DataField #ItemRouteId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #BomRoute_ItemPBAId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/594fcdbd-1861-4d2b-982e-544f489ca039.htm
DataSource #SalesLine
DataField #ItemPBAId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Project
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/CD4083CC-514E-45D1-B771-5DC4D590DBD3.htm
Caption #@SYS4534
DataSource #SalesLine
DataGroup #SalesOrderProject
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Project_ProjId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2aae8d7a-985a-4311-91a4-0ee89f38031d.htm
DataSource #SalesLine
DataField #ProjId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Project_ProjCategoryId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/8f3fc4b3-3551-49a3-ab82-4f9bb16688f8.htm
DataSource #SalesLine
DataField #ProjCategoryId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Project_ProjTransId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/ba46da06-423e-4465-98c4-6969eacec835.htm
DataSource #SalesLine
DataField #ProjTransId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Project_ActivityNumber
DataSource #SalesLine
DataField #ActivityNumber
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Packagingmaterial
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/C1D45264-9966-459E-B29C-853AA6857988.htm
ConfigurationKey #InventPackaging
DataSource #SalesLine
DataGroup #PackagingMaterial
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabLineDimension
AutoDeclaration #Yes
Caption #@SYS14926
DataSource #SalesLine
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #SalesLineDimensionGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/e3432930-c481-4a79-a7da-d62033dce4a9.htm
DataSource #SalesLine
DataGroup #Dimension
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #InventoryDimensions
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/FBBCE417-C0A7-4575-8A69-9A8BC05180AB.htm
DataSource #InventDim
DataGroup #InventoryDimensions
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL STATICTEXT
PROPERTIES
Name #StaticText
AutoDeclaration #Yes
Visible #No
BackgroundColor #Window background
ForegroundColor #Disabled text
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL BUTTONGROUP
PROPERTIES
Name #ButtonLine
AutoDeclaration #Yes
DataSource #SalesLine
ENDPROPERTIES
CONTAINER
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonLineSetup
AutoDeclaration #Yes
HelpText #@SYS69478
Text #@SYS2186
SaveRecord #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# buttonMarkupTransLine.enabled(salesLine.markupAllowed());
#
# super();
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ButtonMarkupTransLine
AutoDeclaration #Yes
MenuItemName #MarkupTrans_LineSales
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #LineTaxTransSource
MenuItemName #TaxTransSource
DataSource #SalesLine
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# ;
# element.automaticTotalDiscount();
# SalesTotals::showTaxLine(salesTable,salesLine,element);
#}
#
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #LineAddress
AutoDeclaration #Yes
Left #Right edge
ConfigurationKey #TradeMultiShipTo
MenuItemName #AddressSelect
DataSource #SalesLine
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#public void clicked()
#{
# ;
#
# super();
#
# // Shipping module
# shipCarrierAddress_ds.reread();
# shipCarrierAddress_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonLineFunction
AutoDeclaration #Yes
HelpText #@SYS69510
Text #@SYS10340
SaveRecord #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# boolean creditInvoicing = true;
# ;
# buttonLineExpandBOM.enabled(salesLine.RecId && !salesLine.deliveredInTotal());
# copyLine.enabled(salesLine.RecId);
#
# if (CustParameters::find().CreditInvoicing
# && (salesTable.SalesStatus == SalesStatus::Invoiced
# || salesTable.ProjId)
# || !salesLine)
# {
# creditInvoicing = false;
# }
#
# buttonCustVendCreditInvoicingHeader.enabled(creditInvoicing);
# buttonCustVendCreditInvoicingLines.enabled(creditInvoicing);
#
# super();
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesCopyAllLines
MenuItemName #SalesCopyAllLines
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesCopyJournalLines
MenuItemName #SalesCopyJournalLines
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CopyLine
AutoDeclaration #Yes
SaveRecord #No
MenuItemName #SalesLineCopy
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineFunction_Separator1
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #buttonLineExpandBOM
AutoDeclaration #Yes
HelpText #@SYS68930
ConfigurationKey #BOM
Text #@SYS12988
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# Args args = new Args();
# FormRun bomListExpandSales;
# SalesLine _salesLine;
# ;
#
# if (!salesLine.inventTable().inventItemType().canHaveBOM())
# throw error("@SYS2069");
#
# args.name(formstr(BOMExpandSales));
# args.caller(this);
# args.record(salesLine);
# bomListExpandSales = classfactory.formRunClass(args);
#
# bomListExpandSales.run();
# bomListExpandSales.wait();
#
# _salesLine.data(salesLine.data());
# salesLine_ds.executeQuery();
# salesLine_ds.findRecord(_salesLine);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesCreditNoteLines
MenuItemName #SalesCreditNoteLines
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ButtonLineQuickQuote
AutoDeclaration #Yes
Left #Auto (right)
MenuItemName #SalesQuickQuote
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineFunction_Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesUpdateRemain
AutoDeclaration #Yes
MenuItemName #SalesUpdateRemain
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineFunction_Separator3
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonCustVendCreditInvoicingLines
AutoDeclaration #Yes
Visible #No
MenuItemName #CustVendCreditInvoicing
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonLineInquiry
AutoDeclaration #Yes
HelpText #@SYS69505
Text #@SYS3850
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# InventItemType inventItemType = salesLine.ItemId ? salesLine.inventTable().inventItemType() : null;
#
# boolean canHaveBOM = inventItemType ? inventItemType.canHaveBOM() : false;
# boolean canBeProduced = inventItemType ? inventItemType.canBeProduced() : false;
#
# SalesTableType localSalesTableType = salesTable.type();;
#
# buttonLineProduction.enabled (localSalesTableType.showProductionMenu() && canBeProduced);
# buttonLineExplosion.enabled (localSalesTableType.canExplosionBeExecuted());
# bomConsistOfTree.enabled (canHaveBOM);
# super();
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ReqTransNet
MenuItemName #ReqTransNet
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonLineExplosion
AutoDeclaration #Yes
MenuItemName #ReqTransExplosion
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonInventSupply
MenuItemName #inventSupply
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineInquiry_Separator1
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #linePriceDiscActual
MenuItemName #priceDiscActual
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesATP
MenuItemName #SalesATP
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineInquiry_Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #BOMConsistOfTree
AutoDeclaration #Yes
MenuItemName #BOMConsistOfTree
ENDPROPERTIES
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #buttonLineProduction
AutoDeclaration #Yes
HelpText #@SYS28807
ConfigurationKey #Prod
SecurityKey #ProdDaily
Text #@SYS4398
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# ;
# salesLine.type().formProduction(element);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineInquiry_Separator3
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ButtonAttachedSalesLines
AutoDeclaration #Yes
HelpText #@SYS101270
Text #@SYS59930
MenuItemName #SalesLine
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineInquiry_Separator4
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #LineInquiry_CostControlCommittedCost
AutoDeclaration #Yes
AllowEdit #No
SaveRecord #No
MenuItemName #costcontrolCommittedCost
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineInquiry_Separator5
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventNonConformanceTableLine
AutoDeclaration #Yes
MenuItemName #InventNonConformanceTable
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventQualityOrderTableLine
AutoDeclaration #Yes
MenuItemName #InventQualityOrderTable
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventTestCertOfAnalysisTable
AutoDeclaration #Yes
MenuItemName #InventTestCertOfAnalysisTable
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonLinePriceCalc
AutoDeclaration #Yes
HelpText #@SYS69511
Text #@SYS7895
SaveRecord #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# bomPriceCalc.enabled(salesLine.inventTable().inventItemType().canHaveBOM());
#
# super();
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL BUTTON
PROPERTIES
Name #MultiLnDisc
HelpText #@SYS68933
ConfigurationKey #PriceDisc
Text #@SYS11440
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# ;
# element.automaticTotalDiscount();
# super();
#
# salesTable.updateMultiLineDisc();
# salesLine_ds.executeQuery();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #buttonLineEndDisc
HelpText #@SYS68934
ConfigurationKey #PriceDisc
Text #@SYS6465
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#public void clicked()
#{
# super();
#
# salesTable.updateFinalDisc();
#
# salesTable_ds.reread();
# salesTable_ds.refresh();
#
# //This will trigger the creditlimit calculation when salesTable.validateWrite is called
# salesTable_ds.setTouched();
#
#}
#
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SuppItemCalc_Sales
MenuItemType #Action
MenuItemName #SuppItemCalc_Sales
DataSource #SalesTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# ;
# element.automaticTotalDiscount();
# super();
# //This will trigger the creditlimit calculation when salesTable.validateWrite is called
# salesTable_ds.setTouched();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #BOMPriceCalc
AutoDeclaration #Yes
Enabled #No
MenuItemName #BOMCalcTableSales
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonLineInventory
AutoDeclaration #Yes
HelpText #@SYS69645
Text #@SYS981
SaveRecord #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# SalesTableType menuSalesTableType = salesTable.type();
# boolean returnItem = salesTable.returnItem();
# ;
#
# buttonLineInventTrans.enabled (menuSalesTableType.inventTransactInvoke());
# buttonLineInventOnHand.enabled (menuSalesTableType.inventOnHandInvoke());
# buttonLineInventLot.enabled (menuSalesTableType.inventLotInvoke());
# buttonLineInventReservation.enabled (menuSalesTableType.inventReservationInvoke());
#
# buttonLineInventMarking.enabled(!returnItem);
# inventTransRegister.enabled(!returnItem);
#
# buttonLineInventMarking.enabled(!returnItem);
# inventTransPick.enabled(!(returnItem && salesLine.SalesQty < 0) && salesLine.DeliveryType == TradeLineDlvType::None);
# wmsOrderAllowCreate.enabled(!returnItem && salesLine.DeliveryType == TradeLineDlvType::None);
# inventTransRegister.enabled(!returnItem);
#
# super();
#}
#
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonLineInventTrans
AutoDeclaration #Yes
MenuItemName #InventTrans
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonLineInventOnHand
AutoDeclaration #Yes
MenuItemName #InventOnhand
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonLineInventLot
AutoDeclaration #Yes
MenuItemName #InventLot
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventDimTracking
MenuItemName #InventDimTracking
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineInventory_Separator1
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonLineInventReservation
AutoDeclaration #Yes
MenuItemName #InventReserve
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #buttonLineInventMarking
AutoDeclaration #Yes
MenuItemName #InventMarking
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineInventory_Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventTransRegister
AutoDeclaration #Yes
MenuItemName #InventTransRegister
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventTransPick
AutoDeclaration #Yes
MenuItemName #InventTransPick
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineInventory_Separator3
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #WMSOrderAllowCreate
AutoDeclaration #Yes
MenuItemName #WMSOrderAllowCreate
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #LineInventory_Separator4
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventDimParmFixed
SaveRecord #No
MenuItemName #InventDimParmFixed
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #ButtonLineInterCompany
AutoDeclaration #Yes
HelpText #@SYS94420
ConfigurationKey #TradeInterCompany
Text #@SYS74106
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{;
# if (salesLine.DeliveryType == TradeLineDlvType::None
# && salesLine.InventRefTransId
# && salesLine.interCompanySalesLineExist())
# interCompanyRemoveMarking.enabled(true);
# else
# interCompanyRemoveMarking.enabled(false);
#
# super();
#
#}
#
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventOnhandInterCompany
AutoDeclaration #Yes
MenuItemName #InventOnhandInterCompany
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #ButtonLineIntercompany_Separator
ENDPROPERTIES
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #InterCompanyRemoveMarking
AutoDeclaration #Yes
HelpText #@SYS94561
Text #@SYS67038
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# super();
#
# TradeInterCompany::removeMarking(salesLine,element);
#}
#
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #PBAExecute
AutoDeclaration #Yes
HelpText #@SYS40755
ConfigurationKey #PBA_ProductBuilder
Text #@SYS40223
SaveRecord #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# element.pbaConfigureLine();
#}
#
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #Configuration
AutoDeclaration #Yes
HelpText #@SYS87115
Text #@SYS40116
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #PBAConfiguratedItem
MenuItemType #Output
MenuItemName #PBAConfiguratedItem
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #PBAPrintGraphic
MenuItemType #Output
MenuItemName #PBAPrintGraphicSalesTable
DataSource #SalesLine
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDDESIGN
ENDFORM
***Element: FRM
; Microsoft Dynamics AX Forms unloaded
; --------------------------------------------------------------------------------
FRMVERSION 5
FORM #SalesCreateOrder
PROPERTIES
Name #SalesCreateOrder
ENDPROPERTIES
METHODS
Version: 3
SOURCE #ClassDeclaration
#class FormRun extends ObjectRun
#{
# SalesTableType salesTableType;
# SalesTableForm salesTableForm;
#
# SalesCreateOrderForm salesCreateOrderForm;
#
# SalesShippingDateConfirmed shippingDateConfirmed;
# SalesShippingDateRequested shippingDateRequested;
# SalesReceiptDateConfirmed receiptDateConfirmed;
# SalesReceiptDateRequested receiptDateRequested;
# SalesDeliveryDateControlType deliveryDateControl;
# boolean replacementOrder;
#
# CustTable fromCustTable;
# Address fromTPAddress;
# boolean copyTPAddress;
#
#// Please notice
#// This control SalesTable_contactPersonId is hitten in the form, but must be avalible
#// in order to make it possible to have lookup on contact-NAMe
#}
#
ENDSOURCE
SOURCE #modifyFormReturn
#void modifyFormReturn()
#{;
# salesTable_ds.object(fieldnum(SalesTable, ReturnItemNum)).mandatory(true);
#
# salesTable_ds.object(fieldnum(SalesTable, OneTimeCustomer)).visible(false);
# salesTable_ds.object(fieldnum(SalesTable, EnterpriseNumber)).visible(false);
# salesTable_ds.object(fieldnum(SalesTable, ReceiptDateRequested)).visible(false);
#
# salesTable_ds.object(fieldnum(SalesTable, ShippingDateRequested)).visible(false);
# salesTable_ds.object(fieldnum(SalesTable, DlvMode)).visible(false);
# salesTable_ds.object(fieldnum(SalesTable, DeliveryDateControlType)).visible(false);
#
# salesTable_SalesType.visible(false);
# confirmDates.visible(false);
# groupTimeZone.visible(false);
#
# salesAvailableDlvDates.visible(false);
# groupDeliveryAddress.visible(false);
# deliveryAddition.visible(false);
# salesTable_ds.object(fieldnum(SalesTable, DlvMode)).mandatory(false);
#}
ENDSOURCE
SOURCE #getInitialValuesDeliveryDate
#container getInitialValuesDeliveryDate()
#{;
# return [shippingDateConfirmed,
# shippingDateRequested,
# receiptDateConfirmed,
# receiptDateRequested,
# deliveryDateControl];
#}
ENDSOURCE
SOURCE #setInitialValuesDeliveryDate
#void setInitialValuesDeliveryDate()
#{;
# shippingDateConfirmed = salesTable.ShippingDateConfirmed;
# shippingDateRequested = salesTable.ShippingDateRequested;
# receiptDateConfirmed = salesTable.ReceiptDateConfirmed;
# receiptDateRequested = salesTable.ReceiptDateRequested;
# deliveryDateControl = salesTable.DeliveryDateControlType;
#}
ENDSOURCE
SOURCE #canClose
#public boolean canClose()
#{
# boolean ret;
# ;
#
# ret = super();
#
# if (ret && element.closedOk())
# {
# ret = salesTable.checkAndUpdateAvailableDlvDates();
#
# if (salesTableForm.replacementOrder() && salesTableForm.returnItemNum())
# {
# // update return order with replacement information
# SalesTable::returnUpdateReplacement(salesTableForm.returnItemNum(), salesTable.SalesId);
# }
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #closeCancel
#public void closeCancel()
#{;
# if (salesTable.OneTimeCustomer && salesTable.CustAccount && !salesTable.RecId)
# {
# CustTable::deleteOneTimeAccount(salesTable.CustAccount);
# }
#
# super();
#}
ENDSOURCE
SOURCE #close
#public void close()
#{
# ;
#
# if (salesTableType)
# {
# salesTableType.formMethodClose();
# }
#
# super();
#}
ENDSOURCE
SOURCE #Run
#void run()
#{
# salesTable_ds.create();
# element.modifyForm();
#
# super();
#
# if (!salesTableForm.replacementOrder())
# {
# salesTable_ds.lookUpCustAccount();
# }
# else
# {
# salesTable.initFromCustTable();
# salesTable_InvoiceAccount.setFocus();
# }
#
# if (!salesTableType)
# {
# element.close();
# throw Exception::Error;
# }
#}
#
ENDSOURCE
SOURCE #Init
#void init()
#{
# SalesTable salesTableLocal;
# ;
# super();
#
# if (!element.args().caller())
# {
# throw error("@SYS22539");
# }
#
# salesTableForm = element.args().caller();
# salesCreateOrderForm = SalesCreateOrderForm::construct(salesTableForm.defaultSalesType(), salesTableForm.project());
#
# if (salesTableForm.replacementOrder()
# && salesTableForm.returnItemNum())
# {
# select firstonly salesTableLocal
# where salesTableLocal.ReturnItemNum == salesTableForm.returnItemNum()
# && salesTableLocal.SalesType == SalesType::ReturnItem;
#
# if (salesTableLocal
# && salesTableLocal.isInterCompanyOrder()
# && salesTableLocal.InterCompanyDirectDeliveryOrig)
# {
# error("@SYS120349");
# element.close();
# }
# }
#
# if (salesTableForm.parmReturnStatus() == ReturnStatusHeader::Created)
# {
# // Create return order
# element.design().caption("@SYS104102");
# }
#
# TaxVATNumTable::enableLookupVATNum(salesTable_VATNum);
#
# if (salesTableForm.project())
# {
# salesTable_ProjId.mandatory(true);
# }
#}
ENDSOURCE
SOURCE #modifyForm
#void modifyForm()
#{
# boolean showReturnItemFields = salesCreateOrderForm.showReturnItemNum();
# ;
#
# element.lock();
#
# salesTable_ds.object(fieldnum(SalesTable, ReturnItemNum)).visible(showReturnItemFields);
# salesTable_ds.object(fieldnum(SalesTable, ReturnDeadline)).visible(showReturnItemFields);
# salesTable_ds.object(fieldnum(SalesTable, ReturnReasonCodeId)).visible(showReturnItemFields);
#
# salesTable_ds.object(fieldnum(SalesTable, SalesId)).allowEdit(salesCreateOrderForm.editSalesId());
# salesTable_ds.object(fieldnum(SalesTable, SalesId)).skip(!salesCreateOrderForm.editSalesId());
#
# salesTable_ds.object(fieldnum(SalesTable, InvoiceAccount)).allowEdit(salesCreateOrderForm.editInvoiceAccount());
# salesTable_ds.object(fieldnum(SalesTable, InvoiceAccount)).skip(!salesCreateOrderForm.editInvoiceAccount());
#
# salesTable_ds.object(fieldnum(SalesTable, ProjId)).visible(salesCreateOrderForm.showProjId());
#
# salesTable_ds.object(fieldnum(SalesTable, ProjId)).allowEdit(salesCreateOrderForm.editProjId(salesTableForm.projId()));
# salesTable_ds.object(fieldnum(SalesTable, ProjId)).skip(!salesCreateOrderForm.editProjId(salesTableForm.projId()));
#
# salesTable_ds.object(fieldnum(SalesTable, CustAccount)).allowEdit(salesCreateOrderForm.editCustomer());
# salesTable_ds.object(fieldnum(SalesTable, CustAccount)).skip(!salesCreateOrderForm.editCustomer());
#
# salesTable_ds.object(fieldnum(SalesTable, LanguageId)).allowEdit(salesCreateOrderForm.editLanguage());
# salesTable_ds.object(fieldnum(SalesTable, LanguageId)).skip(!salesCreateOrderForm.editLanguage());
#
# salesTable_ds.object(fieldnum(SalesTable, SalesType)).allowEdit(salesTableForm.editSalesType() && salesTableType.editSalesType());
# salesTable_ds.object(fieldnum(SalesTable, SalesType)).skip(!(salesTableForm.editSalesType() && salesTableType.editSalesType()));
#
# salesTable_SalesType.allowEdit(salesTableForm.editSalesType() && salesTableType.editSalesType());
# salesTable_SalesType.skip(!(salesTableForm.editSalesType() && salesTableType.editSalesType()));
#
# salesTable_ds.object(fieldnum(SalesTable, vatNum)).visible(salesCreateOrderForm.showVATNum());
#
# salesTable_ds.object(fieldnum(SalesTable, PurchOrderFormNum)).visible(salesCreateOrderForm.showPurchOrderFormNum());
# salesTable_ds.object(fieldnum(SalesTable, CustomerRef)).visible(salesCreateOrderForm.showCustomerRef());
#
# salesTable_ds.object(fieldnum(SalesTable, DlvMode)).mandatory(salesTable.dlvModeMandatory());
#
# if (salesTable.ReturnStatus == ReturnStatusHeader::Created)
# {
# element.modifyFormReturn();
# }
#
# copyRMALines.visible(salesTableForm.replacementOrder());
# copyRMALines.value(salesTableForm.replacementOrder());
#
# salesTable_ds.object(fieldnum(SalesTable, CustAccount)).enabled(!salesTableForm.replacementOrder());
# salesTable_ds.object(fieldnum(SalesTable, InvoiceAccount)).enabled(!salesTableForm.replacementOrder());
#
# salesTable_ds.object(fieldnum(SalesTable,OneTimeCustomer)).visible(!salesTableForm.replacementOrder() && !salesTable.ReturnStatus == ReturnStatusHeader::Created);
#
#
#
# element.unLock();
#}
#
ENDSOURCE
SOURCE #ChangeType
#void changeType(SalesType _salesType)
#{
# NumberSeqFormHandler numberSeqFormHandlerSalesId
# ;
#
# if (salesTableType)
# {
# numberSeqFormHandlerSalesId = salesTableType.parmNumberSeqFormHandlerSalesId();
# salesTableType.formMethodSalesTypeModifiedPreChange(element, salesTable_ds);
# }
#
# salesCreateOrderForm = SalesCreateOrderForm::construct(_salesType,salesTableForm.project());
# salesCreateOrderForm.parmReturnStatus(salesTableForm.parmReturnStatus());
# salesTableType = salesTable.type();
# salesTableType.parmNumberSeqFormHandlerSalesId(numberSeqFormHandlerSalesId);
# salesTableType.formMethodSalesTypeModifiedPostChange(element,salesTable_ds);
#}
ENDSOURCE
ENDMETHODS
OBJECTBANK
PROPERTIES
ENDPROPERTIES
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #SalesTable
Table #SalesTable
AllowDelete #No
AutoSearch #No
AutoNotify #No
AutoQuery #No
LinkType #Passive
DelayActive #No
InsertAtEnd #No
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD CustAccount
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#public void modified()
#{
# ;
#
# super();
#
# element.setInitialValuesDeliveryDate();
#
# if (salesTable.CustAccount)
# {
# salesTable_ds.object(fieldnum(SalesTable, OneTimeCustomer)).allowEdit(false);
# salesTable_ds.object(fieldnum(SalesTable, OneTimeCustomer)).skip(true);
# }
# else
# {
# salesTable_ds.object(fieldnum(SalesTable, OneTimeCustomer)).allowEdit(true);
# salesTable_ds.object(fieldnum(SalesTable, OneTimeCustomer)).skip(false);
# }
#
# groupInterCompany.enabled(salesTable.custTable_CustAccount().interCompanyAccountExist());
# salesTable_ds.object(fieldnum(SalesTable, DlvMode)).mandatory(salesTable.dlvModeMandatory());
#
# salesTable_ds.refresh();
#
# fromCustTable = salesTable.custTable_CustAccount();
# fromTPAddress = Address::find(fromCustTable.TableId, fromCustTable.RecId, AddressType::ShipCarrierThirdPartyShipping);
# if (salesTable.ShipCarrierAccount == fromTPAddress.ShipCarrierAccount &&
# salesTable.ShipCarrierAccountCode == fromTPAddress.ShipCarrierAccountCode &&
# salesTable.ShipCarrierId == fromTPAddress.ShipCarrierId &&
# salesTable.DlvTerm == fromTPAddress.DlvTerm &&
# salesTable.DlvMode == fromTPAddress.DlvMode)
# {
# copyTPAddress = true;
# }
# else
# {
# copyTPAddress = false;
# }
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InvoiceAccount
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{;
# super();
#
# salesTable_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD OneTimeCustomer
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# if (salesTable.OneTimeCustomer && !salesTable.CustAccount)
# {
# salesTable_ds.object(fieldnum(SalesTable, OneTimeCustomer)).allowEdit(false);
# salesTable_ds.object(fieldnum(SalesTable, OneTimeCustomer)).skip(true);
# salesTable_custAccount.setFocus();
# }
#
# salesTable_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ContactPersonId
PROPERTIES
Visible #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{;
# super();
# salesTable_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD ProjId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
# salesTable_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InterCompanyOrder
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD VATNum
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{;
# if (TaxVATNumTable::taxVATNumTableEnabled())
# TaxVATNumTable::lookupVATNum(salesTable_VATNum, salesTable);
# else
# super(_formControl, _filterStr);
#}
ENDSOURCE
SOURCE #jumpRef
#public void jumpRef()
#{
# if (TaxVATNumTable::taxVATNumTableEnabled())
# TaxVATNumTable::jumpRefVATNum(salesTable, element);
# else
# super();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD Payment
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# salesTable_ds.object(fieldnum(SalesTable, DlvMode)).mandatory(salesTable.dlvModeMandatory());
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD InterCompanyOrigin
PROPERTIES
Visible #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD InventLocationId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{
# if (salesTable.InventSiteId)
# {
# InventLocation::lookupBySiteIdAllTypes(_formControl, salesTable.InventSiteId);
# }
# else
# {
# super(_formControl, _filterStr);
# }
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #reread
#public void reread()
#{;
# if (salesTable.RecId)
# {
# super();
# }
#}
ENDSOURCE
SOURCE #lookUpCustAccount
#void lookUpCustAccount()
#{
# if (salesTableType)
# {
# if (salesCreateOrderForm.lookupCustAccount())
# {
# salesTable_custAccount.setFocus();
# salesTable_custAccount.lookup();
# }
# }
#}
ENDSOURCE
SOURCE #WRITE
#void write()
#{
# ;
#
# if (!element.closedOk())
# return;
#
# try
# {
# ttsbegin;
# salesTableType.formMethodDataSourceWrite(element, salesTable_ds);
# if (salesTable.ProjId)
# {
# salesTable.initFromProjInvoiceTable();
# }
# salesTable.insert();
#
# if (salesTableForm.replacementOrder())
# {
# salesTable.copyRMALines(SalesTable::findReturnItemNum(salesTable.ReturnItemNum), copyRMALines.value());
# }
#
# if (copyTPAddress && fromTPAddress)
# {
# Address::copyThirdPartyAddress(fromTPAddress, salesTable.TableId, salesTable.RecId);
# }
#
# ttscommit;
# }
#
# catch (Exception::Error)
# {
# salesTable.RecId = 0;
# element.close();
# throw Exception::Error;
# }
#
# salesTable_ds.reread();
# salesTable_ds.refresh();
#
# salesTableForm.newSalesId(salesTable.SalesId);
#
# cancel.enabled(false);
#}
#
ENDSOURCE
SOURCE #ValidateWrite
#///
#/// Determines whether the current record is valid and ready to be written to the database.
#///
#///
#/// true if the record is valid; otherwise, false.
#///
#boolean validateWrite()
#{
# boolean ret;
# NoYes noYes;
# ;
#
# ret = super();
#
# noYes = CustParameters::find().ReturnOrdersReasonReq;
#
# if (ret && !salesTable.ReturnReasonCodeId && noYes == NoYes::Yes && salesTable.ReturnStatus == ReturnStatusHeader::Created)
# {
# salesTable_ds.object(fieldnum(SalesTable, ReturnReasonCodeId)).mandatory(true);
# ret = checkFailed(strfmt("@SYS116347", fieldpname(SalesTable,ReturnReasonCodeId)));
# }
#
# if (ret && !salesTable.ReturnItemNum && salesTable.ReturnStatus == ReturnStatusHeader::Created)
# {
# // RMA number must be specified
# ret = checkFailed("@SYS110328");
# }
#
# if (ret && !salesTableType.formMethodDataSourceValidateWrite(element, salesTable_ds))
# {
# ret = false;
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #InitValue
#void initValue()
#{;
# // Set up return status upfront for correct initValue on SalesTable
# salesTable.ReturnStatus = salesTableForm.parmReturnStatus();
# if (salesTable.returnJournal())
# {
# salesTable.SalesType = salesTableForm.defaultSalesType();
# }
#
# super();
#
# salesTableForm.salesTable(salesTable);
# salesTableForm.initValues();
#
# salesTable.SalesTaker = EmplTable::userId2EmplId(curuserid());
#
# element.changeType(salesTable.SalesType);
#}
ENDSOURCE
SOURCE #Create
#void create(boolean append = false)
#{
# if (!salesTable.SalesId)
# {
# super(append);
#
# salesTableType.formMethodDataSourceCreate(element, salesTable_ds);
# }
#}
#
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
ENDOBJECTBANK
JOINS
ENDJOINS
DESIGN
PROPERTIES
Caption #@SYS27579
HideToolbar #Yes
HTMLHelpFile #HTMLHelpFileIWorker
HTMLHelpTopic #AxShared.chm::/html/970e582a-e0c6-45f1-b8fa-ad8c5175866e.htm
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Form
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/EEB2FFC3-DB05-4B79-9D20-36A5BB565294.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #groupCustomer
Width #Column width
VerticalSpacing #5
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/395F3DD5-6B3D-47D5-94C0-E25937445FD4.htm
Caption #@SYS11779
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #groupCopyRMALines
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #copyRMALines
AutoDeclaration #Yes
Label #@SYS105831
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupOneTimeCustomer
Width #Column width
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/66E74812-7D36-4C2A-A857-EFF9518225BC.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #SalesTable_OneTimeCustomer
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/ac3c25e5-0f89-4032-b644-b48e6a205d26.htm
DataSource #SalesTable
DataField #OneTimeCustomer
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupCustomerAccount
Width #Column width
VerticalSpacing #4
FrameType #None
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_CustAccount
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/425cdec7-4603-47f1-87ec-e04f01dac112.htm
DataSource #SalesTable
DataField #CustAccount
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustName
AutoDeclaration #Yes
AllowEdit #No
Width #Column width
Skip #Yes
ShowLabel #No
DataSource #SalesTable
DataMethod #Customername
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupContactPerson
Width #Column width
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/F6A5B645-CB08-4FF4-A789-9DB325CA3B5B.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #editContactPersonName
Width #Column width
LookupButton #Always
DataSource #SalesTable
DataMethod #editContactPersonName
PresenceDataSource #SalesTable
PresenceDataField #ContactPersonId
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#public void jumpRef()
#{
# salesTable_ContactPersonId.jumpRef();
#}
ENDSOURCE
SOURCE #lookup
#void lookup()
#{;
# ContactPerson::lookupCustContactPerson(salesTable_contactPersonId,
# salesTable.CustAccount,
# this,
# salesTable.ContactPersonId);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_ContactPersonId
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/7bec4880-3425-4b18-9fe5-24a622819be5.htm
DataSource #SalesTable
DataField #ContactPersonId
PresenceIndicatorAllowed #No
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupAddressDisplay
Width #Column width
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/11F0ED9C-AB28-4DBC-9575-D3A3E13A0E52.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_DeliveryAddress
AllowEdit #No
Width #Column width
Skip #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/6dd29816-1cff-458b-92e6-865a95f9f262.htm
DataSource #SalesTable
DataField #DeliveryAddress
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupInvoiceAccount
Width #Column width
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/E9A2FFA7-63E1-4E74-8FA6-8CE7BC9CD0D1.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #groupInvoiceName
Width #Column width
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/80BBE927-FA6C-422C-9B04-A4EE149B20F9.htm
FrameType #None
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_InvoiceAccount
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2daf001b-ad19-43e8-82e5-5c5ff27d42d7.htm
DataSource #SalesTable
DataField #InvoiceAccount
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #InvoiceName
AllowEdit #No
Width #Column width
Skip #Yes
ShowLabel #No
DataSource #SalesTable
DataMethod #InvoiceName
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupTax
Width #Column width
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/18506B7B-D3EC-4293-BE53-6A3C37461F01.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_VATNum
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/48b6b1d7-8ec8-46dc-abd7-3e41ed9285c7.htm
DataSource #SalesTable
DataField #VATNum
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_EnterpriseNumber
DataSource #SalesTable
DataField #EnterpriseNumber
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupGeneral
Width #Column width
VerticalSpacing #5
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/627EA555-A47C-4A62-9C86-B8BBE30558B2.htm
Caption #@SYS2952
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #groupSalesType
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/4C7622F7-6BD3-4497-A61F-A091317F9D83.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #groupSalesId
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/FBF510C3-D80B-4F98-8923-594813DE44F5.htm
FrameType #None
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_ReturnItemNum
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/5f76ad6e-11ee-41aa-a499-1040cf2e7f0c.htm
DataSource #SalesTable
DataField #ReturnItemNum
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_SalesId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/e754053b-4d38-4c16-bd5d-4f1d79905cec.htm
DataSource #SalesTable
DataField #SalesId
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #SalesTable_ReturnDeadline
DataSource #SalesTable
DataField #ReturnDeadline
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_ReturnReasonCodeId
DataSource #SalesTable
DataField #ReturnReasonCodeId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_ProjId
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/6764c92e-a502-47f3-87d6-70814832c7b7.htm
DataSource #SalesTable
DataField #ProjId
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #SalesTable_SalesType
AutoDeclaration #Yes
ShowLabel #No
DataSource #SalesTable
DataField #SalesType
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public boolean modified()
#{
# boolean ret;
# ;
#
# if (this.selection() == any2int(SalesType::ItemReq))
# {
# ret = checkFailed("@SYS70032");
# }
# else
# if (this.selection() == any2int(SalesType::ReturnItem))
# {
# // The returned item order type cannot be selected manually.
# ret = checkFailed("@SYS104084");
# }
# else
# {
# ret = super();
#
# element.changeType(this.selection());
# element.lock();
# element.modifyForm();
# element.unLock();
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupInterCompany
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/624CCC52-6EB3-4C2E-8F57-8EA7D8AB332F.htm
FrameType #None
DataSource #SalesTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
DataGroup #Intercompany
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #InterCompany_InterCompanyOrder
HelpText #@SYS75317
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/43b1e20e-a986-46ab-8b25-aaa6915b0e01.htm
DataSource #SalesTable
DataField #InterCompanyOrder
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #InterCompany_InterCompanyCompanyId
Skip #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/bbd43355-af52-4358-83fe-eaf2a4fd9234.htm
LookupButton #Never
ShowLabel #No
DataSource #SalesTable
DataField #InterCompanyCompanyId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #InterCompany_InterCompanyPurchId
Visible #No
DataSource #SalesTable
DataField #InterCompanyPurchId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupSetup
Width #Column width
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2017F28E-ACE4-4EB7-9422-23810867D9D5.htm
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL DATEEDIT
PROPERTIES
Name #SalesTable_ReceiptDateRequested
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/0e73462c-4a10-410c-b077-a859b025f0fb.htm
DataSource #SalesTable
DataField #ReceiptDateRequested
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #SalesTable_ShippingDateRequested
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2fca33d3-de3d-4d1a-9219-ca916886f14a.htm
DataSource #SalesTable
DataField #ShippingDateRequested
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_CurrencyCode
Width #Column width
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/dd0369e4-8f56-48b1-9f51-6d70128ba470.htm
DataSource #SalesTable
DataField #CurrencyCode
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_DlvMode
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/693846b3-d6c0-4b10-b8d8-257e31c2e61a.htm
DataSource #SalesTable
DataField #DlvMode
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_InventSiteId
Visible #No
DataSource #SalesTable
DataField #InventSiteId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_InventLocationId
Visible #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/ec0717eb-1808-44a2-87fa-cee4c04398aa.htm
DataSource #SalesTable
DataField #InventLocationId
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #SalesTable_DeliveryDateControl
DataSource #SalesTable
DataField #DeliveryDateControlType
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #ConfirmDates
AutoDeclaration #Yes
HelpText #@SYS88274
Label #@SYS88276
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public boolean modified()
#{
# boolean ret;
#
# ret = super();
#
# if (this.value() == NoYes::Yes)
# {
# salesTable.ReceiptDateConfirmed = salesTable.ReceiptDateRequested;
# salesTAble.ShippingDateConfirmed = salesTAble.ShippingDateRequested;
# }
# else
# {
# salesTable.ReceiptDateConfirmed = dateNull();
# salesTAble.ShippingDateConfirmed = dateNull();
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL BUTTONGROUP
PROPERTIES
Name #ButtonGroupSetup
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesAvailableDlvDates
AutoDeclaration #Yes
SaveRecord #No
MenuItemType #Action
MenuItemName #SalesAvailableDlvDates
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_PaymMode
AutoDeclaration #Yes
DataSource #SalesTable
DataField #PaymMode
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupTimeZone
AutoDeclaration #Yes
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL COMBOBOX
PROPERTIES
Name #SalesTable_TimeZoneSite
AllowEdit #No
HelpText #@SYS110100
Label #@SYS110097
DataSource #SalesTable
DataMethod #timeZoneSite
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupReferences
Visible #No
Width #Column width
VerticalSpacing #5
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/B563E290-AB92-4BD2-805C-0BEC40784C4A.htm
Caption #@SYS14018
DataSource #SalesTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_PurchOrderFormNum
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/c04980ac-25c8-4b76-b3aa-93838fe94203.htm
DisplayLength #20
DataSource #SalesTable
DataField #PurchOrderFormNum
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTable_CustomerRef
Width #Column width
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/4fea5c5e-3d35-4665-bb0c-342f3d4b98bf.htm
DisplayLength #20
Label #@SYS15217
DataSource #SalesTable
DataField #CustomerRef
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupDeliveryAddress
AutoDeclaration #Yes
Width #Column width
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2E2E172C-6B7C-4DBD-A2D2-BF80CE83A757.htm
Caption #@SYS7924
FrameOptionButton #Hide
OptionValue #0
DataSource #SalesTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #groupAddress_DeliveryName
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/73f6caf8-39da-4871-9cb3-16396193aa61.htm
DataSource #SalesTable
DataField #DeliveryName
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #groupAddress_DeliveryStreet
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/81c10249-df4a-4858-9999-d00be5f5053f.htm
DataSource #SalesTable
DataField #DeliveryStreet
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #groupAddress_DeliveryCity
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/4a5a97b6-b660-48d1-b484-712fa51ba9db.htm
DataSource #SalesTable
DataField #DeliveryCity
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #groupAddress_DeliveryCounty
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/245e0a13-9c02-431c-a0c1-d5cec8f2f5ad.htm
DataSource #SalesTable
DataField #DeliveryCounty
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #groupAddress_DeliveryState
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/8fa25a49-a754-4fb1-9af5-19079fa88044.htm
DataSource #SalesTable
DataField #DeliveryState
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #groupAddress_DeliveryCountry
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/890d9a5d-1b2e-4674-8526-8321b04ee8e3.htm
DataSource #SalesTable
DataField #DeliveryCountryRegionId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #groupDeliveryAddress_DeliveryZipCode
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/a217bf27-4fc2-4919-b471-acd0b988b102.htm
DataSource #SalesTable
DataField #DeliveryZipCode
ENDPROPERTIES
ENDCONTROL
CONTROL BUTTONGROUP
PROPERTIES
Name #ButtonGroupAddress
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Address
SaveRecord #No
MenuItemName #AddressSelect
DataSource #SalesTable
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #groupDeliveryAddress_DeliveryContact
DataSource #SalesTable
DataField #ShipCarrierDeliveryContact
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #DeliveryAddition
AutoDeclaration #Yes
Width #Column width
VerticalSpacing #4
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2E2E172C-6B7C-4DBD-A2D2-BF80CE83A757.htm
ConfigurationKey #ShipCarrier
FrameOptionButton #Hide
OptionValue #0
DataSource #SalesTable
Columns #3
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
DataGroup #DeliveryAddition
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #groupAdministration
AutoDeclaration #Yes
Width #Column width
VerticalSpacing #5
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/6BE3BCBD-5526-4525-801E-02B8A7997F82.htm
FrameOptionButton #Hide
OptionValue #0
DataSource #SalesTable
Columns #Auto
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
ENDARRAY
DataGroup #Administration
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Administration_SalesTaker
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/3c542927-bd4a-411e-a3fb-24162132c096.htm
DataSource #SalesTable
DataField #SalesTaker
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Administration_SalesPoolId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/b4303fd1-f870-4bb4-8245-f16f8b291729.htm
DataSource #SalesTable
DataField #SalesPoolId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Administration_LanguageId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/3be83a80-04cf-403b-b5f7-72db93883fdb.htm
DataSource #SalesTable
DataField #LanguageId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Administration_SalesOriginId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/dc3addc4-ae12-49a8-911a-8402cf46ce6c.htm
DataSource #SalesTable
DataField #SalesOriginId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #groupAdministration_SalesUnitId
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/052cd3ed-238f-42c4-b96c-d4cab6a5d62a.htm
DataSource #SalesTable
DataField #SalesUnitId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #groupAdministration_SalesResponsible
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/da4f3ae2-9421-418a-bca8-f8c18276722f.htm
DataSource #SalesTable
DataField #SalesResponsible
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL BUTTONGROUP
PROPERTIES
Name #ButtonGroup
Left #Auto (right)
Top #Bottom edge
ArrangeMethod #Horizontal, flush right
ENDPROPERTIES
CONTAINER
CONTROL COMMANDBUTTON
PROPERTIES
Name #OK
Command #263
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# ;
#
# if (salesTable_ds.validateWrite())
# super();
#
#
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL COMMANDBUTTON
PROPERTIES
Name #Cancel
AutoDeclaration #Yes
SaveRecord #No
Command #264
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDDESIGN
ENDFORM
***Element: FRM
; Microsoft Dynamics AX Forms unloaded
; --------------------------------------------------------------------------------
FRMVERSION 5
FORM #CGranCreateItem
PROPERTIES
Name #CGranCreateItem
ENDPROPERTIES
METHODS
Version: 3
SOURCE #CGranCreateBOMVersion
#//CarlosGranados
#//Creo el registro en la tabla BOMVersion
#void CGranCreateBOMVersion() {
#
# BOMVersion bomVersion;
# ;
# //CarlosG:Creo un vencimiento
# if (LMAT.value() == 1) {
# bomVersion.ItemId = ItemId.valueStr() +'L';
# bomVersion.BOMId = ItemId.valueStr() + '-1V';
# bomVersion.Name = 'VENCIMIENTO DE 1 VEZ';
# bomVersion.Active = NoYes::Yes;
# bomVersion.Approved = NoYes::Yes;
# bomVersion.ApprovedBy = SysCompanyUserInfo::current().EmplId;
# bomVersion.Construction = NoYes::No;
# bomVersion.InventDimId = 'AllBlank';
# bomVersion.insert();
# //END un vencimiento
#
#
# //CarlosG:Creo tres vencimientos
# bomVersion.ItemId = ItemId.valueStr() +'L';
# bomVersion.BOMId = ItemId.valueStr() + '-3V';
# bomVersion.Name = 'VENCIMIENTO DE 3 VECES';
# bomVersion.Active = NoYes::No;
# bomVersion.Approved = NoYes::Yes;
# bomVersion.ApprovedBy = SysCompanyUserInfo::current().EmplId;
# bomVersion.Construction = NoYes::No;
# bomVersion.InventDimId = 'AllBlank';
# bomVersion.insert();
# //END tres vencimientos
# }
#}
ENDSOURCE
SOURCE #CGranCreateConfigTable
#// CarlosGranados
#// Creo los registros necesarios en la configTable
#void CGranCreateConfigTable() {
#
# ConfigTable configTable,configTableAux,config;
# LineNum numLines;
# ;
# while select configId from configTable
# group by configId {
#
# select firstonly config
# where (config.ConfigId == configTable.ConfigId);
# configTableAux.ConfigId = configTable.ConfigId;
# configTableAux.ItemId = ItemId.valueStr();
# configTableAux.Name = config.Name;
# configTableAux.Autogenerated = NoYes::No;
# configTableAux.insert();
# numLines ++;
# }
#
#
#}
ENDSOURCE
SOURCE #CGranCreateBOMTable
#//CarlosGranados: Creo registros correspondientes a la tabla BOMTable
#void CGranCreateBOMTable() {
#
# BOMTable bomTable;
# ;
# if (LMAT.value() == 1) {
# //CarlosG:Genero 1 vencimiento
# bomTable.BOMId = ItemId.valueStr() +'-1V';
# bomTable.Name = 'VENCIMIENTO DE 1 VEZ';
# bomTable.ItemGroupId = 'LMAT';
# bomTable.CheckBOM = NoYes::Yes;
# bomTable.ApprovedBy = SysCompanyUserInfo::current().EmplId;
# bomTable.Approved = NoYes::Yes;
# bomTable.insert();
# //END CarlosG 1 vencimiento
#
#
# //CarlosG:Genero 3 vencimientos
# bomTable.BOMId = ItemId.valueStr() +'-3V';
# bomTable.Name = 'VENCIMIENTO DE 3 VECES';
# bomTable.ItemGroupId = 'LMAT';
# bomTable.CheckBOM = NoYes::Yes;
# bomTable.ApprovedBy = SysCompanyUserInfo::current().EmplId;
# bomTable.Approved = NoYes::Yes;
# bomTable.insert();
# //END CarlosG 3 vencimientos
# }
#}
ENDSOURCE
SOURCE #CGranCreatePriceDiscTable
#// CarlosGranados
#// Méthod para crear los registros correspondientes a la PriceDiscTable
#void CGranCreatePriceDiscTable() {
#
# PriceDiscTable priceDiscTable;
#
# ;
# priceDiscTable.ItemCode = TableGroupAll::Table;
# priceDiscTable.AccountCode = TableGroupAll::All;
# priceDiscTable.ItemRelation = ItemId.valueStr();
# priceDiscTable.QuantityAmount = 0.00;
# priceDiscTable.FromDate = dateNull();
# priceDiscTable.ToDate = MaxDate();
# priceDiscTable.Amount = Price.realValue();
# priceDiscTable.Currency = 'EUR';
# priceDiscTable.Percent1 = 0.00;
# priceDiscTable.Percent2 = 0.00;
# priceDiscTable.DeliveryTime = 0;
# priceDiscTable.SearchAgain = NoYes::Yes;
# priceDiscTable.PriceUnit = 0.00;
# priceDiscTable.relation = PriceType::PriceSales;
# priceDiscTable.UnitId = 'Pcs.';
# priceDiscTable.Markup = 0.00;
# priceDiscTable.AllocateMarkup = NoYes::No;
# priceDiscTable.Module = ModuleInventCustVend::Cust;
# priceDiscTable.InventDimId = '00000001';
# priceDiscTable.CalendarDays = NoYes::No;
# priceDiscTable.insert();
#
#
#
#
#
#
#
#
#
#
#
#}
ENDSOURCE
SOURCE #CGranCreateInventItemLocation
#// CarlosGranados
#// Creo los registros correspondientes a la tabla inventItemLocation
#void CGranCreateInventItemLocation() {
#
# InventItemLocation inventItemLocation;
# ;
# inventItemLocation.ItemId = ItemId.valueStr();
# inventItemLocation.CountingStarted = NoYes::No;
# inventItemLocation.inventDimId = 'AllBlank';
# inventItemLocation.insert();
#
# //CarlosG:Genero la LMAT
# if (LMAT.value() == 1) {
# inventItemLocation.ItemId = ItemId.valueStr()+'L';
# inventItemLocation.CountingStarted = NoYes::No;
# inventItemLocation.inventDimId = 'AllBlank';
# inventItemLocation.insert();
# }
# //END CarlosG
#
#
#}
ENDSOURCE
SOURCE #CGranCreateInventTableModule
#// Carlos Granados
#// Creo los registros correspondientes a la tabla InventTableModule
#//CarlosGranados:Creo registro en la tabla InventTableModule
#//Para aquellos registros cuyo grupo de artículos es Asignatura
#void CGranCreateInventTableModule() {
#
# InventTableModule inventTableModule;
# ;
# //CarlosG:Inventario
# inventTableModule.ItemId = ItemId.valueStr();
# inventTableModule.ModuleType = ModuleInventPurchSales::Invent;
# inventTableModule.UnitId = 'Pcs.';
# inventTableModule.Price = 0.00;
# inventTableModule.PriceUnit = 1.00;
# inventTableModule.Markup = 0.00;
# inventTableModule.EndDisc = NoYes::Yes;
# inventTableModule.TaxItemGroupId = 'EXENTO';
# inventTableModule.PriceQty = 0.00;
# inventTableModule.AllocateMarkup = NoYes::No;
# inventTableModule.OverDeliveryPct = 0.00;
# inventTableModule.UnderDeliveryPct = 0.00;
# inventTableModule.InterCompanyBlocked = NoYes::No;
# inventTableModule.insert();
# //END CarlosG Inventatio
#
#
# //CarlosG:Pedidos de compra
# inventTableModule.ItemId = ItemId.valueStr();
# inventTableModule.ModuleType = ModuleInventPurchSales::Purch;
# inventTableModule.UnitId = 'Pcs.';
# inventTableModule.Price = 0.00;
# inventTableModule.PriceUnit = 1.00;
# inventTableModule.Markup = 0.00;
# inventTableModule.EndDisc = NoYes::Yes;
# inventTableModule.TaxItemGroupId = 'EXENTO';
# inventTableModule.PriceQty = 0.00;
# inventTableModule.AllocateMarkup = NoYes::No;
# inventTableModule.OverDeliveryPct = 0.00;
# inventTableModule.UnderDeliveryPct = 0.00;
# inventTableModule.InterCompanyBlocked = NoYes::No;
# inventTableModule.insert();
# //END CarlosG Pedidos de compra
#
#
# //CarlosG:Pedidos de venta
# inventTableModule.ItemId = ItemId.valueStr();
# inventTableModule.ModuleType = ModuleInventPurchSales::Sales;
# inventTableModule.UnitId = 'Pcs.';
# inventTableModule.Price = 0.00;
# inventTableModule.PriceUnit = 1.00;
# inventTableModule.Markup = 0.00;
# inventTableModule.EndDisc = NoYes::Yes;
# inventTableModule.TaxItemGroupId = 'EXENTO';
# inventTableModule.PriceQty = 0.00;
# inventTableModule.AllocateMarkup = NoYes::No;
# inventTableModule.OverDeliveryPct = 0.00;
# inventTableModule.UnderDeliveryPct = 0.00;
# inventTableModule.InterCompanyBlocked = NoYes::No;
# inventTableModule.insert();
# //END CarlosG Pedidos de venta
#
#}
ENDSOURCE
SOURCE #CGranCreateInventTable
#// Carlos Granados
#// Creamos el registro correspondiente en la tabla InventTable
#void CGranCreateInventTable() {
#
# InventTable inventTable;
# ;
# //CarlosG:Genero el artículo en inventTable
# inventTable.ItemId = ItemId.valueStr();
# inventTable.ItemGroupId = 'ASIGNATURA';
# inventTable.ItemName = Dimensions::find(SysDimension::Purpose,ItemId.valueStr()).Description;
# //CarlosG:De momento lo hacemos sin contar con el groupId LMAT
# inventTable.ItemType = ItemType::Service;
# //END CarlosG
# inventTable.PurchModel = NoYes::No;
# inventTable.SalesModel = SalesPriceModel::None;
# inventTable.BOMUnitId = 'Pcs.';
# inventTable.Dimension[3] = ItemId.valueStr();
# inventTable.Dimension[1] = Department.valueStr();
# inventTable.CostModel = NoYes::No;
# inventTable.UseAltItemId = ItemNumAlternative::Never;
# inventTable.ProdFlushingPrincip = ProdFlushingPrincipItem::Start;
# inventTable.PBAItemAutoGenerated = NoYes::No;
# //inventTable.WMSArrivalHandlingTime = '00:00';
# inventTable.BOMManualReceipt = NoYes::No;
# inventTable.StopExplode = NoYes::No;
# inventTable.AutoReportFinished = NoYes::No;
# inventTable.ABCTieUp = ABC::None;
# inventTable.ABCRevenue = ABC::None;
# inventTable.ABCValue = ABC::None;
# inventTable.ABCContributionMargin = ABC::None;
# inventTable.Configurable = NoYes::No;
# inventTable.SalesPriceModelBasic = SalesPriceModelBasic::PurchPrice;
# inventTable.NameAlias = Dimensions::find(SysDimension::Purpose,ItemId.valueStr()).Description;
# inventTable.ConfigSimilar = NoYes::No;
# inventTable.DimGroupId = 'CONFIG';
# inventTable.ModelGroupId = 'GENERAL';
# inventTable.ItemDimCombinationAutoCreate = NoYes::No;
# inventTable.ItemDimCostPrice = NoYes::No;
# inventTable.PalletTagging = NoYes::No;
# inventTable.ItemTaggingLevel = RFIDItemTaggingLevel::None;
# inventTable.insert();
# _inventTable = InventTable::find(inventTable.ItemId);
# //END CarlosG
#
#
#
# //CarlosG:Genero LMAT en inventTable
# if (LMAT.value() == 1) {
# inventTable.initValue();
# inventTable.ItemId = ItemId.valueStr()+'L';
# inventTable.ItemGroupId = 'LMAT';
# inventTable.ItemName = Dimensions::find(SysDimension::Purpose,ItemId.valueStr()).Description;
# //CarlosG:De momento lo hacemos sin contar con el groupId LMAT
# inventTable.ItemType = ItemType::BOM;
# //END CarlosG
# inventTable.PurchModel = NoYes::No;
# inventTable.SalesModel = SalesPriceModel::None;
# inventTable.BOMUnitId = 'Pcs.';
# inventTable.Dimension[3] = "";
# inventTable.Dimension[1] = "";
# inventTable.CostModel = NoYes::No;
# inventTable.UseAltItemId = ItemNumAlternative::Never;
# inventTable.ProdFlushingPrincip = ProdFlushingPrincipItem::Start;
# inventTable.PBAItemAutoGenerated = NoYes::No;
# //inventTable.WMSArrivalHandlingTime = '00:00';
# inventTable.BOMManualReceipt = NoYes::No;
# inventTable.StopExplode = NoYes::No;
# inventTable.AutoReportFinished = NoYes::No;
# inventTable.ABCTieUp = ABC::None;
# inventTable.ABCRevenue = ABC::None;
# inventTable.ABCValue = ABC::None;
# inventTable.ABCContributionMargin = ABC::None;
# inventTable.Configurable = NoYes::No;
# inventTable.SalesPriceModelBasic = SalesPriceModelBasic::PurchPrice;
# inventTable.NameAlias = Dimensions::find(SysDimension::Purpose,ItemId.valueStr()).Description;
# inventTable.ConfigSimilar = NoYes::No;
# inventTable.DimGroupId = 'SERVICIO';
# inventTable.ModelGroupId = 'GENERAL';
# inventTable.ItemDimCombinationAutoCreate = NoYes::No;
# inventTable.ItemDimCostPrice = NoYes::No;
# inventTable.PalletTagging = NoYes::No;
# inventTable.ItemTaggingLevel = RFIDItemTaggingLevel::None;
# inventTable.insert();
# _inventTable = InventTable::find(inventTable.ItemId);
# }
#
#
#
#}
ENDSOURCE
SOURCE #CGranCreateInventTableModuleLMAT
#//CarlosGranados: Creo los registros necesarios de la tabla InventTableModule
#void CGranCreateInventTableModuleLMAT() {
#
# InventTableModule inventTableModule;
# ;
# //CarlosG:Inventario
# if (LMAT.value() == 1) {
# inventTableModule.ItemId = ItemId.valueStr()+'L';
# inventTableModule.ModuleType = ModuleInventPurchSales::Invent;
# inventTableModule.UnitId = 'Pcs.';
# inventTableModule.Price = 0.00;
# inventTableModule.PriceUnit = 1.00;
# inventTableModule.Markup = 0.00;
# inventTableModule.EndDisc = NoYes::Yes;
# inventTableModule.TaxItemGroupId = 'EXENTO';
# inventTableModule.PriceQty = 0.00;
# inventTableModule.AllocateMarkup = NoYes::No;
# inventTableModule.OverDeliveryPct = 0.00;
# inventTableModule.UnderDeliveryPct = 0.00;
# inventTableModule.InterCompanyBlocked = NoYes::No;
# inventTableModule.insert();
# //END CarlosG Inventatio
#
#
# //CarlosG:Pedidos de compra
# inventTableModule.ItemId = ItemId.valueStr()+'L';
# inventTableModule.ModuleType = ModuleInventPurchSales::Purch;
# inventTableModule.UnitId = 'Pcs.';
# inventTableModule.Price = 0.00;
# inventTableModule.PriceUnit = 1.00;
# inventTableModule.Markup = 0.00;
# inventTableModule.EndDisc = NoYes::Yes;
# inventTableModule.TaxItemGroupId = 'EXENTO';
# inventTableModule.PriceQty = 0.00;
# inventTableModule.AllocateMarkup = NoYes::No;
# inventTableModule.OverDeliveryPct = 0.00;
# inventTableModule.UnderDeliveryPct = 0.00;
# inventTableModule.InterCompanyBlocked = NoYes::No;
# inventTableModule.insert();
# //END CarlosG Pedidos de compra
#
#
# //CarlosG:Pedidos de venta
# inventTableModule.ItemId = ItemId.valueStr()+'L';
# inventTableModule.ModuleType = ModuleInventPurchSales::Sales;
# inventTableModule.UnitId = 'Pcs.';
# inventTableModule.Price = 0.00;
# inventTableModule.PriceUnit = 1.00;
# inventTableModule.Markup = 0.00;
# inventTableModule.EndDisc = NoYes::Yes;
# inventTableModule.TaxItemGroupId = 'EXENTO';
# inventTableModule.PriceQty = 0.00;
# inventTableModule.AllocateMarkup = NoYes::No;
# inventTableModule.OverDeliveryPct = 0.00;
# inventTableModule.UnderDeliveryPct = 0.00;
# inventTableModule.InterCompanyBlocked = NoYes::No;
# inventTableModule.insert();
# //END CarlosG Pedidos de venta
# }
#
#
#}
ENDSOURCE
SOURCE #init
#//CarlosGranados: Método de inicio del formulario
#public void init()
#{
# ;
# if(element.args().dataset() == tableNum(InventTable)) {
# _inventTable = element.args().record();
# }
#
# super();
#}
ENDSOURCE
SOURCE #classDeclaration
#public class FormRun extends ObjectRun {
#
# InventTable _inventTable;
# boolean _create;
#
#}
ENDSOURCE
ENDMETHODS
OBJECTBANK
PROPERTIES
ENDPROPERTIES
ENDOBJECTBANK
JOINS
ENDJOINS
DESIGN
PROPERTIES
Caption #Creación de artículo
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Group
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #ItemId
AutoDeclaration #Yes
ExtendedDataType
ARRAY
#CGranProgram
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #InitDate
AutoDeclaration #Yes
Label #Fecha inicio
ExtendedDataType
ARRAY
#FromDate
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
CONTROL REALEDIT
PROPERTIES
Name #Price
AutoDeclaration #Yes
ShowZero #No
ExtendedDataType
ARRAY
#LineAmount
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #LMAT
AutoDeclaration #Yes
Label #Asociar LMAT
ENDPROPERTIES
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Group1
FrameType #None
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Department
AutoDeclaration #Yes
ExtendedDataType
ARRAY
#CGranDepartment
#
ENDARRAY
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#//CarlosGranados:Muestro el nombre del departamento seleccionado
#public boolean modified()
#{
# boolean ret;
#
# ret = super();
#
# if (ret) {
# if (Dimensions::find(SysDimension::Department,Department.text())) {
# DescriptionDepartment.text(Dimensions::find(SysDimension::Department,Department.text()).Description);
# }
# else {
# ret = checkfailed("El departamento introducido no existe");
# Department.text("");
# DescriptionDepartment.text("");
# }
#
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #DescriptionDepartment
AutoDeclaration #Yes
AllowEdit #No
Label #Nombre
ExtendedDataType
ARRAY
#Description
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Buttons
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL BUTTON
PROPERTIES
Name #OK
Text #Aceptar
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#//CarlosGranados: Creación del nuevo artículo
#void clicked() {
#
# _create = true;
# element.close();
#
#
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #Cancel
Text #Cancelar
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#//CarlosGranados: Botón de cancelación del formulario
#void clicked() {
#
# _create = false;
# element.close();
#
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDDESIGN
ENDFORM
***Element: FRM
; Microsoft Dynamics AX Forms unloaded
; --------------------------------------------------------------------------------
FRMVERSION 5
FORM #CustTable
PROPERTIES
Name #CustTable
ENDPROPERTIES
METHODS
Version: 3
SOURCE #ClassDeclaration
#public class FormRun extends ObjectRun
#{
# #define.Address("Address")
#
# NumberSeqFormHandler numberSeqFormHandler;
# recId zipCodeRecID;
# Common callerRecord;
# DirPartyType lastPartyType;
# boolean advancedCommunication;
#
# DirPrivacyGroupId publicPrivacyGroupId;
# DirPrivacyGroupId privatePrivacyGroupId;
# container skipCreateDataSources;
#
# // The field contactpersonId is hiddeen on the form design, but must be avalible
# // in order to make it possible to have lookup on contact-NAMe
#}
ENDSOURCE
SOURCE #CGranCompleteName
#// Cada vez que se modifica uno de los tres campos que componen el nombre(Nombre,Apellido1,Apellido2)
#// Actualizo el nombre completo
#str CGranCompleteName(FirstName _firstName,MiddleName _middleName,Lastname _lastName) {
#
# ;
# return _middleName + ' ' + _lastName + ',' + _firstName;
#
#}
ENDSOURCE
SOURCE #CGranWriteCustTable
#//CarlosGranados:Actualizo valor en formulario
#public void CGranWriteCustTable()
#{
# ;
# if(! CustTable.RecId)
# {
# CustTable_ds.Write();
#
# }
# CustTable_ds.reread();
# CustTable_ds.active();
# DirPartyTable_ds.reread();
# CustTable_ds.allowEdit(true);
# Grid.enabled(true);
#}
ENDSOURCE
SOURCE #CGranDeleteCustTable
#//Carlos Granados: Borro el registro por una cancelación en el formulario auxiliar de creación
#public void CGranDeleteCustTable()
#{
# ;
# if(!CustTable.RecId)
# CustTable_ds.delete();
# CustTable_ds.allowEdit(true);
# Grid.enabled(true);
#}
ENDSOURCE
SOURCE #task
#public int task(int _taskId)
#{
# int ret;
# #task
# ;
#
# // If Control+N and datasource is not CustTable then call create on CustTable
# if (_taskId == #taskNew &&
# (confind(skipCreateDataSources,this.dataSource().id()) || !custTable)
# )
# {
# custTable_ds.create();
# ret = 1;
# }
# else
# {
# ret = super(_taskId);
# }
#
#
# return ret;
#}
ENDSOURCE
SOURCE #toggelSimpleAdvancedCommunication
#void toggelSimpleAdvancedCommunication(boolean _advancedCommunication = advancedCommunication, boolean _setFocus = true)
#{
# element.lock();
#
# advancedCommunication = _advancedCommunication;
#
# contactInfoGrid.visible(advancedCommunication);
# contactInfo.visible(!advancedCommunication);
# tabCommunication.columns(advancedCommunication?1:2);
# buttonToggelSimple.text(!advancedCommunication?"@SYS122657" : "@SYS122660");
# buttonToggelSimple.helpText(!advancedCommunication?"@SYS122656" : "@SYS122661");
#
# element.unLock();
# if (_setFocus || tabCommunication.isActivePage())
# {
# if (advancedCommunication)
# {
# contactInfoGrid_CommunicationTypeId.setFocus();
# dirPartyECommunicationRelationship_ds.executeQuery();
# }
# else
# {
# phone.setFocus();
# }
# }
#}
ENDSOURCE
SOURCE #refreshHeaderTabPages
#void refreshHeaderTabPages()
#{
# ;
# if (tabAddress.isActivePage())
# {
# dirPartyAddressRelationship_ds.executeQuery();
# }
#}
ENDSOURCE
SOURCE #run
#public void run()
#{
# int tabNumber = 2;
# ;
#
# if (element.args().parm() == #Address)
# {
# tabNumber = 5;
# }
#
# SysListPageHelper::handleRunPreSuper(element, tab, tabNumber, 1);
# super();
# SysListPageHelper::handleRunPostSuper(element, tab);
#}
ENDSOURCE
SOURCE #hideQualityManagement
#void hideQualityManagement()
#{
# ;
# inventNonConformanceTable.visible(false);
#}
ENDSOURCE
SOURCE #enablePartyDetails
#///
#/// updates the General and Details tab of CustTable form depending on the directory type slected.
#///
#///
#/// This method set the vissiblality of person, organization and governemnt identification group to true depending on the type of
#/// directory type.
#///
#///
#/// Enumerated text does not exist.
#///
#
#void enablePartyDetails()
#{
# ;
#
# switch (custTable.PartyType)
# {
# case DirPartyType::Person:
# personGroup.visible(true);
# organizationGroup.visible(false);
# governmentIdentification.visible(true);
# governmentIdentification_IdentificationNumber.label("@SYS114298");
# governmentIdentification_PartyState.visible(true);
# contactInfoGrid_M_editIsSIPAddress.visible(true);
# break;
# case DirPartyType::Organization:
# personGroup.visible(false);
# organizationGroup.visible(true);
# governmentIdentification.visible(true);
# governmentIdentification_IdentificationNumber.label("@SYS114297");
# governmentIdentification_PartyState.visible(false);
# contactInfoGrid_M_editIsSIPAddress.visible(false);
# break;
# }
#}
ENDSOURCE
SOURCE #setNameLookup
#void setNameLookup()
#{
# #define.LOOKUP_AUTO(0)
# #define.LOOKUP_NEVER(1)
# ;
#
# custTable_Name.lookupButton(!custTable.RecId ? #LOOKUP_AUTO : #LOOKUP_NEVER);
# description_Name.lookupButton(!custTable.RecId ? #LOOKUP_AUTO : #LOOKUP_NEVER);
#}
ENDSOURCE
SOURCE #numberSeqFormHandler
#NumberSeqFormHandler numberSeqFormHandler()
#{
# if (!numberSeqFormHandler)
# {
# numberSeqFormHandler = NumberSeqFormHandler::newForm(CustParameters::numRefCustAccount().NumberSequence,
# element,
# custTable_DS,
# fieldnum(CustTable, AccountNum)
# );
# }
# return numberSeqFormHandler;
#}
ENDSOURCE
SOURCE #Init
#void init()
#{
# boolean isCustTableDataSet = false;
# ;
#
# if (element.args().dataset() == tablenum(CustTable))
# {
# SysListPageHelper::handleInitPreSuper(element);
# isCustTableDataSet = true;
# }
#
# super();
#
#
# [advancedCommunication] = xSysLastValue::getValue(curext(),curuserid(),UtilElementType::Form,formstr(CustTable));
# element.toggelSimpleAdvancedCommunication(advancedCommunication,false);
# TaxVATNumTable::enableLookupVATNum(vatNum);
#
# if (CompanyNAFCode::NAFCodeTableEmpty())
# {
# contactInfo_CompanyIdSiret.visible(false);
# contactInfo_CompanyIdNAF.visible(false);
# }
# if(CustParameters::find().SalesCycle)
# {
# salesPurchCycle_Sales.visible(true);
# }
#
# // If form is opened from another form
# if (element.args())
# {
# callerRecord = element.args().record();
# }
#
# if (isCustTableDataSet)
# {
# SysListPageHelper::handleInitPostSuper(element);
# }
#
# if (!InventParameters::find().UseQualityManagement)
# {
# element.hideQualityManagement();
# }
# publicPrivacyGroupId = DirPrivacyGroupTable::findBySystemType(DirSystemPrivacyGroupType::Public).PrivacyGroupId;
# privatePrivacyGroupId = DirPrivacyGroupTable::findBySystemType(DirSystemPrivacyGroupType::Customer).PrivacyGroupId;
# skipCreateDataSources = [dirPartyTable_ds.id(),dirPersonPartyDetail_ds.id(),dirOrganizationDetail_ds.id()];
#
#}
ENDSOURCE
SOURCE #close
#void close()
#{
# if (numberSeqFormHandler)
# {
# numberSeqFormHandler.formMethodClose();
# }
# xSysLastValue::putValue([advancedCommunication],curext(),curuserid(),UtilElementType::Form,formstr(CustTable));
# super();
#}
ENDSOURCE
ENDMETHODS
OBJECTBANK
PROPERTIES
ENDPROPERTIES
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #CustTable
Table #CustTable
Index #AccountIdx
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD PaymTermId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Modified
#void modified()
#{
# super();
#
# custTable_ds.refresh();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD VATNum
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #lookup
#public void lookup(FormControl _formControl, str _filterStr)
#{
# if (TaxVATNumTable::taxVATNumTableEnabled())
# {
# TaxVATNumTable::lookupVATNum(vatNum,custTable);
# }
# else
# {
# super(_formControl, _filterStr);
# }
#}
ENDSOURCE
SOURCE #jumpRef
#public void jumpRef()
#{
# if (TaxVATNumTable::taxVATNumTableEnabled())
# {
# TaxVATNumTable::jumpRefVATNum(custTable, element);
# }
# else
# {
# super();
# }
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD Name
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#public void jumpRef()
#{
# ;
# DirParty::jumpRefFromCommon(custTable);
#}
ENDSOURCE
SOURCE #modified
#public void modified()
#{
# FormStringControl control;
# DirPartyId oldPartyId;
# ;
# oldPartyId = custTable.PartyId;
# super();
# // If party is not yet identified and on basis of name there is not a single match for party
# if (!custTable.PartyId && DirPartyTable::nameLikeCount(custTable.Name, custTable.PartyType) >= 1)
# {
# control = element.selectedControl();
# if (!control && (tabOverview.isActivePage() && element.selectControl(custTable_Name)) ||
# (tabGeneral.isActivePage() && element.selectControl(description_Name))
# )
# {
# control = element.selectedControl();
# }
#
# DirUtility::namelookup(control, custTable, custTable.PartyType);
# }
# if (!custTable.RecId && (custTable.PartyId || oldPartyId))
# {
# DirParty::showHideMessageBar(element,custTable);
# }
# element.setNameLookup();
#}
#
ENDSOURCE
SOURCE #lookup
#public void lookup(FormStringControl _formControl, str _filterStr)
#{
# ;
# // Allow name lookup if customer is not yet created
# if (!custTable.RecId )
# {
# DirUtility::namelookup(_formControl, custTable, custTable.PartyType);
#
# }
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD SegmentId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# #define.blank('')
#
# super();
#
# // When segment changes, subsegment should be cleared
# custTable.SubsegmentId = #blank;
#
# // Refersh Customer data source
# custTable_ds.refresh();
#
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD PartyId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
#
# if (!custTable.RecId)
# {
# DirParty::showHideMessageBar(element,custTable);
# }
#
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD PartyType
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# if (lastPartyType != custTable.PartyType)
# {
# lastPartyType = custTable.PartyType;
# element.enablePartyDetails();
# }
#
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD CGranFirstName
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# //Carlos Granados : Completo el nombre del cliente
# CustTable.Name = element.CGranCompleteName(custTable.CGranFirstName,custTable.CGranMiddleName,custTable.CGranLastName);
# //END CarlosG
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD CGranMiddleName
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# //Carlos Granados : Completo el nombre del cliente
# CustTable.Name = element.CGranCompleteName(custTable.CGranFirstName,custTable.CGranMiddleName,custTable.CGranLastName);
# //END CarlosG
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD CGranLastName
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# //Carlos Granados : Completo el nombre del cliente
# CustTable.Name = element.CGranCompleteName(custTable.CGranFirstName,custTable.CGranMiddleName,custTable.CGranLastName);
# //END CarlosG
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #initValue
#public void initValue()
#{
# boolean clearPartyId = true;
# ;
# super();
#
# // If customer form is called from other form
# if (callerRecord)
# {
# switch (callerRecord.TableId)
# {
# // If called by Lead or Opportunity, initialize customer values
# case tablenum(smmLeadTable) :
# case tablenum(smmOpportunityTable) :
# smmCreateEntity::initFromCommon(callerRecord, custTable);
# clearPartyId = false;
# break;
#
# case tablenum(DirPartyTable) :
# custTable.modifiedField(fieldnum(CustTable,PartyId));
# clearPartyId = false;
# DirParty::showHideMessageBar(element,custTable);
# break;
# }
# }
# custTable.PartyId = clearPartyId ? '' : custTable.PartyId;
#}
ENDSOURCE
SOURCE #active
#public int active()
#{
# int ret;
#
# ret = super();
#
# if (ret)
# {
# element.refreshHeaderTabPages();
#
# element.setNameLookup();
# if (lastPartyType != custTable.PartyType)
# {
# lastPartyType = custTable.PartyType;
# element.enablePartyDetails();
# }
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #linkActive
#public void linkActive()
#{
# smmResponsibilityGroup responsibilityGroup;
# ;
# element.numberSeqFormHandler().formMethodDataSourceLinkActive();
#
# // Is form called with a record
# if (element.args() && element.args().record())
# {
#
# switch (element.args().dataset())
# {
# // Is the form called from the contact person form
# case tablenum(ContactPerson) :
# this.query().dataSourceTable(tablenum(CustTable)).clearDynalinks();
# this.query().dataSourceTable(tablenum(CustTable)).addDynalink(fieldnum(CustTable,PartyId), element.args().record(), fieldnum(ContactPerson,OrgPartyId));
# break;
#
# // Is the form called from the activities form
# case tablenum(smmActivities) :
# smmActivityParentLink::updateQuery(this.query().dataSourceTable(tablenum(CustTable)), element.args().record());
# break;
#
# // Is the form called from the responsibilities form
# case tablenum(smmResponsibilityGroup) :
# // Get the current selected responsibilities record
# responsibilityGroup = element.args().record();
#
# // Update query
# smmResponsibility::updateQuery(this.query(),this.table(),responsibilityGroup.ResponsibilityId);
# break;
# }
# }
# super();
#}
ENDSOURCE
SOURCE #validateWrite
#public boolean validateWrite()
#{
# boolean ret;
# DirParty party;
# ;
#
# ret = super();
#
# ret = element.numberSeqFormHandler().formMethodDataSourceValidateWrite(ret) && ret;
#
# if (ret && DirParameters::find().UseDuplicateCheck)
# {
# party = DirParty::constructFromCommon(custTable);
# ret = party.checkDuplicate(!custTable.RecId);
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #Write
#void write()
#{
# boolean updateCurrency;
# NoYes newRecord;
# ;
#
# updateCurrency = false;
# if (custTable.orig().Currency && custTable.Currency != custTable.orig().Currency)
# {
# if (custTable.existOpenOrders())
# {
# if (CustTable::promptConvertCurrencyCode())
# {
# updateCurrency = true;
# }
# }
# }
#
# ttsbegin;
#
# if (updateCurrency)
# {
# custTable.convertCurrencyCode();
# }
#
# newRecord = custTable.RecId ? NoYes::No : NoYes::Yes;
#
# super();
#
# element.numberSeqFormHandler().formMethodDataSourceWrite();
#
# // If customer form is called from other form and creating new record
# if (callerRecord && newRecord)
# {
# // If called by Lead or Opportunity, copy associations
# if (callerRecord.TableId == tablenum(smmLeadTable) ||
# callerRecord.TableId == tablenum(smmOpportunityTable))
# {
# smmCreateEntity::createLinkCommon(callerRecord, custTable);
# }
# }
#
# if (newRecord)
# {
# DirParty::showHideMessageBar(element,custTable);
# }
# ttscommit;
#}
#
ENDSOURCE
SOURCE #Delete
#void delete()
#{
# FormDataSource callerDataSource;
# ;
#
# ttsbegin;
# element.numberSeqFormHandler().formMethodDataSourceDelete();
#
# if (!custTable.RecId)
# {
# DirParty::showHideMessageBar(element,custTable,true);
# }
#
# super();
#
# if (element.args() && element.args().dataset() == tablenum(smmBusRelTable))
# {
# callerDataSource = element.args().record().dataSource();
# if (callerDataSource)
# {
# callerDataSource.executeQuery();
# }
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #create
#void create(boolean append = false,
# boolean extern = false) // If created externally
#{
# //Carlos Granados Declaración de variables
# FormRun formRun;
# Args argForm = new Args();
# ;
# //END Carlos Granados
# custTable_AccountNum.setFocus();
#
# element.numberSeqFormHandler().formMethodDataSourceCreatePre();
#
# super(append);
#
# if (!extern)
# {
# element.numberSeqFormHandler().formMethodDataSourceCreate();
# }
#
# //Carlos Granados Llamamos al formulario auxiliar de creación
# CustTable_ds.allowEdit(false);
# Grid.allowEdit(false);
# Grid.enabled(false);
# argForm.name(formstr(CGranCreateCust)) ;
# argForm.caller(element) ;
# argForm.record(custTable);
# formRun= classfactory.formRunClass(argForm) ;
# formRun.init() ;
# formRun.run();
# formRun.wait();
# //END Carlos Granados
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #DirPartyTable
Table #DirPartyTable
AllowCheck #No
AllowDelete #No
JoinSource #CustTable
ENDPROPERTIES
FIELDLIST
DATAFIELD Prefix
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Salutation
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD FirstName
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD MiddleName
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD LastName
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD GenerationalSuffix
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ProfessionalSuffix
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD PersonNameOrder
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Name
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD LanguageId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Type
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD PartyId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD NameAlias
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Memo
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD modifiedDateTime
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD modifiedBy
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD createdDateTime
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD createdBy
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD dataAreaId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD RecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TableId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #write
#public void write()
#{
# super();
# custTable_ds.reread();
#}
ENDSOURCE
SOURCE #prevPage
#public int prevPage(int _pageSize)
#{
# int ret;
#
# ret = custTable_ds.prevPage(_pageSize);
#
# return ret;
#}
ENDSOURCE
SOURCE #nextPage
#public int nextPage(int _pageSize)
#{
# int ret;
#
# ret = custTable_ds.nextPage(_pageSize);
#
# return ret;
#}
ENDSOURCE
SOURCE #prev
#public int prev()
#{
# int ret;
#
# ret = custTable_ds.prev();
#
# return ret;
#}
ENDSOURCE
SOURCE #next
#public int next()
#{
# int ret;
#
# ret = custTable_ds.next();
#
# return ret;
#}
ENDSOURCE
SOURCE #last
#public int last()
#{
# int ret;
#
# ret = custTable_ds.last();
#
# return ret;
#}
ENDSOURCE
SOURCE #first
#public int first()
#{
# int ret;
#
# ret = custTable_ds.first();
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #DirPersonPartyDetail
Table #DirPersonPartyDetail
AllowCheck #No
AllowDelete #No
JoinSource #DirPartyTable
ENDPROPERTIES
FIELDLIST
DATAFIELD PartyId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD NickName
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Initials
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ChildrenNames
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD BirthDate
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD MaritalStatus
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD AnniversaryDate
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Hobbies
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Gender
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD SIPECommunicationTypeId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD modifiedDateTime
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD modifiedBy
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD createdDateTime
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD createdBy
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD dataAreaId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD RecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TableId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #last
#public int last()
#{
# int ret;
#
# ret = custTable_ds.last();
#
# return ret;
#}
ENDSOURCE
SOURCE #first
#public int first()
#{
# int ret;
#
# ret = custTable_ds.first();
#
# return ret;
#}
ENDSOURCE
SOURCE #write
#public void write()
#{
# super();
# custTable_ds.reread();
#}
ENDSOURCE
SOURCE #prevPage
#public int prevPage(int _pageSize)
#{
# int ret;
#
# ret = custTable_ds.prevPage(_pageSize);
#
# return ret;
#}
ENDSOURCE
SOURCE #nextPage
#public int nextPage(int _pageSize)
#{
# int ret;
#
# ret = custTable_ds.nextPage(_pageSize);
#
# return ret;
#}
ENDSOURCE
SOURCE #prev
#public int prev()
#{
# int ret;
#
# ret = custTable_ds.prev();
#
# return ret;
#}
ENDSOURCE
SOURCE #next
#public int next()
#{
# int ret;
#
# ret = custTable_ds.next();
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #DirOrganizationDetail
Table #DirOrganizationDetail
AllowCheck #No
AllowDelete #No
JoinSource #DirPartyTable
ENDPROPERTIES
FIELDLIST
DATAFIELD NumberOfEmployees
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD OrgNumber
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ABC
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD PartyId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD modifiedDateTime
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD createdDateTime
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD dataAreaId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD RecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TableId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #write
#public void write()
#{
# super();
# custTable_ds.reread();
#}
ENDSOURCE
SOURCE #prevPage
#public int prevPage(int _pageSize)
#{
# int ret;
#
# ret = custTable_ds.prevPage(_pageSize);
#
# return ret;
#}
ENDSOURCE
SOURCE #nextPage
#public int nextPage(int _pageSize)
#{
# int ret;
#
# ret = custTable_ds.nextPage(_pageSize);
#
# return ret;
#}
ENDSOURCE
SOURCE #prev
#public int prev()
#{
# int ret;
#
# ret = custTable_ds.prev();
#
# return ret;
#}
ENDSOURCE
SOURCE #next
#public int next()
#{
# int ret;
#
# ret = custTable_ds.next();
#
# return ret;
#}
ENDSOURCE
SOURCE #last
#public int last()
#{
# int ret;
#
# ret = custTable_ds.last();
#
# return ret;
#}
ENDSOURCE
SOURCE #first
#public int first()
#{
# int ret;
#
# ret = custTable_ds.first();
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #DirPartyAddressRelationship
Table #DirPartyAddressRelationship
AllowCheck #No
JoinSource #DirPartyTable
LinkType #Passive
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD Shared
PROPERTIES
AllowAdd #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #validate
#public boolean validate()
#{
# boolean ret;
# ;
#
# ret = super();
#
# if (ret)
# {
# // if the address is shared, then the address type cannot be third-party shipping
# if (dirPartyAddressRelationship.Shared &&
# address.Type == AddressType::ShipCarrierThirdPartyShipping)
# {
# ret = checkFailed("@SYS127142");
# }
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #modified
#public void modified()
#{
# super();
# address.AddrTableId = (dirPartyAddressRelationship.Shared == true) ? tablenum(DirPartyTable) : tablenum(CustTable);
# address.AddrRecId = (dirPartyAddressRelationship.Shared == true) ? dirPartyTable.RecId : custTable.RecId;
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD PartyId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD IsPrimary
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Status
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ValidToDateTime
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ValidFromDateTime
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD dataAreaId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD RecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TableId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #delete
#public void delete()
#{
# super();
# custTable_ds.reread();
#}
ENDSOURCE
SOURCE #write
#public void write()
#{
# super();
# custTable_ds.reread();
#}
ENDSOURCE
SOURCE #initValue
#public void initValue()
#{
# super();
# dirPartyAddressRelationship.PartyId = dirPartyTable.PartyId;
# dirPartyAddressRelationship.Shared = DirParameters::defaultSharedAddress(custTable.TableId);
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #Address
Table #Address
AllowCheck #No
JoinSource #DirPartyAddressRelationshipMapping
LinkType #InnerJoin
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD AddrTableId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD AddrRecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD LineNum
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD type
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Name
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Address
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Phone
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TeleFax
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD CountryRegionId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ZipCode
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD State
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD County
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Telex
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD URL
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD PhoneLocal
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD CellularPhone
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Email
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TaxGroup
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD City
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Street
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Pager
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD SMS
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD DEL_RefZipCode
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Latitude
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Longitude
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD SalesCalendarId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD FRCARAddressing
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TimeZone
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD IsPrimary
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD DlvTerm
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD DlvMode
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ShipCarrierId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ShipCarrierBlindShipment
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ShipCarrierAccount
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ShipCarrierAccountCode
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ShipCarrierResidential
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD dataAreaId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD RecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TableId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #write
#public void write(boolean _flag = false)
#{
# if (_flag)
# {
# super();
# }
#}
ENDSOURCE
SOURCE #init
#public void init()
#{
# QueryBuildRange qbRange;
# super();
# qbRange = this.query().dataSourceTable(tablenum(Address)).addRange(fieldnum(Address,AddrTableId));
# if (qbRange)
# {
# qbRange.value(strfmt('%1,%2',tablenum(DirPartyTable),tablenum(CustTable)));
# qbRange.status(RangeStatus::Locked);
# }
#}
ENDSOURCE
SOURCE #initValue
#public void initValue()
#{
# super();
# if (DirParameters::defaultSharedAddress(custTable.TableId))
# {
# address.AddrTableId = dirPartyTable.TableId;
# address.AddrRecId = dirPartyTable.RecId;
# }
# else
# {
# address.AddrTableId = custTable.TableId;
# address.AddrRecId = custTable.RecId;
# dirPartyAddressRelationship.Shared = false;
# }
#
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #DirPartyAddressRelationshipMapping
Table #DirPartyAddressRelationshipMapping
AllowCheck #No
JoinSource #DirPartyAddressRelationship
LinkType #InnerJoin
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD AddressRecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD RefCompanyId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD PartyAddressRelationshipRecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD dataAreaId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD RecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TableId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #write
#public void write()
#{
# boolean newRecord;
# ;
# ttsbegin;
#
# address_ds.write(true);
#
# if (!dirPartyAddressRelationship.RecId)
# {
# dirPartyAddressRelationship_ds.write();
# }
#
#
# newRecord = (dirPartyAddressRelationshipMapping.RecId == 0) ? true : false;
# dirPartyAddressRelationshipMapping.RefCompanyId = address.DataAreaId;
# dirPartyAddressRelationshipMapping.AddressRecId = address.RecId;
# dirPartyAddressRelationshipMapping.PartyAddressRelationshipRecId = dirPartyAddressRelationship.RecId;
#
# super();
#
# if (newRecord && dirPartyAddressRelationship.Shared)
# {
# address.IsPrimary = dirPartyAddressRelationship.IsPrimary;
# address.updatePartyFromAddress();
# }
# ttscommit;
#}
#
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #DirPartyECommunicationRelationship
Table #DirPartyECommunicationRelationship
AllowCheck #No
JoinSource #DirPartyTable
InsertAtEnd #No
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD PartyId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Status
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ValidFromDateTime
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ValidToDateTime
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Priority
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD ValuesRecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD PrivacyGroupId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD dataAreaId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD RecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TableId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #delete
#public void delete()
#{
# boolean reRead = (dirPartyECommunicationRelationship.PrivacyGroupId == publicPrivacyGroupId || dirPartyECommunicationRelationship.orig().PrivacyGroupId) ;
# ;
# super();
# if (reRead)
# {
# custTable_ds.reread();
# }
#}
ENDSOURCE
SOURCE #initValue
#public void initValue()
#{
# super();
# dirPartyECommunicationRelationship.PrivacyGroupId = DirParameters::find().CustDefaultSharedECommunication ? publicPrivacyGroupId : privatePrivacyGroupId;
#}
ENDSOURCE
SOURCE #init
#public void init()
#{
# QueryBuildDataSource qbd;
# QueryBuildRange qbRange;
# ;
#
# super();
#
# qbd = this.query().dataSourceTable(tablenum(DirPartyECommunicationRelationship));
#
# qbd = qbd.addDataSource(tablenum(DirPrivacyGroupTable));
# qbd.relations(true);
# qbd.joinMode(JoinMode::ExistsJoin);
# qbRange= qbd.addRange(fieldnum(DirPrivacyGroupTable,IsCustomer));
# qbRange.status(RangeStatus::Locked);
# qbRange.value(queryValue(1));
#}
ENDSOURCE
SOURCE #isShared
#// BP Deviation Documented
#edit DirIsSharedECommunication isShared(boolean _set,DirPartyECommunicationRelationship _partyECommunicationRelationship, DirIsSharedECommunication _isShared)
#{
# ;
# return _partyECommunicationRelationship.isShared(_set,_isShared,publicPrivacyGroupId,privatePrivacyGroupId);
#}
ENDSOURCE
SOURCE #create
#public void create(boolean _append = false)
#{
# super(_append);
# contactInfoGrid_CommunicationTypeId.setFocus();
#}
ENDSOURCE
SOURCE #validateWrite
#public boolean validateWrite()
#{
# boolean ret;
#
# ret = super();
#
# if (ret)
# {
# ret = dirPartyECommunicationRelationship.checkDateOverlap(dirECommunicationAddress);
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #write
#public void write()
#{
# DirPartyECommunicationRelationship partyECommunicationRelationship;
# DirECommunicationAddress eCommunicationAddress;
# ;
# ttsbegin;
# dirPartyECommunicationRelationship.ValuesRecId = DirECommunicationAddress::findOrCreate(dirECommunicationAddress).RecId;
# if (dirPersonPartyDetail.sipeCommunicationTypeId && dirPersonPartyDetail.sipeCommunicationTypeId == dirECommunicationAddress.eCommunicationTypeId && !dirPersonPartyDetail.RecId)
# {
# dirPersonPartyDetail.PartyId = dirPartyTable.PartyId;
# dirPersonPartyDetail_ds.write();
# }
# super();
# if (dirPartyECommunicationRelationship.ValuesRecId != dirECommunicationAddress.RecId)
# {
# select forupdate eCommunicationAddress where eCommunicationAddress.RecId == dirECommunicationAddress.RecId
# notexists join partyECommunicationRelationship
# where partyECommunicationRelationship.ValuesRecId == dirECommunicationAddress.RecId &&
# partyECommunicationRelationship.PartyId != dirPartyECommunicationRelationship.PartyId;
# if (eCommunicationAddress)
# {
# eCommunicationAddress.delete();
# }
#
# dirECommunicationAddress.data(DirECommunicationAddress::findRecId(dirPartyECommunicationRelationship.ValuesRecId));
# dirECommunicationAddress_ds.setCurrent();
# }
# ttscommit;
# dirPartyECommunicationRelationship_ds.reread();
# custTable_ds.reread();
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #DirECommunicationAddress
Table #DirECommunicationAddress
AllowCheck #No
JoinSource #DirPartyECommunicationRelationship
LinkType #InnerJoin
InsertAtEnd #No
InsertIfEmpty #No
ENDPROPERTIES
FIELDLIST
DATAFIELD ECommunicationTypeId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# dirECommunicationAddress_ds.object(fieldnum(DirECommunicationAddress,PhoneLocal)).allowEdit(DirECommunicationTypeTable::find(dirECommunicationAddress.eCommunicationTypeId).MethodType == DirECommunicationMethodType::Phone);
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD URL
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Email
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Telex
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD PhoneLocal
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD Phone
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD dataAreaId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD RecId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
DATAFIELD TableId
PROPERTIES
AllowAdd #No
ENDPROPERTIES
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #isSIPAddress
#// BP Deviation Documented
#edit DirIsSIPAddress isSIPAddress(boolean _set, DirECommunicationAddress _eCommunicationAddress, DirIsSIPAddress _isSIPAddress)
#{
# DirECommunicationTypeId oldSIPAddress;
# ;
# if (_set)
# {
# dirPersonPartyDetail.PartyId = dirPartyTable.PartyId;
# oldSIPAddress = dirPersonPartyDetail.sipeCommunicationTypeId;
# dirPersonPartyDetail.sipeCommunicationTypeId = (_isSIPAddress == NoYes::Yes)? _eCommunicationAddress.eCommunicationTypeId : '';
# if (dirPersonPartyDetail.validateField(fieldnum(DirPersonPartyDetail,sipeCommunicationTypeId)) && dirPersonPartyDetail_ds.validateWrite())
# {
# dirPersonPartyDetail_ds.write();
# }
# else
# {
# dirPersonPartyDetail.sipeCommunicationTypeId = oldSIPAddress;
# }
# contactInfoGrid.update();
# }
# return ((_eCommunicationAddress.eCommunicationTypeId && dirPersonPartyDetail.sipeCommunicationTypeId == _eCommunicationAddress.eCommunicationTypeId) ? true : false);
#}
ENDSOURCE
SOURCE #active
#public int active()
#{
# int ret;
#
# ret = super();
#
# if (ret)
# {
# dirECommunicationAddress_ds.object(fieldnum(DirECommunicationAddress,PhoneLocal)).allowEdit(DirECommunicationTypeTable::find(dirECommunicationAddress.eCommunicationTypeId).MethodType == DirECommunicationMethodType::Phone);
# dirECommunicationAddress_ds.object(fieldnum(DirECommunicationAddress,eCommunicationTypeId)).allowEdit(dirPartyECommunicationRelationship.RecId ? false : true);
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #write
#public void write()
#{
# ;
#// super();
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
ENDOBJECTBANK
JOINS
DirPartyTable CustTable
DirPersonPartyDetail DirPartyTable
DirOrganizationDetail DirPartyTable
DirPartyAddressRelationship DirPartyTable
Address DirPartyAddressRelationshipMapping
DirPartyAddressRelationshipMapping DirPartyAddressRelationship
DirPartyECommunicationRelationship DirPartyTable
DirECommunicationAddress DirPartyECommunicationRelationship
ENDJOINS
DESIGN
PROPERTIES
Caption #@SYS19920
TitleDatasource #CustTable
HTMLHelpFile #HTMLHelpFileIWorker
HTMLHelpTopic #AxShared.chm::/html/C3FC5774-6ED0-4760-86F5-7899E825AB25.htm
DataSource #CustTable
HideIfEmpty #No
ENDPROPERTIES
CONTAINER
CONTROL TAB
PROPERTIES
Name #Tab
AutoDeclaration #Yes
Width #Column width
Height #Column height
Tabs #9
DataSource #CustTable
ENDPROPERTIES
CONTAINER
CONTROL TABPAGE
PROPERTIES
Name #TabOverview
AutoDeclaration #Yes
Caption #@SYS9039
DataSource #CustTable
ENDPROPERTIES
CONTAINER
CONTROL GRID
PROPERTIES
Name #Grid
AutoDeclaration #Yes
Width #Column width
Height #Column height
DataSource #CustTable
ENDPROPERTIES
CONTAINER
CONTROL WINDOW
PROPERTIES
Name #PartyIndicator
AutoDeclaration #Yes
Visible #No
Width #16
Height #16
AlignControl #No
BackStyle #Transparent
DataSource #CustTable
DataMethod #showPartyMatchIcon
ENDPROPERTIES
METHODS
Version: 3
SOURCE #toolTip
#public str toolTip()
#{
# str ret;
# ;
# ret = DirParty::toolTip(custTable);
#
# return ret;
#}
ENDSOURCE
SOURCE #mouseUp
#int mouseUp(int _x, int _y, int _button, boolean _ctrl, boolean _shift)
#{
# #define.leftClick(1)
#
# int ret;
# ;
#
# ret = super(_x, _y, _button, _ctrl, _shift);
#
# if (_button == #leftClick && custTable.PartyId)
# {
# smmUtility::openMenuItemForm(menuitemdisplaystr(DirPartyTable),custTable,null,false);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_AccountNum
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/2d352b33-cdba-4094-bc8c-038137279dc8.htm
DataSource #CustTable
DataField #AccountNum
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #CustTable_PartyType
AutoDeclaration #Yes
DataSource #CustTable
DataField #PartyType
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_CGranMiddleName
Label #Primer apellido
DataSource #CustTable
DataField #CGranMiddleName
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_CgranLastName
Label #Segundo apellido
DataSource #CustTable
DataField #CGranLastName
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_CGranFirstName
Label #Nombre
DataSource #CustTable
DataField #CGranFirstName
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_Name
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/4d0ef939-51fe-4a0e-8948-abc215730b51.htm
LookupButton #Always
Label #Nombre completo
DataSource #CustTable
DataField #Name
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#public void jumpRef()
#{
# ;
# super();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_NameAlias
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/751991d8-154e-42cc-aab7-eae23e53fc51.htm
DataSource #CustTable
DataField #NameAlias
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_CGranCustBankAccount
DataSource #CustTable
DataField #CGranCustBankAccount
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_Dimension3
DataSource #CustTable
DataField #Dimension[3]
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_InvoiceAccount
Visible #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/6f9f7b7a-4d92-4f0e-bc7e-3b686a7b4cf9.htm
DataSource #CustTable
DataField #InvoiceAccount
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_CustGroup
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/a08b986c-60b6-43f9-9827-d4644e564584.htm
DataSource #CustTable
DataField #CustGroup
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_Currency
Visible #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/fbb1801a-680d-43da-b6ca-0e6ec94b9dff.htm
DataSource #CustTable
DataField #Currency
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabGeneral
AutoDeclaration #Yes
Caption #@SYS2952
DataSource #CustTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Customer
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/C89BF668-E384-4B41-95A2-781A987BCF50.htm
Caption #@SYS302
DataSource #CustTable
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Description
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/347E417F-9045-4D77-961F-8E1AD7285489.htm
FrameType #None
DataSource #CustTable
DataGroup #Description
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Description_Name
AutoDeclaration #Yes
DataSource #CustTable
DataField #Name
PresenceDataSource #CustTable
PresenceDataField #PartyId
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#public void jumpRef()
#{
# super();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Description_NameAlias
DataSource #CustTable
DataField #NameAlias
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Posting
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/20D3C121-22DB-426D-8AAF-FFC2BD14E0AF.htm
FrameType #None
DataSource #CustTable
DataGroup #Posting
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Currency
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/D810F7A2-0C4B-4072-A55C-2C8C9755ED8A.htm
FrameType #None
DataSource #CustTable
DataGroup #Currency
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #CustTable_BirthDate
DataSource #CustTable
DataField #BirthDate
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #LanguageId
DataSource #CustTable
DataField #LanguageId
ENDPROPERTIES
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Classification
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/64C30A8C-4A5D-4C53-A353-1FCC428191C7.htm
FrameType #None
DataSource #CustTable
DataGroup #Classification
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_SegmentId
DataSource #CustTable
DataField #SegmentId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_SubsegmentId
DataSource #CustTable
DataField #SubsegmentId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_SalesDistrictId
DataSource #CustTable
DataField #SalesDistrictId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_CompanyChainId
DataSource #CustTable
DataField #CompanyChainId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_MainContactId
DataSource #CustTable
DataField #MainContactId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustTable_Memo
DataSource #CustTable
DataField #Memo
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Identification
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/C1588DF6-4130-4C60-8090-9A279EA3D39D.htm
DataSource #CustTable
DataGroup #Identification
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Identification_AccountNum
DataSource #CustTable
DataField #AccountNum
PresenceIndicatorAllowed #No
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Identification_PartyId
DataSource #CustTable
DataField #PartyId
PresenceIndicatorAllowed #No
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #Identification_PartyType
DataSource #CustTable
DataField #PartyType
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Identification_OrgId
DataSource #CustTable
DataField #OrgId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Credit
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/E42CA4BA-6091-4311-9C38-9F1BF6A8C187.htm
Caption #@SYS127064
DataSource #CustTable
DataGroup #Credit
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #GovernmentIdentification
AutoDeclaration #Yes
DataSource #CustTable
DataGroup #GovernmentIdentification
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #GovernmentIdentification_IdentificationNumber
AutoDeclaration #Yes
DataSource #CustTable
DataField #IdentificationNumber
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #GovernmentIdentification_PartyCountry
AutoDeclaration #Yes
DataSource #CustTable
DataField #PartyCountry
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #GovernmentIdentification_PartyState
AutoDeclaration #Yes
DataSource #CustTable
DataField #PartyState
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Administration
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/48E88095-E9A3-4120-95CC-87C84FDA4C6F.htm
DataSource #CustTable
DataGroup #Administration
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Vendor
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/CB6ECD7F-C604-4E2E-A9B9-224D7FAD0BDA.htm
Caption #@SYS8079
DataSource #CustTable
DataGroup #Vendor
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabDirPartyDetails
AutoDeclaration #Yes
Caption #@SYS80118
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #PersonGroup
AutoDeclaration #Yes
Visible #No
FrameType #None
DataSource #DirPartyTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #PersonName
AutoDeclaration #Yes
DataSource #DirPartyTable
DataGroup #PersonName
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Personal
DataSource #DirPersonPartyDetail
DataGroup #Personal
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Personal_Initials
DataSource #DirPersonPartyDetail
DataField #Initials
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #Personal_Gender
DataSource #DirPersonPartyDetail
DataField #Gender
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Personal_NickName
DataSource #DirPersonPartyDetail
DataField #NickName
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #Personal_MaritalStatus
DataSource #DirPersonPartyDetail
DataField #MaritalStatus
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #Personal_BirthDate
DataSource #DirPersonPartyDetail
DataField #BirthDate
ENDPROPERTIES
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #Personal_AnniversaryDate
DataSource #DirPersonPartyDetail
DataField #AnniversaryDate
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Personal_ChildrenNames
DataSource #DirPersonPartyDetail
DataField #ChildrenNames
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Personal_Hobbies
DataSource #DirPersonPartyDetail
DataField #Hobbies
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #PersonOthers
AutoDeclaration #Yes
DataSource #DirPartyTable
DataGroup #Other
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #OrganizationGroup
AutoDeclaration #Yes
DataSource #DirOrganizationDetail
DataGroup #Organization
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabSetup
Caption #@SYS2186
DataSource #CustTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Invoice
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/685D30DC-1FB2-4080-9C6E-633475385021.htm
DataSource #CustTable
DataGroup #Invoice
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #GiroMoneyTransferSlip
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/1103A68D-21E8-4D58-BF82-0DF1884236D2.htm
DataSource #CustTable
DataGroup #GiroMoneyTransferSlip
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Delivery
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/EF9EED0B-A7D1-466D-8DA8-6CCE5B3B923A.htm
DataSource #CustTable
DataGroup #Delivery
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SalesTax
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/042736BC-8A5E-4B1E-8265-869D9AB2E47C.htm
DataSource #CustTable
DataGroup #SalesTax
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #TaxGroup
DataSource #CustTable
DataField #TaxGroup
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #VATNum
AutoDeclaration #Yes
Width #100
DataSource #CustTable
DataField #VATNum
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #InclTax
DataSource #CustTable
DataField #InclTax
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #TaxLicenseNum
DataSource #CustTable
DataField #TaxLicenseNum
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTax_FiscalCode
DataSource #CustTable
DataField #FiscalCode
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTax_EnterpriseNumber
DataSource #CustTable
DataField #EnterpriseNumber
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesTax_TaxBorderNumber_FI
DataSource #CustTable
DataField #TaxBorderNumber_FI
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #PackagingMaterialFee
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/787EF354-5B72-4212-9678-3DAE6729F5B4.htm
ConfigurationKey #InventPackaging
DataSource #CustTable
DataGroup #PackagingMaterialFee
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #RFIDTagging
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/145BD966-AA53-469F-993D-DCC27A8CFE32.htm
DataSource #CustTable
DataGroup #RFIDTagging
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #RFIDTagging_RFIDItemTagging
DataSource #CustTable
DataField #RFIDItemTagging
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #RFIDTagging_RFIDCaseTagging
DataSource #CustTable
DataField #RFIDCaseTagging
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #RFIDTagging_RFIDPalletTagging
DataSource #CustTable
DataField #RFIDPalletTagging
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Intercompany
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/6776E32B-677E-4AFB-847C-C74A1BF55C71.htm
DataSource #CustTable
DataGroup #Intercompany
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Einvoice
DataSource #CustTable
DataGroup #Einvoice
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabAddress
AutoDeclaration #Yes
SecurityKey #BasicSetup
Caption #@SYS7566
DataSource #DirPartyAddressRelationship
ENDPROPERTIES
METHODS
Version: 3
SOURCE #pageActivated
#public void pageActivated()
#{
# ;
# // Refresh header tab page
# element.refreshHeaderTabPages();
#
# super();
# addressGrid.setFocus();
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL GROUP
PROPERTIES
Name #AddressGridGroup
Width #Column width
Height #Column height
FrameType #None
ENDPROPERTIES
CONTAINER
CONTROL GRID
PROPERTIES
Name #AddressGrid
AutoDeclaration #Yes
Width #Column width
Height #Column height
VisibleCols #4
VisibleRows #7
DataSource #DirPartyAddressRelationship
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #DirPartyAddressRelationship_Shared
BackgroundColor #Window background
DataSource #DirPartyAddressRelationship
DataField #Shared
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #DirPartyAddressRelationship_IsPrimary
BackgroundColor #Window background
DataSource #DirPartyAddressRelationship
DataField #IsPrimary
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #AddressNameGroup_Name
DataSource #Address
DataField #Name
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #AddressGrid_Type
DataSource #Address
DataField #type
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #AddressGrid_Street
Height #Column height
DataSource #Address
DataField #Street
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #AddressGrid_ZipCode
DataSource #Address
DataField #ZipCode
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #AddressGrid_City
DataSource #Address
DataField #City
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #AddressGrid_County
DataSource #Address
DataField #County
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #AddressGrid_State
DataSource #Address
DataField #State
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #AddressGrid_CountryRegionId
DataSource #Address
DataField #CountryRegionId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #AddressesDisplayGroup
Caption #@SYS36203
FrameOptionButton #Hide
OptionValue #0
DataSource #Address
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Group1_Address
DataSource #Address
DataField #Address
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Group1_FRCARAddressing
DataSource #Address
DataField #FRCARAddressing
ENDPROPERTIES
ENDCONTROL
CONTROL BUTTONGROUP
PROPERTIES
Name #AddressButtonGroup
AutoDeclaration #Yes
ENDPROPERTIES
METHODS
Version: 3
SOURCE #setButtons
#void setButtons()
#{
# addressesMapButton.enabled(address.Address ? true : false);
# //addressDetailsButton.enabled(dirPartyAddressRelationship.RecId ? true : false);
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL BUTTON
PROPERTIES
Name #AddressesMapButton
AutoDeclaration #Yes
HelpText #@SYS103191
Text #@SYS26064
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# super();
#
# smmUtility::mapIt(address);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabPageSales
Caption #@SYS7443
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #SalesOrder
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/B2932F15-A885-4CE0-827A-9F5A8CE70278.htm
DataSource #CustTable
DataGroup #SalesOrder
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #MarkupGroup
DataSource #CustTable
DataField #MarkupGroup
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesOrder_InventSiteId
DataSource #CustTable
DataField #InventSiteId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #InventLocation
DataSource #CustTable
DataField #InventLocation
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CustItemGroupId
DataSource #CustTable
DataField #CustItemGroupId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CommissionGroup
DataSource #CustTable
DataField #CommissionGroup
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesGroup
DataSource #CustTable
DataField #SalesGroup
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesPoolId
DataSource #CustTable
DataField #SalesPoolId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #OurAccountNum
DataSource #CustTable
DataField #OurAccountNum
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Sales_PBACustGroupId
DataSource #CustTable
DataField #PBACustGroupId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Sales_M_interCompanyCompanyId
AllowEdit #No
DataSource #CustTable
DataMethod #interCompanyCompanyId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #SalesOrder_OrderEntryDeadlineGroupId
DataSource #CustTable
DataField #OrderEntryDeadlineGroupId
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Discount
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/072A7E17-531A-4163-9F33-1D48D24C9DCC.htm
Caption #@SYS11829
DataSource #CustTable
DataGroup #SalesDiscount
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #SupplementaryItem
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/68151FEC-2FE6-4F0F-B026-8303568BD812.htm
DataSource #CustTable
DataGroup #SupplementaryItem
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ProjectPriceGroup
ConfigurationKey #ProjBasic
Caption #@SYS102488
DataSource #CustTable
DataGroup #ProjPriceGroup
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #ProjectPriceGroup_ProjPriceGroup
DataSource #CustTable
DataField #ProjPriceGroup
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabService
Caption #@SYS7780
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Service
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/E95D6574-7BDE-4B92-8F7F-A4536EA737AC.htm
DataSource #CustTable
DataGroup #Service
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabCommunication
AutoDeclaration #Yes
Caption #@SYS21663
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #ContactInfo
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/BB01EFB9-5801-4E2A-A283-0950E94A3C21.htm
DataSource #CustTable
DataGroup #ContactInfo
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Phone
AutoDeclaration #Yes
DataSource #CustTable
DataField #Phone
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #PhoneLocal
DataSource #CustTable
DataField #PhoneLocal
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CellularPhone
DataSource #CustTable
DataField #CellularPhone
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ContactInfo_Pager
DataSource #CustTable
DataField #Pager
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #TeleFax
DataSource #CustTable
DataField #TeleFax
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Email
DataSource #CustTable
DataField #Email
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ContactInfo_SMS
DataSource #CustTable
DataField #SMS
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #URL
DataSource #CustTable
DataField #URL
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Telex
DataSource #CustTable
DataField #Telex
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ContactPersonId
AutoDeclaration #Yes
Visible #No
DataSource #CustTable
DataField #ContactPersonId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #LineOfBusinessId
DataSource #CustTable
DataField #LineOfBusinessId
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #editContactPersonName
DataSource #CustTable
DataMethod #editContactPersonName
PresenceDataSource #CustTable
PresenceDataField #ContactPersonId
ENDPROPERTIES
METHODS
Version: 3
SOURCE #jumpRef
#public void jumpRef()
#{
# Args args;
# FormRun formRun;
# ;
#
# args = new Args(formstr(smmContactPerson));
#
# args.record(custTable);
# args.parmEnum(NoYes::Yes); // It's a Go To Main Table call
#
# formRun = classfactory.formRunClass(args);
# formRun.init();
# formRun.run();
# formRun.detach();
#}
ENDSOURCE
SOURCE #lookup
#void lookup()
#{
# ;
# ContactPerson::lookupCustContactPerson(contactPersonId,
# custTable.AccountNum,
# this,
# custTable.ContactPersonId);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ContactInfo_CompanyIdSiret
AutoDeclaration #Yes
DataSource #CustTable
DataField #CompanyIdSiret
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ContactInfo_CompanyIdNAF
AutoDeclaration #Yes
DataSource #CustTable
DataField #CompanyIdNAF
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GRID
PROPERTIES
Name #ContactInfoGrid
AutoDeclaration #Yes
Width #Column width
Height #Column height
DataSource #DirPartyECommunicationRelationship
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #ContactInfoGrid_isShared
BackgroundColor #Window background
DataSource #DirPartyECommunicationRelationship
DataMethod #isShared
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ContactInfoGrid_CommunicationTypeId
AutoDeclaration #Yes
DataSource #DirECommunicationAddress
DataField #ECommunicationTypeId
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #ContactInfoGrid_Status
DataSource #DirPartyECommunicationRelationship
DataField #Status
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ContactInfoGrid_M_editCommunicationValue
AutoDeclaration #Yes
DataSource #DirECommunicationAddress
DataMethod #editCommunicationValue
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #ContactInfoGrid_PhoneLocal
AutoDeclaration #Yes
DataSource #DirECommunicationAddress
DataField #PhoneLocal
ENDPROPERTIES
ENDCONTROL
CONTROL WINDOW
PROPERTIES
Name #CommTypeIcon
Width #15
Height #15
AlignControl #No
BackStyle #Transparent
ShowLabel #No
DataSource #DirECommunicationAddress
DataMethod #showTypeIcon
ENDPROPERTIES
METHODS
Version: 3
SOURCE #mouseUp
#public int mouseUp(int _x, int _y, int _button, boolean _ctrl, boolean _shift)
#{
# int ret;
# fieldId fieldId;
#
# ret = super(_x, _y, _button, _ctrl, _shift);
#
# fieldId = DirECommunicationAddress::type2FieldId(DirECommunicationTypeTable::find(dirECommunicationAddress.eCommunicationTypeId).MethodType);
#
# if (fieldId && fieldId != fieldnum(DirECommunicationAddress, Phone))
# {
# contactInfoGrid_M_editCommunicationValue.setFocus();
# contactInfoGrid_M_editCommunicationValue.performTypeLookup(new SysDictField(dirECommunicationAddress.TableId, fieldId).typeId());
# }
# else if (fieldId && fieldId == fieldnum(DirECommunicationAddress, Phone))
# {
# smmInit::createCall(contactInfoGrid_M_editCommunicationValue.text(), dirPartyECommunicationRelationship, element);
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #ContactInfoGrid_M_editIsSIPAddress
AutoDeclaration #Yes
BackgroundColor #Window background
DataSource #DirECommunicationAddress
DataMethod #isSIPAddress
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #CustomerSelfService
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/064DFF81-5E70-49F5-89C6-315EC5BF3449.htm
DataSource #CustTable
DataGroup #CustomerSelfService
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabPayment
Caption #@SYS828
DataSource #CustTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Payment
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/69BFA06B-0919-4817-BA81-8BD8E827E640.htm
DataSource #CustTable
DataGroup #Payment
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #NotificationToTheCentralBank
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/48030627-DAF4-46DD-8AB8-D2BAF54A3201.htm
DataSource #CustTable
DataGroup #NotificationToTheCentralBank
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabDimension
Caption #@SYS14926
DataSource #CustTable
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Dimension
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/4F44828E-90A6-4D20-930F-ADDE072AE5AC.htm
DataSource #CustTable
DataGroup #Dimension
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Dimension[1]
DataSource #CustTable
DataField #Dimension[1]
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Dimension[2]
DataSource #CustTable
DataField #Dimension[2]
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Dimension[3]
DataSource #CustTable
DataField #Dimension[3]
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL BUTTONGROUP
PROPERTIES
Name #ButtonGroup
DataSource #CustTable
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #smmActivities
MenuItemName #smmActivities
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Transactions
MenuItemName #CustTrans
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CustOpenBalanceCurrency
MenuItemName #CustOpenBalanceCurrency
ENDPROPERTIES
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #MenuButtonSetup
HelpText #@SYS84045
Text #@SYS2186
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# ;
# contactPerson.enabled(custTable.PartyType != DirPartyType::Person);
# super();
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL BUTTON
PROPERTIES
Name #ButtonToggelSimple
AutoDeclaration #Yes
HelpText #@SYS122656
Text #@SYS122657
SaveRecord #No
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# super();
#
# element.toggelSimpleAdvancedCommunication(!advancedCommunication);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Addresses
Text #@SYS36203
MenuItemName #Address
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ContactPerson
AutoDeclaration #Yes
MenuItemName #ContactPerson
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #BankAccounts
MenuItemName #CustBankAccounts
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CreditCardCust
MenuItemName #creditCardcust
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator7
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Commission
MenuItemName #CommissionCalc
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventPosting
Text #@SYS22445
MenuItemName #InventPosting
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator1
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #PrintMgmt
HelpText #@SYS68918
ConfigurationKey #LogisticsBasic
SecurityKey #CustMisc
Text #@SYS54502
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# PrintMgmtSetupContext setupContext = new PrintMgmtSetupContext();
# List salesDocs = new List(Types::Enum);
# List projectDocs = new List(Types::Enum);
# List inventDocs = new List(Types::Enum);
# ;
#
# if (custTable_ds.cursor() == null)
# return;
#
# super();
#
# // Add sales documents
# salesDocs.addEnd(PrintMgmtDocumentType::Confirmation);
# salesDocs.addEnd(PrintMgmtDocumentType::Quotation);
# salesDocs.addEnd(PrintMgmtDocumentType::SalesFreeTextInvoice);
# salesDocs.addEnd(PrintMgmtDocumentType::SalesOrderConfirmation);
# salesDocs.addEnd(PrintMgmtDocumentType::SalesOrderInvoice);
# salesDocs.addEnd(PrintMgmtDocumentType::SalesOrderPackingSlip);
# setupContext.addHierarchyContext(PrintMgmtHierarchyType::Sales, PrintMgmtNodeType::CustTable, salesDocs);
#
# // Add project documents
# projectDocs.addEnd(PrintMgmtDocumentType::ProjectInvoice);
# setupContext.addHierarchyContext(PrintMgmtHierarchyType::Project, PrintMgmtNodeType::CustTable, projectDocs);
#
# //Add invent documents
# inventDocs.addEnd(PrintMgmtDocumentType::InventPickList);
# setupContext.addHierarchyContext(PrintMgmtHierarchyType::Invent, PrintMgmtNodeType::CustTable, inventDocs);
#
#
# setupContext.parmCaller(element);
# setupContext.parmReferencedTableBuffer(custTable_ds.cursor());
# PrintMgmt::launchSetup(setupContext);
#}
#
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesJournalAutoSummary_Cust
MenuItemName #SalesJournalAutoSummary_Cust
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CustExternalItem
Text #@SYS54845
MenuItemName #CustExternalItem
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ExtCodeValueTable
MenuItemName #ExtCodeValueTable
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesPurchCycle_Sales
AutoDeclaration #Yes
Visible #No
MenuItemName #SalesPurchCycle_Sales
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #smmBusinessSectors
MenuItemName #smmBusinessSectors
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #smmResponsibilities
MenuItemName #smmResponsibilities
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator9
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #HRPLimit
MenuItemName #HRPLimitCust
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #TradeAgreements
HelpText #@SYS83638
Text #@SYS13768
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesPrice
MenuItemName #PriceDiscTable_PriceSales
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesLineDisc
MenuItemName #PriceDiscTable_LineDiscSales
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesMultiLineDisc
MenuItemName #PriceDiscTable_MultiLineDiscSales
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesEndDisc
MenuItemName #PriceDiscTable_EndDiscSales
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator2
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjSalesPriceHour
ConfigurationKey #PriceDisc
MenuItemName #ProjSalesPriceHour
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjSalesPriceExpense
ConfigurationKey #PriceDisc
MenuItemName #ProjSalesPriceCost
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjSalesPriceFee
ConfigurationKey #PriceDisc
MenuItemName #ProjSalesPriceRevenue
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjSalesPriceSubscription
ConfigurationKey #PriceDisc
MenuItemName #SMASalesPriceSubsciption
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator4
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SuppItemTable_Sales
MenuItemName #SuppItemTable_Sales
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #AxdSendPricelist
ConfigurationKey #PriceDisc
MenuItemType #Action
MenuItemName #AxdSendPricelist
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #Functions
HelpText #@SYS83636
Text #@SYS10340
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #OpenTrans
MenuItemName #CustOpenTrans
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CustOpenTransReverse
MenuItemName #CustOpenTransReverse
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Seperator1
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #AddContacts
HelpText #@SYS88877
Text #@SYS88837
MultiSelect #Yes
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{;
# smmContactPersonSynchronize::selectPartyFromDataSource(custTable_ds);
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #DirUpdateContactPerson
MenuItemType #Action
MenuItemName #DirUpdateContactPerson
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #Query
HelpText #@SYS83634
Text #@SYS1657
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{;
#
# salesQuotationTable.enabled(SalesQuotationTable::existSales_custAccount(custTable.AccountNum));
# salesQuotationProjTable.enabled(SalesQuotationTable::existProject_custAccount(custTable.AccountNum));
# custQuotationJour.enabled(CustQuotationJour::exist_custAccount(custTable.AccountNum));
# custQuotationJournalConfirmation.enabled(CustQuotationConfirmJour::exist_custAccount(custTable.AccountNum));
#
# super();
#}
ENDSOURCE
ENDMETHODS
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesTable
MenuItemName #SalesTable
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CustSalesLines
MenuItemName #CustSalesLines
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesQuotationTable
AutoDeclaration #Yes
MenuItemName #SalesQuotationTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesQuotationProjTable
AutoDeclaration #Yes
MenuItemName #SalesQuotationProjTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjTable
MenuItemName #ProjTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SMAAgreementTable
MenuItemName #SMAAgreementTable
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SMAServiceOrderTable
MenuItemName #SMAServiceOrderTable
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SMAServiceObjectAgreements
MenuItemName #SMAServiceObjectRelation
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator5
Height #100
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #smmBusRelTable
MenuItemName #smmBusRelTable
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Confirmation
MenuItemName #CustConfirmJournal
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CustQuotationJour
AutoDeclaration #Yes
MenuItemName #CustQuotationJournal
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CustQuotationJournalConfirmation
AutoDeclaration #Yes
Text #@SYS98918
MenuItemName #CustQuotationJournalConfirmation
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesCOD
MenuItemName #SalesCOD
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #PackingSlip
MenuItemName #CustPackingSlipJournal
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #BtnInvoice
MenuItemName #CustInvoiceJournal
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #projectInvoice
ConfigurationKey #ProjBasic
SecurityKey #ProjInquiries
Text #@SYS10619
MenuItemName #ProjInvoiceJournal
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CollectionLetter
MenuItemName #CustCollectionLetterJournal
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Interest
MenuItemName #CustInterestJournal
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator6
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Statistics
MenuItemName #CustStatistics
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #Backorder
MenuItemName #SalesLineBackorder
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator3
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CustPaymManFeeHist
MenuItemName #CustPaymManFeeHist
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CustBillOfExchangeJour
MenuItemName #CustBillOfExchangeJour
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #CustBillOfExchangeStat
MenuItemName #CustBillOfExchangeStat
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator8
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #BusRelFinancials
MenuItemName #smmBusRelFinancials
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #BusRelStatistics
Text #@SYS112767
MenuItemName #smmBusRelStatistics
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Seperator9
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #smmCampaignTable
MenuItemName #smmCampaignTable
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #smmMailings
MenuItemName #smmMailings
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #smmTMCallListGroup
MenuItemName #smmTMCallListGroup
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #smmPhoneLog
AutoDeclaration #Yes
MenuItemName #smmPhoneLog
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #smmTransLog
MenuItemName #smmTransLog
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #smmEncyclopedia
MenuItemName #smmEncyclopedia
ENDPROPERTIES
ENDCONTROL
CONTROL SEPARATOR
PROPERTIES
Name #Separator10
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #InventNonConformanceTable
AutoDeclaration #Yes
MenuItemName #InventNonConformanceTable
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #SalesForecast
Text #@SYS13699
MenuItemName #ForecastSalesTable
DataSource #CustTable
ENDPROPERTIES
ENDCONTROL
CONTROL MENUBUTTON
PROPERTIES
Name #CtrlProjectControl
HelpText #@SYS56214
Text #@SYS56214
ENDPROPERTIES
CONTAINER
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjStatistic
MenuItemName #ProjStatistic
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjCostControl
Text #@SYS103931
MenuItemName #projCostControl
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #projInvoiceControl
MenuItemName #projInvoiceControl
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjUtilization
HelpText #@SYS102845
ConfigurationKey #ProjBasicHour
Text #@SYS102755
MenuItemName #ProjUtilization
ENDPROPERTIES
ENDCONTROL
CONTROL MENUITEMBUTTON
PROPERTIES
Name #ProjCashFlow
ConfigurationKey #ProjAdvCashFlow
MenuItemName #ProjCashFlow
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDDESIGN
ENDFORM
***Element: FRM
; Microsoft Dynamics AX Forms unloaded
; --------------------------------------------------------------------------------
FRMVERSION 5
FORM #CGranCreateCust
PROPERTIES
Name #CGranCreateCust
ENDPROPERTIES
METHODS
Version: 3
SOURCE #classDeclaration
#public class FormRun extends ObjectRun {
#
# boolean create;
#}
ENDSOURCE
SOURCE #isDigit
#//CarlosGranados::Comprobamos si el carácter introducido es un número
#boolean isDigit (str _cad) {
#
#
# ;
#
# if ((str2int(_cad) == 0) && (_cad !='0'))// Si no es dígito devolvemos falso
# return false;
#
# else//Es dígito por tanto devolvemos cierto
# return true;
#
#
#
#}
ENDSOURCE
SOURCE #IECorrectVatNum
#// Carlos Granados
#// Para aquellos NIF's que sean españoles y tengan menos de 9 caracteres,los añado 0's a la izquierda
#VatNum IECorrectVatNum(VatNum _vatNum,AddressCountryRegionId _addressCountryRegionId) {
#
#
# boolean isNIF = true;
# ;
#
#
# if (_addressCountryRegionId == 'ES') {//El NIF/CIF es español
#
# isNIF = element.isDigit(substr(_vatNum,1,1));
# if (isNIF) {//Es NIF porque empieza por número,sino dejamos que se valide por el algoritmo de validación de AX
#
# //Si el DNI tiene menos de 9 dígitos le vamos a rellenar 0's a la izquierda
# _vatNum = strRFix(_vatNum,9,'0');
#
# }
# /* else {// Es un CIF y empieza por letra
#
# if (strlen(_vatNum) != 9)
# throw error ("El CIF introducido es español y debe tener una longitud de 9 caracteres");
#
# }*/
#
#
# }
#
# return _vatNum;
#
#
#
#
#}
ENDSOURCE
SOURCE #CGranValidateRecord
#//CarlosGranados: Validamos la información introducida en la creación del registro
#boolean CGranValidateRecord() {
#
# boolean ret = true;
# ;
#
# if (!VatNum.text())
# ret = checkfailed ("Debe de introducir el número de NIF");
# if (!CountryRegionId.text())
# ret = checkfailed("Debe de introducir el país del NIF");
# if (!Firstname.text())
# ret = checkfailed("Debe de introducir el nombre del cliente");
# if (!MiddleName.text())
# ret = checkfailed("Debe de introducir el primer apellido del cliente");
# if (!Program.text())
# ret = checkfailed("Debe de introducir el programa del alumno");
# if (!LanguageId.valueStr())
# ret = checkfailed("Debe de introducir el idioma del alumno");
#
# // if (!TaxVatNumValidate::checkVATNum(VatNum.text(),CountryRegionId.text()))
# // ret = checkfailed("El NIF introducido tiene un formato incorrecto");
#
#
#
# return ret;
#
#}
ENDSOURCE
SOURCE #close
#//Carlos Granados : En función del varlo de la variable create
#// Creamos o no un nuevo registro en clientes
#public void close()
#{
#
# if (create) {
# if (element.CGranValidateRecord())
# element.CGranCreateRecord();
# }
# else
# element.args().caller().CGranDeleteCustTable();
#
# super();
#}
ENDSOURCE
SOURCE #CGranCreateRecord
#//CarlosGranados: Método de creación de un cliente
#void CGranCreateRecord() {
#
# TaxVatNumTable taxVatNumTable;
# DirPartyTable dirPartyTable;
# DirParty party;
# DirPartyAddress partyAddress;
# DirPartyAddressRelationship dirPartyAddressRelationship;
# VatNum vatNumAux;
# Dimensions dimensions;
# DirPartyId partyId;
# CustTable custTable;
# ;
# vatNumAux = element.IECorrectVatNum(VatNum.valueStr(),CountryRegionId.valueStr());
# vatNumAux = strupr(vatNumAux);
# taxVatNumTable = TaxVatNumTable::find(vatNumAux,CountryRegionId.valueStr());
#
# if (!taxVatNumTable.RecId) { // No existe el NIF en la tabla de maestros de NIF'
# taxVatNumTable.clear();
# taxVatNumTable.VATNum = strupr(vatNumAux);
# taxVatNumTable.CountryRegionId = CountryRegionId.valueStr();
# taxVatNumTable.Name = Name.valueStr();
# taxVatNumTable.CGranFirstName = FirstName.valueStr();
# taxVatNumTable.CGranMiddleName = MiddleName.valueStr();
# taxVatNumTable.CGranLastName = LastName.valueStr();
# if (taxVatNumTable.validateWrite())
# taxVatNumTable.insert();
# else
# throw error("Hubo un error en la creación del NIF");
#
# }
#
# if (!DirPartyTable::CGranFindVatNum(vatNumAux)) { //El cliente no está creado en la tabla DirParty
#
# dirPartyTable.Name = Name.valueStr();
# dirPartyTable.FirstName = FirstName.valueStr();
# dirPartyTable.MiddleName = MiddleName.valueStr();
# dirPartyTable.LastName = LastName.valueStr();
# dirPartyTable.CGranVatNum = strupr(vatNumAux);
# dirPartyTable.Type = DirPartyType::Organization;
# dirPartyTable.LanguageId = languageId.valueStr();
# dirPartyTable.insert();
# partyId = DirPartyTable.PartyId;
#
# }
# else {
# partyId = DirPartyTable::CGranFindVatNum(vatNumAux).partyId;
# }
#
# custTable = CustTable::find(strupr(vatNumAux));
# if (!custTable.RecId) {
# custTable.Name = Name.valueStr();
# custTable.CGranFirstName = FirstName.valueStr();
# custTable.CGranMiddleName = MiddleName.valueStr();
# custTable.CGranLastName = LastName.valueStr();
# custTable.AccountNum = strupr(vatNumAux);
# custTable.VATNum = strupr(vatNumAux);
# custTable.NameAlias = strupr(vatNumAux);
# custTable.PartyId = partyId;
# custTable.Currency = 'EUR';
# custTable.LanguageId = LanguageId.valueStr();
# custTable.PartyType = DirPartyType::Organization;
# custTable.CustGroup = 'CLIENTES';
# custTable.Dimension[3] = Program.text();
# if (!dimensions::find(SysDimension::Center,strupr(vatNumAux))) {
# dimensions.clear();
# dimensions.DimensionCode = SysDimension::Center;
# dimensions.Num = strupr(vatNumAux);
# dimensions.Description = Name.valueStr();
# }
# if (!dimensions::find(SysDimension::Purpose,strupr(vatNumAux))) {
# dimensions.clear();
# dimensions.DimensionCode = SysDimension::Purpose;
# dimensions.Num = strupr(vatNumAux);
# dimensions.Description = Name.valueStr();
#
# }
#
# custTable.insert();
# element.args().caller().CGranWriteCustTable();
# }
#
# else {
# throw error (strfmt("El cliente :%1 ya existe",strupr(vatNumAux)));
# }
#
#
#
#
#}
ENDSOURCE
ENDMETHODS
OBJECTBANK
PROPERTIES
ENDPROPERTIES
ENDOBJECTBANK
JOINS
ENDJOINS
DESIGN
PROPERTIES
Caption #Alta de cliente
MaximizeBox #No
MinimizeBox #No
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #Group
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #NIF
AutoDeclaration #Yes
Caption #NIF/CIF
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #CountryRegionId
AutoDeclaration #Yes
Mandatory #Yes
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #VatNum
AutoDeclaration #Yes
Mandatory #Yes
ExtendedDataType
ARRAY
#VATNum
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #PersonalInformation
AutoDeclaration #Yes
Caption #Datos personales
Columns #4
ArrangeGuide
ARRAY INDEX Columns
#0
#0
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #FirstName
AutoDeclaration #Yes
Mandatory #Yes
ExtendedDataType
ARRAY
#Name
#
ENDARRAY
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#//CarlosGranados: Compongo el nombre del cliente
#public boolean modified()
#{
# boolean ret;
#
# ret = super();
# if(Firstname.valueStr() || MiddleName.valueStr() || LastName.valueStr())
# Name.text(MiddleName.valueStr() + ' ' + LastName.valueStr() + ',' + FirstName.valueStr());
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #MiddleName
AutoDeclaration #Yes
Label #Primer Apellido
Mandatory #Yes
ExtendedDataType
ARRAY
#MiddleName
#
ENDARRAY
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#//CarlosGranados: Compongo el nombre del cliente
#public boolean modified()
#{
# boolean ret;
#
# ret = super();
# if(Firstname.valueStr() || MiddleName.valueStr() || LastName.valueStr())
# Name.text(MiddleName.valueStr() + ' ' + LastName.valueStr() + ',' + FirstName.valueStr());
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #LastName
AutoDeclaration #Yes
Label #Segundo apellido
ExtendedDataType
ARRAY
#LastName
#
ENDARRAY
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#//CarlosGranados: Compongo el nombre del cliente
#public boolean modified()
#{
# boolean ret;
#
# ret = super();
# if(Firstname.valueStr() || MiddleName.valueStr() || LastName.valueStr())
# Name.text(MiddleName.valueStr() + ' ' + LastName.valueStr() + ',' + FirstName.valueStr());
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL DATEEDIT
PROPERTIES
Name #BirthDate
AutoDeclaration #Yes
Mandatory #Yes
ExtendedDataType
ARRAY
#BirthDate
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Language
AutoDeclaration #Yes
Caption #Información adicional
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Name
AutoDeclaration #Yes
AllowEdit #No
Label #Nombre completo
ExtendedDataType
ARRAY
#Name
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #LanguageId
AutoDeclaration #Yes
Mandatory #Yes
ExtendedDataType
ARRAY
#LanguageId
#
ENDARRAY
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#//CarlosGranados: Modificación-evento del idioma
#public boolean modified()
#{
# boolean ret;
#
# ret = super();
#
# if (ret) {
# if (!LanguageTable::CGranFind(LanguageId.valueStr())) {
#
# LanguageId.text("");
# ret = checkfailed("El idioma introducido no existe");
# }
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #UniversityProgram
AutoDeclaration #Yes
Caption #Información académica
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Program
AutoDeclaration #Yes
Mandatory #Yes
ExtendedDataType
ARRAY
#CGranProgram
#
ENDARRAY
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#//CarlosGranados:Muestro el nombre del programa seleccionado
#public boolean modified()
#{
# boolean ret;
#
# ret = super();
#
# if (ret) {
# if (Dimensions::find(SysDimension::Purpose,Program.text())) {
# DescriptionProgram.text(Dimensions::find(SysDimension::Purpose,Program.text()).Description);
# }
# else {
# ret = checkfailed("El programa introducido no existe");
# Program.text("");
# DescriptionProgram.text("");
# }
#
# }
#
# return ret;
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #DescriptionProgram
AutoDeclaration #Yes
AllowEdit #No
ExtendedDataType
ARRAY
#Description
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Buttons
AutoDeclaration #Yes
Columns #2
ArrangeGuide
ARRAY INDEX Columns
#0
#0
ENDARRAY
ENDPROPERTIES
CONTAINER
CONTROL BUTTON
PROPERTIES
Name #OK
AutoDeclaration #Yes
Text #Aceptar
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#//Carlos Granados : Actualizamos variable booleana y llamamos a método close
#void clicked()
#{
# create = true;
# element.close();
#
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #Cancel
AutoDeclaration #Yes
Text #Cancelar
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#//Carlos Granados
#// Cuando pulso el botón llamo al cierre del formulario
#void clicked()
#{
# create = false;
# element.close();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDDESIGN
ENDFORM
***Element: CLS
; Microsoft Dynamics AX Class: SalesFormLetter_PackingSlip descargados
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #SalesFormLetter_PackingSlip
Id 532
PROPERTIES
Name #SalesFormLetter_PackingSlip
Extends #SalesFormLetter
RunOn #Called from
ENDPROPERTIES
METHODS
Version: 3
SOURCE #addToInventReportDimHistory
#void addToInventReportDimHistory(CustPackingSlipTrans _custPckSlpTrans)
#{
# InventTrans inventTrans;
# InventQty qtyRemain = _custPckSlpTrans.InventQty;
# InventQty qtyTrans;
# InventReportDimHistory inventReportDimHistory;
# ;
#
# while select inventTrans
# index hint TransIdIdx
# where inventTrans.InventTransId == _custPckSlpTrans.InventTransId &&
# inventTrans.TransType == InventTransType::Sales &&
# inventTrans.PackingSlipId == _custPckSlpTrans.PackingSlipId &&
# inventTrans.DatePhysical == _custPckSlpTrans.DeliveryDate
# {
# if (qtyRemain)
# {
# if (abs(inventTrans.Qty) < abs(qtyRemain))
# {
# qtyTrans = -inventTrans.Qty;
# qtyRemain -= inventTrans.Qty;
# }
# else
# {
# qtyTrans = qtyRemain;
# qtyRemain = 0;
# }
#
#
# inventReportDimHistory.clear();
# inventReportDimHistory.TransactionLogType = InventReportDimHistoryLogType::SalesPackingSlip;
# inventReportDimHistory.TransRefId = _custPckSlpTrans.PackingSlipId;
# inventReportDimHistory.InventTransId = inventTrans.InventTransId;
# inventReportDimHistory.InventDimId = inventTrans.InventDimId;
#
# recordListInventReportDimHistory.find(inventReportDimHistory);
#
# inventReportDimHistory.Qty += qtyTrans;
#
# recordListInventReportDimHistory.ins(inventReportDimHistory,true);
#
# }
# else
# break;
# }
#}
#
#
ENDSOURCE
SOURCE #allocateNumAndVoucher
#NumberSeq allocateNumAndVoucher()
#{
# NumberSequenceCode packingSlipNumber;
# NumberSequenceCode packingSlipVoucher;
#
# boolean voucherEqualsNumber;
# ;
#
# if (salesTable.NumberSequenceGroup)
# {
# packingSlipNumber = NumberSequenceGroupRef::find(SalesParameters::numRefPackingSlipId().DataTypeId, salesTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!packingSlipNumber)
# {
# packingSlipNumber = NumberSequenceReference::find(SalesParameters::numRefPackingSlipId().DataTypeId).NumberSequence;
# }
#
# if (SalesParameters::numRefSalesPackingSlipVoucher().AllowSameAs)
# {
# voucherEqualsNumber = true;
# packingSlipVoucher = packingSlipNumber;
# }
# else
# {
# packingSlipVoucher = NumberSequenceGroupRef::find(SalesParameters::numRefSalesPackingSlipVoucher().DataTypeId, salesTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!packingSlipVoucher)
# {
# packingSlipVoucher = SalesParameters::numRefSalesPackingSlipVoucher().NumberSequence;
# }
# }
#
# return NumberSeq::newGetNumAndVoucherFromCode(packingSlipNumber, packingSlipVoucher, voucherEqualsNumber);
# }
#
# return NumberSeq::newGetNumAndVoucher(SalesParameters::numRefPackingSlipId(),
# SalesParameters::numRefSalesPackingSlipVoucher());
#}
ENDSOURCE
SOURCE #calcShippingStat
#void calcShippingStat(SalesShippingStat _salesShippingStat, SalesShippingStat _oldSalesShippingStat)
#{
# _salesShippingStat.GrossWeight = _salesShippingStat.GrossWeight - _oldSalesShippingStat.UnitWeight + _salesShippingStat.UnitWeight;
#}
ENDSOURCE
SOURCE #canGoBatchJournal
#public boolean canGoBatchJournal()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkBeforePosting
#private void checkBeforePosting()
#{
# InventQualityOrderType inventQualityOrderType;
# int curInfoLogLine;
# ;
# if ((salesParmLine.RemainBefore != salesLine.RemainSalesPhysical) ||
# (salesParmLine.RemainBeforeInvent != salesLine.RemainInventPhysical))
# {
# throw error("@SYS23025");
# }
#
# if (salesLine.RecId && InventParameters::find().UseQualityManagement)
# {
# curInfoLogLine = infolog.line();
# inventQualityOrderType = InventQualityOrderType::newBuffer(salesLine, NoYes::No, InventTestDocumentStatus::PackingSlip, InventTestExecution::Before);
# if (inventQualityOrderType.findAndCreate())
# {
# infolog.cut(curInfoLogLine + 1, infolog.line());
# throw error("@SYS114696");
# }
# }
#
#}
ENDSOURCE
SOURCE #checkCallerDataSource
#///
#/// Check if the calling data source can be processed in this update.
#///
#///
#/// The tableId of the records in the calling data source.
#///
#///
#/// The data source from the calling form.
#///
#///
#/// true if the check succeeded; otherwise, false.
#///
#boolean checkCallerDataSource(tableId _callingTableId, FormDataSource _recordDataSource)
#{
# boolean ret = super(_callingTableId, _recordDataSource);
# InventQualityOrderType inventQualityOrderType;
# SalesTable localSalesTable;
# SalesLine localSalesLine;
# boolean addedAnyQualityOrder = false;
# Counter callerRecords = 0;
# ;
# if (_recordDataSource && InventParameters::find().UseQualityManagement)
# {
# switch(_callingTableId)
# {
# case tablenum(SalesTable):
# for (localSalesTable = _recordDataSource.getFirst(true) ? _recordDataSource.getFirst(true) : _recordDataSource.cursor(); localSalesTable; localSalesTable = _recordDataSource.getNext())
# {
# if (localSalesTable.RecId)
# {
# callerRecords++;
# inventQualityOrderType = InventQualityOrderType::newBuffer(localSalesTable, NoYes::No, InventTestDocumentStatus::PackingSlip, InventTestExecution::Before);
# if (inventQualityOrderType.findAndCreate())
# {
# addedAnyQualityOrder = true;
# }
# }
# }
# break;
# case tablenum(SalesLine):
# for (localSalesLine = _recordDataSource.getFirst(true) ? _recordDataSource.getFirst(true) : _recordDataSource.cursor(); localSalesLine; localSalesLine = _recordDataSource.getNext())
# {
# if (localSalesLine.RecId)
# {
# callerRecords++;
# inventQualityOrderType = InventQualityOrderType::newBuffer(localSalesLine, NoYes::No, InventTestDocumentStatus::PackingSlip, InventTestExecution::Before);
# if (inventQualityOrderType.findAndCreate())
# {
# addedAnyQualityOrder = true;
# }
# }
# }
# break;
# }
# if (addedAnyQualityOrder)
# {
# SalesFormLetter::updateCallerDataSource(_recordDataSource, false, true, callerRecords > 1, null);
# throw error("@SYS113800");
# }
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #checkCreateParmLine
#protected boolean checkCreateParmLine(SalesLine _salesLine)
#{
# return (_salesLine.ReturnStatus == ReturnStatusLine::None
# || (_salesLine.ReturnStatus == ReturnStatusLine::Registered && _salesLine.Scrap == NoYes::No && !_salesLine.isReturnReservationLine())
# || (_salesLine.ReturnStatus == ReturnStatusLine::Awaiting && _salesLine.Scrap == NoYes::No && !_salesLine.isReturnReservationLine() && interCompanyParmId));
#}
#
ENDSOURCE
SOURCE #chooseLinesFromWMSArrival
#///
#/// Selects SalesLines for update based on entries in the Arrival journal.
#///
#void chooseLinesFromWMSArrival()
#{
# WMSJournalTable wmsJournal;
# WMSJournalTrans wmsJournalTrans;
# SalesId previousSalesId;
# SalesLine localSalesLine;
# SalesParmTable localSalesParmTable;
# TradeLineRefId tableRef;
# boolean tableRefUsed = true;
# InventSiteId inventSiteId;
# SalesParmSubTable salesParmSubTable;
# SalesTable localSalesTable;
# InventQuarantineOrder quarantineOrder;
#
# void createParmTable()
# {
# if (this.allowCreateParmTable())
# {
# if (!localSalesParmTable.ParmId)
# {
# this.createParmTable(localSalesParmTable,
# localSalesTable,
# inventSiteId,
# localSalesTable.SalesName);
#
# recordInsertSalesParmTable.add(localSalesParmTable);
# salesParmTableMap.insert(this.salesParmTableMapKey(localSalesParmTable.SalesId, inventSiteId, '', '', ''), localSalesParmTable);
#
# salesParmSubTable = SalesParmSubTable::createFromSalesParmTable(localSalesParmTable,false);
# recordInsertSalesParmSubTable.add(salesParmSubTable);
#
# tableRefUsed = true;
# this.allowCreateParmTable(this.allowEmptyTable());
# }
# }
# }
#
# ;
#
# this.recordInsertListInit();
# ttsbegin;
#
# this.lockSalesUpdateField(true);
#
# for (wmsJournal = wmsArrival_ds.getFirst(true) ? wmsArrival_ds.getFirst(true) : wmsArrival_ds.cursor(); wmsJournal; wmsJournal = wmsArrival_ds.getNext())
# {
# previousSalesId = '';
#
# while select InventTransId, InventTransType, InventTransRefId, sum(Qty) from wmsJournalTrans
# group by InventTransRefId, InventTransId, InventTransType // ensure order by InventTransRefId and group by inventTransId
# where wmsJournalTrans.JournalId == wmsJournal.JournalId && wmsJournalTrans.ReturnItemNum
# {
# localSalesLine.clear();
# switch (wmsJournalTrans.InventTransType)
# {
# case InventTransType::Sales :
# select firstonly localSalesLine where localSalesLine.InventTransId == wmsJournalTrans.InventTransId
# join localSalesTable where localSalesTable.SalesId == localSalesLine.SalesId;
# break;
#
# case InventTransType::QuarantineOrder :
# select firstonly quarantineOrder where quarantineOrder.QuarantineId == wmsJournalTrans.InventTransRefId &&
# quarantineOrder.InventTransId == wmsJournalTrans.InventTransId
# join localSalesLine where localSalesLine.InventTransId == quarantineOrder.InventTransIdRef
# join localSalesTable where localSalesTable.SalesId == localSalesLine.SalesId;
# break;
# }
#
# if (localSalesLine && !salesParmLineMap.exists(this.salesParmLineMapKey(localSalesLine.SalesId,localSalesLine.InventTransId)))
# {
# inventSiteId = this.site(localSalesLine, localSalesTable);
#
# if (!localSalesParmTable.RecId ||
# localSalesParmTable.SalesId != localSalesLine.SalesId ||
# localSalesParmTable.InventSiteId != inventSiteId)
# {
# if (salesParmTableMap.exists(this.salesParmTableMapKey(localSalesTable.SalesId,
# inventSiteId,
# '',
# '',
# '')))
# {
# localSalesParmTable = salesParmTableMap.lookup(this.salesParmTableMapKey(localSalesTable.SalesId,
# inventSiteId,
# '',
# '',
# ''));
# }
# else
# {
# localSalesParmTable.clear();
# }
# }
#
# if (!localSalesParmTable.TableRefId)
# {
# localSalesParmTable.clear();
# if (tableRefUsed)
# {
# tableRef = FormLetter::getTableRef();
# tableRefUsed = false;
# }
# localSalesParmTable.TableRefId = tableRef;
# }
#
# if (this.createParmLineFromWMSArrivalTrans(localSalesLine, wmsJournalTrans.Qty, tableRef))
# {
# previousSalesId = localSalesLine.SalesId;
# createParmTable();
# }
# }
# }
# }
# this.reArrange(false);
# this.recordInsertListInsert();
# ttscommit;
#}
ENDSOURCE
SOURCE #chooseLinesFromWMSShipment
#void chooseLinesFromWMSShipment()
#{
# WMSShipment wmsShipment;
# ;
# wmsShipmentIdSet = new Set(Types::String);
#
# for (wmsShipment = wmsShipment_ds.getFirst(true) ? wmsShipment_ds.getFirst(true) : wmsShipment_ds.cursor(); wmsShipment; wmsShipment = wmsShipment_ds.getNext())
# {
# wmsShipmentIdSet.add(wmsShipment.ShipmentId);
# }
# this.chooseLinesFromWMSShipmentSet();
#}
ENDSOURCE
SOURCE #chooseLinesFromWMSShipmentSet
#void chooseLinesFromWMSShipmentSet()
#{
# WMSShipment wmsShipment;
# WMSOrderTrans wmsOrderTrans;
# SalesId previousSalesId;
# SalesLine localSalesLine;
# SalesParmTable localSalesParmTable;
# SalesParmSubTable salesParmSubTable;
# TradeLineRefId tableRef;
# boolean tableRefUsed = false;
# SetEnumerator se;
#
# void createParmTable()
# {
# if (this.allowCreateParmTable())
# {
# localSalesParmTable.clear();
# localSalesParmTable.TableRefId = tableRef;
#
# this.createParmTable(localSalesParmTable, SalesTable::find(previousSalesId));
#
# recordInsertSalesParmTable.add(localSalesParmTable);
# salesParmTableMap.insert(this.salesParmTableMapKey(localSalesParmTable.SalesId, '', '', '', ''), localSalesParmTable);
# salesParmSubTable = SalesParmSubTable::createFromSalesParmTable(localSalesParmTable,false);
# recordInsertSalesParmSubTable.add(salesParmSubTable);
#
# tableRefUsed = true;
# this.allowCreateParmTable(this.allowEmptyTable());
# }
# }
# ;
# if (!wmsShipmentIdSet || wmsShipmentIdSet.elements() == 0)
# return;
#
# this.recordInsertListInit();
#
# ttsbegin;
#
# salesParmUpdate = SalesParmUpdate::find(salesParmUpdate.ParmId, true);
# salesParmUpdate.SpecQty = SalesUpdate::DeliverNow;
# salesParmUpdate.SumBy = AccountOrder::Account;
#
# this.lockSalesUpdateField(true);
#
# salesParmUpdate.update();
#
# se = wmsShipmentIdSet.getEnumerator();
# while (se.moveNext())
# {
# wmsShipment = WMSShipment::find(se.current());
# if (wmsShipment.PackingType == WMSPackingType::Order)
# {
# this.sumBy(AccountOrder::None);
# break;
# }
# }
#
# se.reset();
# while (se.moveNext())
# {
# previousSalesId = '';
#
# while select InventTransId, sum(Qty) from wmsOrderTrans
# group by InventTransRefId, InventTransId // ensure order by InventTransRefId and group by inventTransId
# where wmsOrderTrans.ShipmentId == se.current()
# && wmsOrderTrans.InventTransType == InventTransType::Sales
# &&(wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Picked
# || wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Staged
# || wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Loaded
# || wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Complete)
# {
# localSalesLine = SalesLine::findInventTransId(wmsOrderTrans.InventTransId);
#
# if (((previousSalesId != localSalesLine.SalesId) && tableRefUsed) || (!tableRef))
# {
# tableRef = FormLetter::getTableRef();
# }
#
# if (this.createParmLineFromWMSOrderTrans(SalesLine::findInventTransId(wmsOrderTrans.InventTransId), wmsOrderTrans.Qty, tableRef))
# {
# if (previousSalesId != localSalesLine.SalesId)
# {
# previousSalesId = localSalesLine.SalesId;
# createParmTable();
# }
# }
# }
# }
# this.recordInsertListInsert();
# this.reArrange(false);
#
# ttscommit;
#}
ENDSOURCE
SOURCE #classDeclaration
#class SalesFormLetter_PackingSlip
#extends SalesFormLetter
#{
# CustPackingSlipJour custPckSlpJour;
# CustPackingSlipTrans custPckSlpTrans;
# VendInvoiceJour vendInvoiceJour;
# VendPackingSlipJour vendPackingSlipJour;
# AddressCountryRegionId vendCountryRegionId;
# RecordSortedList recordList4ShipCarrierTestMode;
#
# #define.CurrentVersion(6)
# #LOCALMACRO.ParmList
# parmId,
# salesParmUpdate,
# backorder,
# queryCriteria,
# editing,
# printout,
# printFormletter,
# printersettingsFormletter,
# printFreightSlip,
# printerSettingsFreightSlip,
# printShippingLabel,
# printerSettingsShippingLabel,
# printersettingsFormletterCopy,
# usePrintManagement
# #ENDMACRO
#}
#
ENDSOURCE
SOURCE #createParmLineFromWMSArrivalTrans
#///
#/// Selects SalesLines for update based on entries in the Arrival journal.
#///
#///
#/// A SalesLine table buffer.
#///
#///
#/// An InventQty Extended data type.
#///
#///
#/// A TradeLineRefId Extended data type.
#///
#///
#/// Returns true if lines are successfully inserted in the SalesParmLine table, otherwise false.
#///
#boolean createParmLineFromWMSArrivalTrans(SalesLine _salesLine,
# InventQty _qtyDeliver,
# TradeLineRefId _tableRef)
#{
# boolean ret = false;
# SalesParmLine _salesParmLine;
#
# _salesLine.InventDeliverNow = _qtyDeliver;
# _salesLine.SalesDeliverNow = UnitConvert::qty(-_qtyDeliver,
# _salesLine.inventTable().inventUnitId(),
# _salesLine.SalesUnit,
# _salesLine.ItemId);
# if (_salesLine.RecId && this.checkCreateParmLine(_salesLine))
# {
# _salesParmLine.clear();
# _salesParmLine.TableRefId = _tableRef;
#
# [_salesParmLine.DeliverNow, _salesParmLine.RemainBefore , _salesParmLine.RemainAfter ] = this.qtySales (_salesLine, naReal());
# [_salesParmLine.InventNow, _salesParmLine.RemainBeforeInvent, _salesParmLine.RemainAfterInvent] = this.qtyInvent(_salesLine, naReal());
#
# if (_salesParmLine.DeliverNow || (_salesParmLine.RemainBefore)) // && remain))
# {
# _salesParmLine.ParmId = salesParmUpdate.ParmId;
# _salesParmLine.initFromSalesLine(_salesLine);
# _salesParmLine.setQty(DocumentStatus::PackingSlip, salesParmUpdate.CreditRemaining);
# _salesParmLine.setInventDeliverNow();
# _salesParmLine.setLineAmount(_salesLine);
# _salesParmLine.calcPackingUnitQty();
# _salesParmLine.RecId = systemSequence.reserveValues(1,tablenum(SalesParmLine));
# salesParmLineMap.insert(this.salesParmLineMapKey(_salesParmLine.OrigSalesId,_salesParmLine.InventTransId),_salesParmLine);
# recordInsertSalesParmLine.add(_salesParmLine);
#
# this.allowCreateParmTable(true);
# ret = true;
# }
# }
# return ret;
#}
ENDSOURCE
SOURCE #createParmLineFromWMSOrderTrans
#boolean createParmLineFromWMSOrderTrans(SalesLine _salesLine,
# InventQty _qtyDeliver,
# TradeLineRefId _tableRef)
#{
# boolean ret = false;
# SalesParmLine _salesParmLine;
# InventQty qtyPicked = _salesLine.pickedInTotalInventUnit();
# ;
# if (qtyPicked > _qtyDeliver)
# qtyPicked = _qtyDeliver;
#
# if (qtyPicked == 0)
# return false;
#
# _salesLine.InventDeliverNow = qtyPicked;
# _salesLine.SalesDeliverNow = UnitConvert::qty(qtyPicked,
# _salesLine.inventTable().inventUnitId(),
# _salesLine.SalesUnit,
# _salesLine.ItemId);
# if (_salesLine.RecId)
# {
# _salesParmLine.clear();
# _salesParmLine.TableRefId = _tableRef;
#
# [_salesParmLine.DeliverNow, _salesParmLine.RemainBefore , _salesParmLine.RemainAfter ] = this.qtySales (_salesLine, naReal());
# [_salesParmLine.InventNow, _salesParmLine.RemainBeforeInvent, _salesParmLine.RemainAfterInvent] = this.qtyInvent(_salesLine, naReal());
#
# if (_salesParmLine.DeliverNow || (_salesParmLine.RemainBefore)) // && remain))
# {
# _salesParmLine.ParmId = salesParmUpdate.ParmId;
# _salesParmLine.initFromSalesLine(_salesLine);
#
# _salesParmLine.setQty(DocumentStatus::PackingSlip, salesParmUpdate.CreditRemaining);
# _salesParmLine.setInventDeliverNow();
# _salesParmLine.setLineAmount(_salesLine);
# _salesParmLine.calcPackingUnitQty();
# _salesParmLine.RecId = systemSequence.reserveValues(1,tablenum(SalesParmLine));
# salesParmLineMap.insert(this.salesParmLineMapKey(_salesParmLine.OrigSalesId,_salesParmLine.InventTransId),_salesParmLine);
# recordInsertSalesParmLine.add(_salesParmLine);
#
#
# this.allowCreateParmTable(true);
# ret = true;
# }
# }
# return ret;
#}
ENDSOURCE
SOURCE #documentStatus
#DocumentStatus documentStatus()
#{
# return DocumentStatus::PackingSlip;
#}
ENDSOURCE
SOURCE #editLinesChanged
#boolean editLinesChanged(boolean _editLinesChanged = editLinesChanged)
#{;
# return super();
#}
ENDSOURCE
SOURCE #getSplitDeliveryInformation
#boolean getSplitDeliveryInformation()
#{
# return SalesParameters::find().SplitDeliveryPackingSlip;
#}
ENDSOURCE
SOURCE #getSplitSite
#TradeSplitSite getSplitSite()
#{
# ;
# return SalesParameters::find().SplitSitePackingSlip;
#}
ENDSOURCE
SOURCE #initJournal
#protected void initJournal()
#{;
# custPckSlpJour.clear();
# custPckSlpJour.initValue();
#
# custPckSlpJour.LedgerVoucher = voucher;
# if (!voucher && !salesParmUpdate.Proforma)
# {
# throw error("@SYS71652");
# }
#
# custPckSlpJour.PackingSlipId = number;
# custPckSlpJour.ParmId = salesParmUpdate.ParmId;
# custPckSlpJour.ReturnPackingSlipId = salesParmTable.ReturnPackingSlipId;
# custPckSlpJour.DeliveryDate = this.updateDate();
#
# custPckSlpJour.initFromSalesTable(salesTable);
#
# custPckSlpJour.InterCompanyPosted = this.interCompanyPosted();
#}
#
ENDSOURCE
SOURCE #initJournalLine
#protected void initJournalLine()
#{;
# custPckSlpTrans.clear();
# custPckSlpTrans.initValue();
#}
#
ENDSOURCE
SOURCE #initParmDefault
#public void initParmDefault()
#{
# super();
#
# salesParmUpdate.CreditRemaining = true;
#}
ENDSOURCE
SOURCE #initParmSalesTable
#///
#/// Initialize parameters based on a SalesTable record.
#///
#///
#/// The SalesTable to initialize from.
#///
#///
#/// Quality orders were created before posting the packing slip. These must be updated first.
#///
#protected void initParmSalesTable(SalesTable _salesTable)
#{
# InventQualityOrderType inventQualityOrderType;
# ;
# if (_salesTable.RecId && InventParameters::find().UseQualityManagement)
# {
# inventQualityOrderType = InventQualityOrderType::newBuffer(_salesTable, NoYes::No, InventTestDocumentStatus::PackingSlip, InventTestExecution::Before);
# if (inventQualityOrderType.findAndCreate())
# {
# throw Exception::Warning; // message already put in info log
# }
# }
#
# super(_salesTable);
#}
ENDSOURCE
SOURCE #initPrinterSettingsFormletter
#///
#/// Initializes printer settings for the posting the sales order with default values
#///
#void initPrinterSettingsFormletter()
#{
# PrintJobSettings printJobSettings;
# ;
# super();
#
# printJobSettings = new PrintJobSettings(this.printerSettingsFormletter(PrintSetupOriginalCopy::Original));
# printJobSettings.storeInPrintArchive(CustFormletterParameters::find().StoreInPrintArchivePackingSlip);
# this.updatePrinterSettingsFormLetter(printJobSettings.packPrintJobSettings(),PrintSetupOriginalCopy::Original);
#}
#
ENDSOURCE
SOURCE #initShippingStat
#void initShippingStat(CustPackingSlipJour _custPackingSlipJour)
#{
# SalesShippingStat salesShippingStatLocal;
#
# recordListShippingLine = new RecordSortedList(tablenum(SalesShippingStat));
# recordListShippingLine.sortOrder(fieldnum(SalesShippingStat, RecId));
#
# while select salesShippingStatLocal
# where salesShippingStatLocal.SalesId == _custPackingSlipJour.SalesId &&
# salesShippingStatLocal.PackingSlipId == _custPackingSlipJour.PackingSlipId &&
# salesShippingStatLocal.DeliveryDate == _custPackingSlipJour.DeliveryDate
# {
# recordListShippingLine.ins(salesShippingStatLocal);
# }
#}
ENDSOURCE
SOURCE #initTransactionTxt
#protected TransactionTxt initTransactionTxt()
#{
# TransactionTxt transactionTxt;
# ;
# transactionTxt = new TransactionTxt();
# transactionTxt.setType (LedgerTransTxt::SalesPackingSlipLedger);
# transactionTxt.setLanguage (custPckSlpJour.LanguageId);
# transactionTxt.setVoucher (custPckSlpJour.LedgerVoucher);
# transactionTxt.setFormLetter (custPckSlpJour.PackingSlipId);
# transactionTxt.setKey1 (custPckSlpJour.SalesId);
# transactionTxt.setKey2 (custPckSlpJour.OrderAccount);
# transactionTxt.setKey3 (CustTable::groupId(custPckSlpJour.OrderAccount));
#
# return transactionTxt;
#}
ENDSOURCE
SOURCE #insertJournal
#///
#/// Performs credit card pre-authorization when needed.
#///
#protected void insertJournal()
#{
# ;
# if (!this.creditCardDoPreAuthorize())
# {
# return;
# }
#
# super();
#}
ENDSOURCE
SOURCE #interCompanyParmLineClosed
#boolean interCompanyParmLineClosed(Common _common)
#{
# SalesLine _salesLine = _common;
# SalesTable _salesTable = _salesLine.salesTable();
# PurchParmLine purchParmLine;
# NoYes ret;
#;
# if (interCompanyCompanyId)
# {
# changecompany(interCompanyCompanyId)
# {
# select firstonly Closed from purchParmLine
# where purchParmLine.ParmId == interCompanyParmId
# && purchParmLine.OrigPurchId == _salesTable.InterCompanyPurchId
# && purchParmLine.InventTransId == _salesLine.InterCompanyInventTransId;
#
# ret = purchParmLine.Closed;
# }
# }
# else
# {
# select firstonly Closed from purchParmLine
# where purchParmLine.ParmId == interCompanyParmId
# && purchParmLine.OrigPurchId == _salesLine.InventRefId
# && purchParmLine.InventTransId == _salesLine.InventRefTransId;
#
# ret = purchParmLine.Closed;
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #interCompanyParmLineQty
#Qty interCompanyParmLineQty(Common _common, boolean _isInventQty = false)
#{
# SalesLine salesLineLocal = _common;
# VendPackingSlipTrans vendPackingSlipTransLocal;
# VendPackingSlipJour vendPackingSlipJourLocal;
#;
# if (interCompanyCompanyId)
# {
# changecompany(interCompanyCompanyId)
# {
# select forceplaceholders InventQty, Qty from vendPackingSlipTransLocal
# where vendPackingSlipTransLocal.InventTransId == salesLineLocal.InterCompanyInventTransId
# exists join vendPackingSlipJourLocal
# where vendPackingSlipJourLocal.PackingSlipId == vendPackingSlipTransLocal.PackingSlipId
# && vendPackingSlipJourLocal.DeliveryDate == vendPackingSlipTransLocal.DeliveryDate
# && vendPackingSlipJourLocal.PurchId == vendPackingSlipTransLocal.PurchId
# && vendPackingSlipJourLocal.InternalPackingSlipId == vendPackingSlipTransLocal.InternalPackingSlipId
# && vendPackingSlipJourLocal.ParmId == interCompanyParmId;
# }
# }
# else
# {
# select forceplaceholders InventQty, Qty from vendPackingSlipTransLocal
# where vendPackingSlipTransLocal.InventTransId == salesLineLocal.InventRefTransId
# exists join vendPackingSlipJourLocal
# where vendPackingSlipJourLocal.PackingSlipId == vendPackingSlipTransLocal.PackingSlipId
# && vendPackingSlipJourLocal.DeliveryDate == vendPackingSlipTransLocal.DeliveryDate
# && vendPackingSlipJourLocal.PurchId == vendPackingSlipTransLocal.PurchId
# && vendPackingSlipJourLocal.InternalPackingSlipId == vendPackingSlipTransLocal.InternalPackingSlipId
# && vendPackingSlipJourLocal.ParmId == interCompanyParmId;
# }
# return _isInventQty ? vendPackingSlipTransLocal.InventQty : vendPackingSlipTransLocal.Qty;
#}
#
#
ENDSOURCE
SOURCE #interCompanyPost
#void interCompanyPost()
#{;
# if (custPckSlpJour.interCompanyDoInternalPosting()
# || (custPckSlpJour.InterCompanyCompanyId && custPckSlpJour.interCompanyDoExternalPosting()))
# {
# InterCompanyPostPurch::post(this,custPckSlpJour,journalList);
# }
#}
#
ENDSOURCE
SOURCE #journal
#CustPackingSlipJour journal()
#{
# return custPckSlpJour;
#}
ENDSOURCE
SOURCE #mayJournalBePosted
#public boolean mayJournalBePosted(SalesTable _salesTable)
#{
# return _salesTable.mayPackingSlipBeUpdated();
#}
ENDSOURCE
SOURCE #mayJournalTransBePosted
#public boolean mayJournalTransBePosted(SalesLine _salesLine)
#{
# return _salesLine.mayPackingSlipBeUpdated();
#}
#
ENDSOURCE
SOURCE #new
#void new(boolean getParmId = true)
#{
# super(getParmId);
#
# useShippingStat = SalesParameters::find().useShippingStatOnPackingSlip();
#}
ENDSOURCE
SOURCE #newJournalList
#///
#/// Constructs a record sorted list.
#///
#///
#/// The constructed record sorted list.
#///
#public RecordSortedList newJournalList()
#{
# RecordSortedList recordSortedList;
# ;
#
# recordSortedList = new RecordSortedList(tablenum(CustPackingSlipJour));
# recordSortedList.sortOrderFromContainer(this.formLetterSorting(tablenum(CustPackingSlipJour), fieldnum(CustPackingSlipJour, RecId)));
#
# return recordSortedList;
#}
ENDSOURCE
SOURCE #pack
#container pack()
#{
# return [#CurrentVersion+#ParentVersion,#ParmList,#ParmListCommonCS];
#}
ENDSOURCE
SOURCE #postMarkupOnJour
#protected void postMarkupOnJour(SalesTable _salesTableMarkup)
#{
# super(_salesTableMarkup);
# Markup::updateMarkupAsPosted(_salesTableMarkup,this.documentStatus());
#}
ENDSOURCE
SOURCE #postMarkupOnTrans
#protected void postMarkupOnTrans()
#{;
# Markup::updateMarkupAsPosted(salesLine,this.documentStatus());
#}
ENDSOURCE
SOURCE #postUpdate
#protected void postUpdate()
#{
# super();
#
# this.updateEstimate();
# this.updateWMSShipment();
#}
#
ENDSOURCE
SOURCE #printJournal
#void printJournal()
#{
# SalesShippingStat salesShippingStat;
# boolean newline;
#
# if (journalList.len() > 0)
# {
# if (printFormletter)
# {
# this.sendAsXML();
# custPckSlpJour.printJournal(this, journalList);
# }
#
# if (printFreightSlip)
# this.printoutFreightSlip();
#
# if (printShippingLabel && SalesParameters::find().ShippingStat != SalesShipping::Invoice && ! salesParmUpdate.Proforma)
# {
# newline = journalList.first(custPckSlpJour);
#
# while (newline)
# {
# this.initShippingStat(custPckSlpJour);
# if (recordListShippingLine)
# salesShippingStat.printJournal(this, recordListShippingLine);
# newline = journalList.next(custPckSlpJour);
# }
# }
#
# if (salesParmUpdate.Proforma)
# this.removeProforma();
# }
#}
#
ENDSOURCE
SOURCE #printMgmtDocumentType
#///
#/// Identifies the print management document type.
#///
#///
#/// The print management document type for sales order packing slip.
#///
#protected PrintMgmtDocumentType printMgmtDocumentType()
#{
# return PrintMgmtDocumentType::SalesOrderPackingSlip;
#}
#
ENDSOURCE
SOURCE #recommendedSpecQty
#public SalesUpdate recommendedSpecQty()
#{
# return SalesUpdate::PickingList;
#}
ENDSOURCE
SOURCE #reduceOnHand
#boolean reduceOnHand()
#{
# ;
# return SalesParameters::find().ReducePackingSlip;
#}
ENDSOURCE
SOURCE #removeJournalFromList
#void removeJournalFromList()
#{
# journalList.del(custPckSlpJour);
#}
#
ENDSOURCE
SOURCE #removeProforma
#void removeProforma()
#{
# CustPackingSlipJour proformaJour;
# ;
#
# ttsbegin;
#
# proformaJour.clear();
#
# journalList.first(proformaJour);
#
# while (proformaJour)
# {
# proformaJour = CustPackingSlipJour::findRecId(proformaJour.RecId, true);
#
# proformaJour.delete();
#
# if (!journalList.next(proformaJour))
# break;
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #resetProformaUponPhysicalUpdatable
#///
#/// Turns off the sample packing slip if the sales order can be updated.
#///
#///
#/// If the order can be updated, the final packing slip is printed instead of the proforma.
#///
#void resetProformaUponPhysicalUpdatable()
#{
# WMSShipment localWMSShipment;
# boolean canNotPhysicalUpdSalesOrder;
# FormDataSource recordDataSource = this.wmsShipment_ds();
# ;
#
# for (localWMSShipment = recordDataSource.getFirst(true) ? recordDataSource.getFirst(true) : recordDataSource.cursor(); localWMSShipment; localWMSShipment = recordDataSource.getNext())
# {
# canNotPhysicalUpdSalesOrder = !localWMSShipment.canPhysicalUpdSalesOrder();
# if (canNotPhysicalUpdSalesOrder)
# {
# break;
# }
# }
# this.proforma(canNotPhysicalUpdSalesOrder);
#}
#
ENDSOURCE
SOURCE #run
#void run()
#{
# ;
#
# recordList4ShipCarrierTestMode = new RecordSortedList(tablenum(CustPackingSlipJour));
# recordList4ShipCarrierTestMode.sortOrder(fieldnum(CustPackingSlipJour, SalesId));
# recordList4ShipCarrierTestMode.sortOrder(fieldnum(CustPackingSlipJour, PackingSlipId));
#
# super();
#}
ENDSOURCE
SOURCE #runShipCarrier
#public void runShipCarrier()
#{
# ;
#
# super();
#
# // This method contains a dialog.
# this.shipCarrierTestMode();
#}
ENDSOURCE
SOURCE #sendAsXML
#protected void sendAsXML()
#{
# boolean newLine;
#
# if (new PrintJobSettings(printerSettingsFormletter, true).getTarget() != PrintMedium::Screen && !this.proforma())
# {
# newLine = journalList.first(custPckSlpJour);
# while (newLine)
# {
# custPckSlpJour.sendElectronically(XMLDocPurpose::Original, AifSendMode::Async);
# newLine = journalList.next(custPckSlpJour);
# }
# }
#}
ENDSOURCE
SOURCE #shipCarrierSendShippingInfo
#///
#/// Saves information to intermedia table ShipCarrierShippingRequest.
#///
#///
#/// Also creates records in the ShipCarrierCODPackage table for each sales order with a COD payment type.
#/// Called after packing slip has been posted.
#///
#private void shipCarrierSendShippingInfo()
#{
# boolean newLine;
# boolean calledFromShipment;
# ;
#
# if (!Global::isConfigurationkeyEnabled(configurationkeynum(ShipCarrier)))
# {
# return;
# }
#
# if (journalList.len() > 0)
# {
# calledFromShipment = (this.parmShipmentId() != '');
# newLine = journalList.first(custPckSlpJour);
# while (newLine)
# {
# ShipCarrierShippingRequest::createShippingRequest(
# custPckSlpJour,
# salesTable,
# salesLine,
# this.parmShipmentId(),
# salesTotals.totalAmount());
#
# if (calledFromShipment && SalesTable::find(custPckSlpJour.SalesId).hasCODPaymentMethod())
# {
# ShipCarrierCODPackage::createCODPackage(custPckSlpJour, this.parmShipmentId());
# }
#
# if (!this.isInBatch() && ShipCarrierTable::isCarrierInterfaceInTestMode(custPckSlpJour.ShipCarrierId))
# {
# recordList4ShipCarrierTestMode.ins(custPckSlpJour);
# }
#
# newLine = journalList.next(custPckSlpJour);
# }
# }
#
#}
ENDSOURCE
SOURCE #shipCarrierTestMode
#///
#/// Permits the user to input values, acting as if those were feedback from 3rd party shipping software.
#///
#///
#/// Called after a packing slip has been posted. It is used for test purposes.
#///
#private void shipCarrierTestMode()
#{
# boolean newLine;
# ;
#
# if (!Global::isConfigurationkeyEnabled(configurationkeynum(ShipCarrier)))
# {
# return;
# }
#
# if (recordList4ShipCarrierTestMode.len() > 0)
# {
# newLine = recordList4ShipCarrierTestMode.first(custPckSlpJour);
# while (newLine)
# {
# ShipCarrierPackage::testMode(custPckSlpJour);
#
# newLine = recordList4ShipCarrierTestMode.next(custPckSlpJour);
# }
# }
#}
#
ENDSOURCE
SOURCE #trackBackorder
#boolean trackBackorder()
#{
# return CustFormletterParameters::find().TrackBackorderPackingSlip != BackorderTracking::NoTracking;
#}
ENDSOURCE
SOURCE #transactionLogTxt
#TransTxt transactionLogTxt()
#{;
# return "@SYS7934";
#}
ENDSOURCE
SOURCE #transactionLogType
#TransactionLogType transactionLogType()
#{
# return TransactionLogType::SalesPckSlp;
#}
ENDSOURCE
SOURCE #unpack
#boolean unpack(container packedClass)
#{
# Integer version = conpeek(packedClass,1);
# NoYes approved;
# EmplId approvedBy;
#
# #LOCALMACRO.ParmList_v25sp2
# parmId,
# salesParmUpdate.proforma,
# salesParmUpdate.specQty,
# backorder,
# salesParmUpdate.creditRemaining,
# queryCriteria,
# editing,
# approved,
# approvedBy,
# printout,
# printFormletter,
# printersettingsFormletter,
# printFreightSlip,
# printerSettingsFreightSlip,
# printShippingLabel,
# printerSettingsShippingLabel
# #ENDMACRO
#
# #LOCALMACRO.ParmList_v30
# parmId,
# salesParmUpdate,
# backorder,
# queryCriteria,
# editing,
# printout,
# printFormletter,
# printersettingsFormletter,
# printFreightSlip,
# printerSettingsFreightSlip,
# printShippingLabel,
# printerSettingsShippingLabel
# #ENDMACRO
#
# #LOCALMACRO.ParmList_v401
# parmId,
# salesParmUpdate,
# backorder,
# queryCriteria,
# editing,
# printout,
# printFormletter,
# printersettingsFormletter,
# printFreightSlip,
# printerSettingsFreightSlip,
# printShippingLabel,
# printerSettingsShippingLabel,
# printersettingsFormletterCopy
# #ENDMACRO
#
# ;
#
# switch (version)
# {
# case #CurrentVersion + #ParentVersion : [version, #ParmList, #ParmListCommonCS] = packedClass;
# break;
#
# case 5 : [version, #ParmList_v401] = packedClass;
# break;
#
# case 4 : [version, #ParmList_v30] = packedClass;
# printersettingsFormletterCopy = printersettingsFormletter;
# break;
#
# case 2 : [version, #ParmList_v25sp2] = packedClass;
# break;
#
# default :
# return false;
# }
#
# return true;
#}
ENDSOURCE
SOURCE #updateEstimate
#void updateEstimate()
#{
# super();
#
# if (CustParameters::find().CreditMaxCheck == TypeOfCreditmaxCheck::BalanceDelivered)
# {
# if (salesTable.setEstimate(salesTotals))
# {
# salesTable.doUpdate();
# }
# }
#}
#
ENDSOURCE
SOURCE #updateInventory
#protected void updateInventory(InventMovement _inventMovement)
#{
# InventUpd_Physical inventUpd_Physical;
# ;
#
# inventUpd_Physical = InventUpd_Physical::newSalesPackingSlip(_inventMovement,
# salesParmLine,
# number,
# salesParmUpdate.ReduceOnHand);
#
# inventUpd_Physical.updateNow(ledgerVoucher);
#
# updateNow = -inventUpd_Physical.updPhysicalUnit();
# updateNowInvent = -inventUpd_Physical.updPhysical();
#}
ENDSOURCE
SOURCE #updateNow
#boolean updateNow()
#{
# InventMovement inventMovement;
# SalesLineType salesLineType;
# TransactionTxt transactionTxt;
#
# boolean qtyReduced = false;
# SalesId oldSalesId;
# ;
#
# this.initJournal();
# transactionTxt = this.initTransactionTxt();
# this.initLedgerVoucher(transactionTxt);
# this.initRecordListInventReportDimHistory();
#
# salesLine.clear();
# salesParmLine.clear();
#
# recordListSalesParmLine.first(salesParmLine);
# while (salesParmLine)
# {
# if (! this.checkDiscardLine())
# {
# salesLine = this.getSalesLine(salesParmLine, true);
#
# setprefix(#PreFixField(salesLine, SalesId));
#
# this.checkBeforePosting();
# this.displayProgress();
#
# #LinePrefix(salesLine,salesLine.inventdim().prefixitemdim(salesLine.inventTable().dimGroupId))
#
# this.createScrapOnInventory(salesLine, salesParmLine);
#
# this.initJournalLineLedger();
#
# inventMovement = InventMovement::construct(salesLine);
#
# this.updateInventory(inventMovement);
#
# if (salesParmLine.DeliverNow != updateNow || salesParmLine.InventNow != updateNowInvent)
# {
# salesParmLine = SalesParmLine::findRecId(salesParmLine.RecId, true);
#
# info(strfmt("@SYS26397",updateNow));
# qtyReduced = true;
#
# salesParmLine.RemainAfter += salesParmLine.DeliverNow - updateNow;
# salesParmLine.setRemainAfterInvent();
#
# salesParmLine.DeliverNow = updateNow;
# salesParmLine.InventNow = updateNowInvent;
# salesParmLine.setLineAmount(salesLine);
#
# salesParmLine.update();
# }
#
# this.calcStatLineAmount();
#
# this.writeJournalLine();
# this.writeProjTrans(inventMovement);
# this.postMarkupLine();
# this.endJournalLineLedger();
#
# if (salesParmLine.OrigSalesId != oldSalesId)
# {
# if (salesParmTable.SalesId != salesParmLine.OrigSalesId)
# this.updateSumSalesId();
# }
#
# oldSalesId = salesParmLine.OrigSalesId;
#
# salesLineType = SalesLineType::construct(salesLine);
# salesLineType.updateSalesLine(inventMovement.transIdSum());
# if (salesTable.InterCompanyCompanyId)
# {
# salesLineType.interCompanyResetDeliverNow();
# if (!salesTable.InterCompanyDirectDeliveryOrig)
# {
# InterCompanyTransferInventDim::doTransfer(salesLine.DataAreaId,
# salesLine.InventTransId,
# salesTable.InterCompanyCompanyId,
# salesLine.InterCompanyInventTransId,
# salesTable.interCompanyEndpointActionPolicy().transferExternal(),
# StatusIssue::Deducted,
# number);
# }
# }
#
# if (salesLine.returnJournal())
# {
# salesLine.returnLineUpdate(this.documentStatus());
# }
#
# salesLine.doUpdate();
#
# if (InventParameters::find().UseQualityManagement)
# {
# InventQualityOrderType::newBuffer(salesLine, NoYes::No, InventTestDocumentStatus::PackingSlip, InventTestExecution::After).findAndCreate();
# }
# }
#
# if (! recordListSalesParmLine.next(salesParmLine))
# break;
# }
#
# if (! this.checkIfSomethingIsPosted())
# return false;
#
# progress.setText("@SYS25781");
#
# if (qtyReduced)
# {
# salesTotals = SalesTotals::construct(salesTable, salesParmUpdate.SpecQty, salesParmUpdate.SumBy, salesParmUpdate.ParmId, salesParmUpdate.SumSalesId, this.documentStatus());
# salesTotals.calc();
# this.tax(salesTotals.tax());
# }
#
# this.writeJournal();
# this.writeRecordListInventReportDimHistory();
# this.postMarkupTable();
# this.updateSalesShippingStat(salesParmTable);
#
# this.endJournalLedger();
#
# ledgerVoucher.end();
#
# this.shipCarrierSendShippingInfo();
#
# return true;
#}
#
ENDSOURCE
SOURCE #updateSalesShippingStat
#void updateSalesShippingStat(SalesParmTable _salesParmTable)
#{
# SalesShippingStat salesShippingStat;
# ;
#
# if (!this.useShippingStat())
# return;
#
# ttsbegin;
#
# delete_from salesShippingStat
# where salesShippingStat.TableRefId == _salesParmTable.TableRefId &&
# salesShippingStat.ParmId == _salesParmTable.ParmId &&
# salesShippingStat.Quantity == 0;
#
# update_recordset salesShippingStat
# setting packingSlipId = number,
# deliveryDate = _salesParmTable.Transdate,
# parmId = ''
# where salesShippingStat.TableRefId == _salesParmTable.TableRefId &&
# salesShippingStat.ParmId == _salesParmTable.ParmId;
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #updateWMSShipment
#protected void updateWMSShipment()
#{
# WMSShipment wmsShipment;
# ShipCarrierShipmentPackingSlip shipCarrierShipmentPackingSlip;
# ;
#
# if (!this.wmsShipment_ds())
# return ;
#
# for (wmsShipment = wmsShipment_ds.getFirst(true) ? wmsShipment_ds.getFirst(true) : wmsShipment_ds.cursor(); wmsShipment; wmsShipment = wmsShipment_ds.getNext())
# {
# if (!ShipCarrierShipmentPackingSlip::exist(wmsShipment.ShipmentId, custPckSlpJour.PackingSlipId))
# {
# shipCarrierShipmentPackingSlip.clear();
# shipCarrierShipmentPackingSlip.wmsShipmentId = wmsShipment.ShipmentId;
# shipCarrierShipmentPackingSlip.SalesPackingSlipId = custPckSlpJour.PackingSlipId;
# shipCarrierShipmentPackingSlip.insert();
# }
# }
#}
ENDSOURCE
SOURCE #useBillOfLading
#boolean useBillOfLading()
#{
# return ! salesParmUpdate.Proforma && SalesParameters::find().useBillOfLadingOnPackingSlip();
#}
ENDSOURCE
SOURCE #writeBackorderLines
#void writeBackorderLines(SalesLine _salesLine)
#{
# CustPackingSlipBackorderLine custPackingSlipBackorderLine;
# ;
#
# custPackingSlipBackorderLine.clear();
#
# custPackingSlipBackorderLine.initValue();
#
# custPackingSlipBackorderLine.initFromSalesLine (_salesLine);
# custPackingSlipBackorderLine.initFromCustPackingSlipJour (custPckSlpJour);
#
# custPackingSlipBackorderLine.insert();
#}
ENDSOURCE
SOURCE #writeJournal
#protected void writeJournal()
#{
# WMSBillOfLading wmsBillOfLading;
# ProjTable projTable;
# ProjInvoiceTable projInvoiceTable;
# ;
#
# projTable = salesTable.projTable();
#
# custPckSlpJour.DeliveryAddress = lineDeliveryAddress;
# custPckSlpJour.DeliveryName = lineDeliveryName;
# custPckSlpJour.DeliveryStreet = lineDeliveryStreet;
# custPckSlpJour.DlvZipCode = lineDeliveryZipCode;
# custPckSlpJour.DeliveryCity = lineDeliveryCity;
# custPckSlpJour.DlvCounty = lineDeliveryCounty;
# custPckSlpJour.DlvState = lineDeliveryState;
# custPckSlpJour.DlvCountryRegionId = lineDeliveryCountryRegionId;
# custPckSlpJour.ShipCarrierId = lineCarrierId;
# custPckSlpJour.ShipCarrierAccount = lineCarrierAccount;
#
# // Set the invoicing Address of the Packing Slip Journal with the address on the Project Invoice that contains the project
# // associated with the project above
# projInvoiceTable = projTable.projInvoice();
# if(projInvoiceTable && (projInvoiceTable.Addr || projInvoiceTable.Name))
# {
# custPckSlpJour.InvoicingName = projInvoiceTable.Name;
# custPckSlpJour.InvoicingAddress = projInvoiceTable.Addr;
# custPckSlpJour.InvoiceCountryRegionId = projInvoiceTable.CountryRegionId;
# }
#
# if (lineDlvMode)
# {
# custPckSlpJour.DlvMode = lineDlvMode;
# }
#
# custPckSlpJour.PrintMgmtSiteId = lineInventSiteId;
#
# custPckSlpJour.Qty = salesTotals.totalQty();
# custPckSlpJour.Weight = salesTotals.totalWeight();
# custPckSlpJour.Volume = salesTotals.totalVolume();
#
# if (this.useBillOfLading())
# {
# wmsBillOfLading = WMSBillOfLading::constructFromPackingSlip(custPckSlpJour, salesParmUpdate);
# custPckSlpJour.BillOfLadingId = wmsBillOfLading.BillOfLadingId;
# custPckSlpJour.bolPackageAppearance = salesParmUpdate.bolPackageAppearance;
# custPckSlpJour.bolCarrierName = salesParmUpdate.bolCarrierName;
# custPckSlpJour.bolAddress = SalesCarrier::find(salesParmUpdate.bolCarrierName).Address;
# custPckSlpJour.bolFreightedBy = salesParmUpdate.bolFreightedBy;
# }
#
# custPckSlpJour.insert();
#
# Docu::copy(salesTable, custPckSlpJour);
#
# journalList.ins(custPckSlpJour);
#
# this.writeTmpTaxWorkTrans(custPckSlpJour.RecId);
#
# this.writeJournalSalesLink();
#}
#
ENDSOURCE
SOURCE #writeJournalLine
#protected void writeJournalLine()
#{
# Label label = new Label(custPckSlpJour.LanguageId);
# ;
#
# super();
#
# custPckSlpTrans.initFromSalesLine(salesLine);
# custPckSlpTrans.initFromCustPckSlpJour(custPckSlpJour);
# custPckSlpTrans.setLineNum(sumByLineNum);
#
# sumByLineNum++;
#
# custPckSlpTrans.Qty = updateNow;
# custPckSlpTrans.InventQty = updateNowInvent;
# custPckSlpTrans.Remain = salesParmLine.RemainAfter;
# custPckSlpTrans.Ordered = salesParmLine.RemainBefore;
# custPckSlpTrans.PartDelivery = !(salesLine.SalesStatus == SalesStatus::Delivered &&
# salesLine.SalesQty == custPckSlpTrans.Qty);
#
#
# custPckSlpTrans.ValueMST = salesParmLine.lineAmountExclTax(custPckSlpJour.DeliveryDate);
# custPckSlpTrans.StatValueMST = statLineValue;
#
# if (salesTable.CurrencyCode)
# {
# custPckSlpTrans.ValueMST = Currency::mstAmount(custPckSlpTrans.ValueMST, salesTable.CurrencyCode,custPckSlpJour.DeliveryDate,
# Currency::noYes2UnknownNoYes(salesTable.euroTriangulation(custPckSlpJour.DeliveryDate)),
# salesTable.exchRate(custPckSlpJour.DeliveryDate),
# salesTable.exchRateSecondary(custPckSlpJour.DeliveryDate));
#
# custPckSlpTrans.StatValueMST = Currency::mstAmount(custPckSlpTrans.StatValueMST, salesTable.CurrencyCode,custPckSlpJour.DeliveryDate,
# Currency::noYes2UnknownNoYes(salesTable.euroTriangulation(custPckSlpJour.DeliveryDate)),
# salesTable.exchRate(custPckSlpJour.DeliveryDate),
# salesTable.exchRateSecondary(custPckSlpJour.DeliveryDate));
# }
#
# custPckSlpTrans.LineHeader = label.extractString(literalstr("@SYS9694")) + ' ' + salesLine.SalesId + ' '
# + label.extractString(literalstr("@SYS24704")) + ' ' + salesLine.salesTable().CustAccount + ' '
# + (salesTable.PurchOrderFormNum ? (label.extractString(literalstr("@SYS9452")) + ' ' + salesTable.PurchOrderFormNum + ' ') : '')
# + custPckSlpTrans.LineHeader;
# if(!this.proforma())
# {
# this.addToInventReportDimHistory(custPckSlpTrans);
# }
#
# //If the salesline is from a dropshipment the vendors country or region must be stored to determine Intrastat reporting
# if (salesLine.DeliveryType == TradeLineDlvType::DropShip)
# {
# //if the salesLine is not linked to a different purchase the Vendor country or region need not be found again
# if ( (vendInvoiceJour && vendInvoiceJour.PurchId == salesLine.InventRefId)
# ||(vendPackingSlipJour && vendPackingSlipJour.PurchId == salesLine.InventRefId))
# {
# custPckSlpTrans.CountryRegionOfShipment = vendCountryRegionId;
# }
# else //Either a vendInvoiceJour or VendPackingSlipJour will exist for a dropshipment salesline being invoiced
# {
# vendInvoiceJour = VendInvoiceJour::findFromPurchId(salesLine.InventRefId);
#
# if (vendInvoiceJour)
# {
# vendCountryRegionId = VendTable::find(vendInvoiceJour.OrderAccount).CountryRegionId;
# custPckSlpTrans.CountryRegionOfShipment = vendCountryRegionId;
# }
# else
# {
# vendPackingSlipJour = VendPackingSlipJour::findFromPurchId(salesLine.InventRefId);
#
# if (vendPackingSlipJour)
# {
# vendCountryRegionId = VendTable::find(vendPackingSlipJour.OrderAccount).CountryRegionId;
# custPckSlpTrans.CountryRegionOfShipment = vendCountryRegionId;
# }
# }
# }
# }
#
# custPckSlpTrans.insert();
#
# Docu::copy(salesLine, custPckSlpTrans);
#}
#
ENDSOURCE
SOURCE #writeJournalSalesLink
#protected void writeJournalSalesLink()
#{
# SalesParmLine localSalesParmLine;
# CustPackingSlipSalesLink custPackingSlipSalesLink;
# ;
#
# ttsbegin;
#
# while select localSalesParmLine
# group by OrigSalesId
# where localSalesParmLine.ParmId == salesParmTable.ParmId
# && localSalesParmLine.TableRefId == salesParmTable.TableRefId
# {
# custPackingSlipSalesLink.clear();
# custPackingSlipSalesLink.initFromSalesParmLine (localSalesParmLine);
# custPackingSlipSalesLink.initFromSalesTable (SalesTable::find(localSalesParmLine.OrigSalesId));
# custPackingSlipSalesLink.initFromCustPackingSlipJour (custPckSlpJour);
# custPackingSlipSalesLink.insert();
# }
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #writeProjTrans
#protected void writeProjTrans(InventMov_Sales _inventMovement)
#{
# ;
#}
ENDSOURCE
SOURCE #description
#private static ClassDescription description()
#{
# return "@SYS2094";
#}
ENDSOURCE
SOURCE #newFromWMSShipment
#static SalesFormLetter newFromWMSShipment(Set _shipmentIDSet)
#{
# SalesFormLetter_PackingSlip salesFormLetter_PackingSlip;
# ParmId parmId;
# ;
# salesFormLetter_PackingSlip = SalesFormLetter::construct(DocumentStatus::PackingSlip);
# parmId = salesFormLetter_PackingSlip.parmId();
#
# salesFormLetter_PackingSlip.getLast();
# salesFormLetter_PackingSlip.parmId(parmId);
# salesFormLetter_PackingSlip.transDate(systemdateget());
# salesFormLetter_PackingSlip.multiForm(true);
# salesFormLetter_PackingSlip.parmWmsShipmentIdSet(_shipmentIDSet);
#
# return salesFormLetter_PackingSlip;
#}
ENDSOURCE
ENDMETHODS
ENDCLASS
***Element: CLS
; Microsoft Dynamics AX Class: SalesFormLetter_Invoice descargados
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #SalesFormLetter_Invoice
Id 531
PROPERTIES
Name #SalesFormLetter_Invoice
Extends #SalesFormLetter
RunOn #Called from
ENDPROPERTIES
METHODS
Version: 3
SOURCE #addToInventReportDimHistory
#void addToInventReportDimHistory(CustInvoiceTrans _custInvoiceTrans)
#{
# InventTrans inventTrans;
# InventQty qtyRemain = _custInvoiceTrans.InventQty;
# InventQty qtyTrans;
# InventReportDimHistory inventReportDimHistory;
# ;
#
# while select inventTrans
# index hint TransIdIdx
# where inventTrans.InventTransId == _custInvoiceTrans.InventTransId &&
# inventTrans.TransType == InventTransType::Sales &&
# inventTrans.InvoiceId == _custInvoiceTrans.InvoiceId &&
# inventTrans.DateFinancial == _custInvoiceTrans.InvoiceDate
# {
# if (qtyRemain)
# {
# if (abs(inventTrans.Qty) < abs(qtyRemain))
# {
# qtyTrans = -inventTrans.Qty;
# qtyRemain -= qtyTrans;
# }
# else
# {
# qtyTrans = qtyRemain;
# qtyRemain = 0;
# }
#
#
# inventReportDimHistory.clear();
# inventReportDimHistory.TransactionLogType = InventReportDimHistoryLogType::SalesInvoice;
# inventReportDimHistory.TransRefId = _custInvoiceTrans.InvoiceId;
# inventReportDimHistory.InventTransId = inventTrans.InventTransId;
# inventReportDimHistory.InventDimId = inventTrans.InventDimId;
#
# recordListInventReportDimHistory.find(inventReportDimHistory);
#
# inventReportDimHistory.Qty += qtyTrans;
#
# recordListInventReportDimHistory.ins(inventReportDimHistory,true);
#
# }
# else
# break;
# }
#}
#
#
ENDSOURCE
SOURCE #allocateNumAndVoucher
#NumberSeq allocateNumAndVoucher()
#{
# NumberSequenceCode invoiceNumber;
# NumberSequenceCode invoiceVoucher;
#
# boolean voucherEqualsNumber;
#
# SalesLine tmpSalesLine;
# SalesParmLine tmpSalesParmLine;
# NumberSeq tmpNumberSeq;
# ;
#
# if (salesTable.NumberSequenceGroup)
# {
# if (salesTotals.totalAmount() < 0)
# {
# invoiceNumber = NumberSequenceGroupRef::find(SalesParameters::numRefSalesCreditNoteId().DataTypeId, salesTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!invoiceNumber)
# {
# invoiceNumber = NumberSequenceReference::find(SalesParameters::numRefSalesCreditNoteId().DataTypeId).NumberSequence;
# }
#
# if (SalesParameters::numRefSalesCreditNoteVoucher().AllowSameAs)
# {
# voucherEqualsNumber = true;
# invoiceVoucher = invoiceNumber;
# }
# else
# {
# invoiceVoucher = NumberSequenceGroupRef::find(SalesParameters::numRefSalesCreditNoteVoucher().DataTypeId, salesTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!invoiceVoucher)
# {
# invoiceVoucher = SalesParameters::numRefSalesCreditNoteVoucher().NumberSequence;
# }
# }
# }
# else
# {
# invoiceNumber = NumberSequenceGroupRef::find(SalesParameters::numRefInvoiceId().DataTypeId, salesTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!invoiceNumber)
# {
# invoiceNumber = NumberSequenceReference::find(SalesParameters::numRefInvoiceId().DataTypeId).NumberSequence;
# }
#
# if (SalesParameters::numRefSalesInvoiceVoucher().AllowSameAs)
# {
# voucherEqualsNumber = true;
# invoiceVoucher = invoiceNumber;
# }
# else
# {
# invoiceVoucher = NumberSequenceGroupRef::find(SalesParameters::numRefSalesInvoiceVoucher().DataTypeId, salesTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!invoiceVoucher)
# {
# invoiceVoucher = SalesParameters::numRefSalesInvoiceVoucher().NumberSequence;
# }
# }
# }
#
# tmpNumberSeq = NumberSeq::newGetNumAndVoucherFromCode(invoiceNumber, invoiceVoucher, voucherEqualsNumber);
# }
#
# else if (salesTotals.totalAmount() < 0 || (!salesTotals.totalAmount() && salesTotals.totalQty() < 0 ))
# tmpNumberSeq = NumberSeq::newGetNumAndVoucher(SalesParameters::numRefSalesCreditNoteId(),
# SalesParameters::numRefSalesCreditNoteVoucher());
# else
# tmpNumberSeq = NumberSeq::newGetNumAndVoucher(SalesParameters::numRefInvoiceId(),
# SalesParameters::numRefSalesInvoiceVoucher());
#
# // Italian functionality of VAT books and VAT book sections
# if (TaxParameters::find().VatBookEnable == NoYes::Yes)
# {
# if(! TaxBookSection::checkTaxBookSection(tmpNumberSeq.parmVoucherSequenceCode(), this.updateDate()))
# {
# throw error("@SYS21533");
# }
#
# recordListSalesParmLine.first(tmpSalesParmLine);
#
# while (tmpSalesParmLine)
# {
# tmpSalesLine = this.getSalesLine(tmpSalesParmLine);
#
# if (! TaxGroupData::checkTaxGroups(tmpSalesLine.TaxGroup, tmpSalesLine.TaxItemGroup))
# {
# throw error("@SYS21533");
# }
# if (!recordListSalesParmLine.next(tmpSalesParmLine))
# {
# break;
# }
# }
# }
# return tmpNumberSeq;
#}
#
ENDSOURCE
SOURCE #calcShippingStat
#void calcShippingStat(SalesShippingStat _salesShippingStat, SalesShippingStat _oldSalesShippingStat)
#{
# _salesShippingStat.GrossWeight = _salesShippingStat.GrossWeight - _oldSalesShippingStat.UnitWeight + _salesShippingStat.UnitWeight;
#}
ENDSOURCE
SOURCE #canGoBatchJournal
#public boolean canGoBatchJournal()
#{
# return true;
#}
ENDSOURCE
SOURCE #canMultiThread
#///
#/// Determines if multithreading should be enabled.
#///
#///
#/// True, if the posting can be multithreaded; otherwise false.
#///
#///
#/// When the Italian sales tax book section functionality is enabled, multithreading is not possible, as invoices are not allowed to be posted in parallel.
#///
#protected boolean canMultiThread()
#{
# if (TaxParameters::find().VatBookEnable)
# {
# return false;
# }
#
# return super();
#}
ENDSOURCE
SOURCE #checkBeforePosting
#protected void checkBeforePosting()
#{
# if (salesParmLine.RemainBefore != (salesLine.RemainSalesFinancial + salesLine.RemainSalesPhysical))
# throw error("@SYS23025");
#}
ENDSOURCE
SOURCE #checkCreateParmLine
#protected boolean checkCreateParmLine(SalesLine _salesLine)
#{
# PurchTable purchTable;
# boolean ret;
# ;
# ret = super(_salesLine);
#
# if (ret)
# {
# if (!interCompanyParmId
# && salesTable.InterCompanyDirectDelivery
# && _salesLine.InventRefType == InventRefType::Purch
# && _salesLine.InventRefId)
# {
# purchTable = PurchTable::find(_salesLine.InventRefId);
# if (purchTable.InterCompanyOrder
# && purchTable.interCompanyEndpointActionPolicy().PostSalesInvoice)
# {
# ret = checkFailed(strfmt("@SYS101046",_salesLine.ItemId));
# }
# }
#
# if (_salesLine.SalesType == SalesType::ReturnItem)
# {
# ret = ret && _salesLine.ReturnStatus == ReturnStatusLine::Received;
# ret = ret && !_salesLine.isReturnReservationLine();
# }
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #checkCreateScrapOnInventory
#boolean checkCreateScrapOnInventory()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkHeading
#boolean checkHeading()
#{
# boolean ok = true;
# PersonTitle role;
#
# #OIOXML
# ;
#
# ok = super();
#
# if (TaxVATNumTable::isVATNumMandatory(CustParameters::find().MandatoryInvoiceVATNum, salesTable))
# ok = checkFailed(strfmt("@SYS54450",salesTable.SalesId));
#
# if (CustTable::isCustDKPublic(salesTable.InvoiceAccount) == NoYes::Yes && !this.salesTable().ProjId)
# {
# if (!salesTable.contactPersonName())
# {
# ok = checkFailed(strfmt("@SYS26332", "@SYS82149"));
# }
#
# role = strlwr(ContactPerson::find(salesTable.ContactPersonId).Title);
#
# if (role != #purchResponsible &&
# role != #bookKeeper &&
# role != #budgetResponsible &&
# role != #rekvirent)
# {
# ok = checkFailed(strfmt("@SYS112505"));
# }
#
# if (!salesTable.DeliveryStreet)
# {
# ok = checkFailed(strfmt("@SYS26332", "@SYS23438"));
# }
#
# if (!salesTable.DeliveryZipCode)
# {
# ok = checkFailed(strfmt("@SYS26332", "@SYS12463"));
# }
#
# if (!salesTable.DeliveryCity)
# {
# ok = checkFailed(strfmt("@SYS26332", "@SYS22249"));
# }
#
# if (!salesTable.DeliveryCountryRegionId)
# {
# ok = checkFailed(strfmt("@SYS26332", "@SYS7437"));
# }
#
# if (!salesTable.PurchOrderFormNum)
# {
# ok = checkFailed(strfmt("@SYS26332", "@SYS23422"));
# }
#
# if (!salesTable.CustomerRef)
# {
# ok = checkFailed(strfmt("@SYS26332", "@SYS23010"));
# }
#
# if (!CompanyInfo::find().RegNum)
# {
# ok = checkFailed(strfmt("@SYS26332", "@SYS70361"));
# }
#
# if (AddressCountryRegion::find(salesTable.DeliveryCountryRegionId).isOcode)
# {
# if (strlen(AddressCountryRegion::find(salesTable.DeliveryCountryRegionId).isOcode) != 2)
# {
# ok = checkFailed(strfmt("@SYS101033", salesTable.DeliveryCountryRegionId));
# }
# }
# else
# {
# ok = checkFailed(strfmt("@SYS101034", salesTable.DeliveryCountryRegionId));
# }
#
# if (Currency::find(salesTable.CurrencyCode).CurrencyCodeISO)
# {
# if (strlen(Currency::find(salesTable.CurrencyCode).CurrencyCodeISO) != 3)
# {
# ok = checkFailed(strfmt("@SYS101035", salesTable.CurrencyCode));
# }
# }
# else
# {
# ok = checkFailed(strfmt("@SYS101036", salesTable.CurrencyCode));
# }
#
# CustTable::checkEInvoiceEAN(CustTable::find(salesTable.InvoiceAccount).EinvoiceEANNum);
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #checkIfShipmentUpdated
#private boolean checkIfShipmentUpdated()
#{
# ShipCarrierShippingRequest shippingRequest;
# ShipCarrierPackage package;
# ;
#
# //do nothing is shipping module is not turned on
# if (!Global::isConfigurationkeyEnabled(configurationkeynum(ShipCarrier)))
# {
# return true;
# }
#
# ttsbegin;
# //transfer records from secured holding table to the main ship carrier tables
# ShipCarrierStaging::transferToMainTables(salesTable.SalesId);
#
# //any packing slip in shipping request, but not in package, means the shipping
# //charges has not been updated by 3rd party software
# select forupdate shippingRequest
# where shippingRequest.SalesId == salesTable.SalesId &&
# (!this.parmShipmentId() ||
# shippingRequest.wmsShipmentId == this.parmShipmentId())
# notexists join package
# where package.SalesId == shippingRequest.SalesId &&
# package.PackingSlipId == shippingRequest.PackingSlipId;
#
# if (shippingRequest.RecId)
# {
# shippingRequest.ErrorRetreivingCharge = NoYes::Yes;
# shippingRequest.update();
#
# if (this.isInBatch())
# {
# //"Shipping charges for packing slip %1 of S/O %2 have not been retreived. Invoice posting for this order has been skipped."
# info(strfmt("@SYS116864", shippingRequest.PackingSlipId, shippingRequest.SalesId));
# ttsabort;
# return false;
# }
# else
# {
# //"Shipping charges for packing slip %1 of S/O %2 have not been retreived. Ignore and continue?"
# if (Box::yesNo(strfmt("@SYS116851", shippingRequest.PackingSlipId, shippingRequest.SalesId), DialogButton::No) == DialogButton::No)
# {
# ttsabort;
# //"Shipping charges have not been retreived."
# throw error("@SYS116945");
# }
# }
# }
# ttscommit;
#
# return true;
#}
ENDSOURCE
SOURCE #checkLedgerPeriod
#///
#/// Checks whether posting in the ledger period is allowed.
#///
#///
#/// True if posting in the ledger period is allowed; otherwise False.
#///
#protected boolean checkLedgerPeriod()
#{
# boolean ok;
# ;
# ok = super();
#
# if(ok)
# {
# ok = LedgerPeriod::checkLedgerPeriodDateModule(salesParmTable.Transdate, SysModule::Sales);
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #checkPackingSlipDlvDate_IT
#///
#/// Check if there are selected packing slips which delivery date is greater than
#/// the invoice date. The check runs only when quantity select is PackinSlip and when
#/// the feature is on CustParameters.PackingSlipDateCheck_IT
#///
#///
#/// False when salesParmUpdate.SpecQty equals SalesUpdate::PackingSlip
#/// and CustParameters.PackingSlipDateCheck_IT is true and all packing slips
#/// have delivery date greater or equals than invoice date
#///
#///
#/// This is a country specific feature for Italy
#///
#protected boolean checkPackingSlipDlvDate_IT()
#{
# SalesParmSubTable salesParmSubTable;
# CustPackingSlipJour custPackingSlipJour;
#
# boolean ok = true;
# ;
#
# if (!CustParameters::find().PackingSlipDateCheck_IT
# || salesParmUpdate.SpecQty != SalesUpdate::PackingSlip)
# {
# return ok;
# }
#
# while select PackingSlipId, DeliveryDate from custPackingSlipJour
# exists join salesParmSubTable
# where custPackingSlipJour.TableId == salesParmSubTable.JournalRefTableId
# && custPackingSlipJour.RecId == salesParmSubTable.JournalRefRecId
# && salesParmSubTable.ParmId == salesParmTable.ParmId
# && salesParmSubTable.TableRefId == salesParmTable.TableRefId
# && custPackingSlipJour.DeliveryDate > salesParmTable.Transdate
# {
# ok = checkFailed(strfmt("@SYS127005",
# custPackingSlipJour.PackingSlipId, /* %1 */
# custPackingSlipJour.DeliveryDate, /* %2 */
# salesParmTable.Transdate)); /* %3 */
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkSales
#///
#/// Runs super() from SalesFormLetter and then run specific invoice checkSales
#///
#///
#/// False when fail a validation, true otherwise
#///
#protected boolean checkSales()
#{
# boolean ret;
#
# ret = super();
#
# if (!ret ||
# !this.checkPackingSlipDlvDate_IT())
# {
# ret = false;
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #chooseLines
#void chooseLines(SalesParmTable _salesParmTable = null, boolean _directDeliveryUpdate = false)
#{
# if (salesParmUpdate.SpecQty == SalesUpdate::PackingSlip)
# this.chooseLinesPackingSlip(_salesParmTable);
# else
# super(_salesParmTable, _directDeliveryUpdate);
#}
ENDSOURCE
SOURCE #chooseLinesFromWMSShipment
#public void chooseLinesFromWMSShipment()
#{
# WMSShipment wmsShipment;
# WMSOrderTrans wmsOrderTrans;
# SalesId previousSalesId;
# SalesLine localSalesLine;
# SalesParmTable localSalesParmTable;
# SalesParmSubTable localSalesParmSubTable;
#
# TradeLineRefId tableRef;
# boolean tableRefUsed = false;
#
# void createParmTable()
# {
# if (this.allowCreateParmTable())
# {
# localSalesParmTable.clear();
# localSalesParmTable.TableRefId = tableRef;
#
# this.createParmTable(localSalesParmTable, SalesTable::find(previousSalesId));
# recordInsertSalesParmTable.add(localSalesParmTable);
# salesParmTableMap.insert(this.salesParmTableMapKey(localSalesParmTable.SalesId, '', '', '', ''), localSalesParmTable);
# localSalesParmSubTable = SalesParmSubTable::createFromSalesParmTable(localSalesParmTable,false);
# recordInsertSalesParmSubTable.add(localSalesParmSubTable);
#
# tableRefUsed = true;
# this.allowCreateParmTable(this.allowEmptyTable());
# }
# }
# ;
#
# this.recordInsertListInit();
#
# ttsbegin;
#
# salesParmUpdate = SalesParmUpdate::find(salesParmUpdate.ParmId, true);
# salesParmUpdate.SpecQty = SalesUpdate::DeliverNow;
# salesParmUpdate.SumBy = AccountOrder::Account;
#
# this.lockSalesUpdateField(true);
#
# for (wmsShipment = wmsShipment_ds.getFirst(true) ? wmsShipment_ds.getFirst(true) : wmsShipment_ds.cursor(); wmsShipment; wmsShipment = wmsShipment_ds.getNext())
# {
# if (wmsShipment.PackingType == WMSPackingType::Order)
# {
# this.sumBy(AccountOrder::None);
# break;
# }
# }
# salesParmUpdate.update();
#
# for (wmsShipment = wmsShipment_ds.getFirst(true) ? wmsShipment_ds.getFirst(true) : wmsShipment_ds.cursor(); wmsShipment; wmsShipment = wmsShipment_ds.getNext())
# {
# previousSalesId = '';
#
# while select InventTransId, sum(Qty) from wmsOrderTrans
# group by InventTransRefId, InventTransId // ensure order by InventTransRefId and group by inventTransId
# where wmsOrderTrans.ShipmentId == wmsShipment.ShipmentId
# && wmsOrderTrans.InventTransType == InventTransType::Sales
# && wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Complete
# {
# localSalesLine = SalesLine::findInventTransId(wmsOrderTrans.InventTransId);
#
# if (((previousSalesId != localSalesLine.SalesId) && tableRefUsed) || (!tableRef))
# {
# tableRef = FormLetter::getTableRef();
# }
#
# if (this.createParmLineFromWMSOrderTrans(SalesLine::findInventTransId(wmsOrderTrans.InventTransId), wmsOrderTrans.Qty, tableRef))
# {
# if (previousSalesId != localSalesLine.SalesId)
# {
# previousSalesId = localSalesLine.SalesId;
# createParmTable();
# }
# }
# }
# }
# this.recordInsertListInsert();
# this.reArrange(false);
#
# ttscommit;
#}
ENDSOURCE
SOURCE #chooseLinesPackingSlip
#protected void chooseLinesPackingSlip(SalesParmTable _salesParmTable = null)
#{
# CustPackingSlipTrans custPackingSlipTrans;
# CustPackingSlipJour custPackingSlipJour;
#
# SalesLine localSalesLine;
# SalesTable localSalesTable;
#
# SalesParmTable localSalesParmTable;
# SalesParmLine localSalesParmLine;
#
# boolean mayJournalBePosted = false;
# InventTrans inventTrans;
# List list = new List(Types::Record);
#
# Map packingSlipJourLines = new Map(Types::Record,Types::Container);
# Map packingSlipLineSalesLine = new Map(Types::Record, Types::Record);
# Map emptyHeaders = new Map(Types::String, Types::Record);
# Map headers = new Map(Types::String, Types::String);
# InventSiteId splitSiteId;
# ;
#
# if (_salesParmTable.RecId)
# {
# while select localSalesParmTable
# where localSalesParmTable.ParmId == salesParmUpdate.ParmId
# join localSalesTable
# where localSalesTable.SalesId == localSalesParmTable.SalesId
# notexists join localSalesParmLine
# where localSalesParmLine.TableRefId == localSalesParmTable.TableRefId
# {
# emptyHeaders.insert(this.salesParmTableMapKey(localSalesTable.SalesId, localSalesLine.inventDim().InventSiteId, localSalesTable.DeliveryName, localSalesTable.DeliveryAddress, localSalesTable.DlvMode), localSalesTable);
# }
# }
#
# ttsbegin;
# this.allowCreateParmTable(this.allowEmptyTable());
# chooseLines.reset(); // if the select button is used from saleseditlines
#
# while (chooseLines.next())
# {
# if (chooseLines.changed(tablenum(SalesTable)))
# {
# localSalesTable = chooseLines.get(tablenum(SalesTable));
# mayJournalBePosted = this.mayJournalBePosted(localSalesTable);
# }
# if (! mayJournalBePosted)
# {
# continue;
# }
#
# if (chooseLines.changed(tablenum(SalesLine)))
# {
# localSalesLine = chooseLines.get(tablenum(SalesLine));
# }
#
# splitSiteId = this.splitSite() ? localSalesLine.inventDim().InventSiteId : '';
#
# inventTrans = chooseLines.get(tablenum(InventTrans));
# if (inventTrans.RecId)
# {
# select firstonly custPackingSlipTrans
# join custPackingSlipJour
# where custPackingSlipTrans.InventTransId == inventTrans.InventTransId &&
# custPackingSlipTrans.PackingSlipId == inventTrans.PackingSlipId &&
# custPackingSlipTrans.SalesId == custPackingSlipJour.SalesId &&
# custPackingSlipTrans.PackingSlipId == custPackingSlipJour.PackingSlipId &&
# custPackingSlipTrans.DeliveryDate == custPackingSlipJour.DeliveryDate;
#
# if (packingSlipJourLines.exists(custPackingSlipJour))
# {
# packingSlipLineSalesLine = Map::create(packingSlipJourLines.lookup(custPackingSlipJour));
# }
# else
# {
# packingSlipLineSalesLine = new Map(Types::Record, Types::Record);
# }
#
# packingSlipLineSalesLine.insert(custPackingSlipTrans,localSalesLine);
# packingSlipJourLines.insert(custPackingSlipJour,packingSlipLineSalesLine.pack());
#
# if (emptyHeaders.exists(this.salesParmTableMapKey(localSalesTable.SalesId, splitSiteId, localSalesLine.DeliveryName, localSalesLine.DeliveryAddress, localSalesLine.DlvMode)))
# {
# emptyHeaders.remove(this.salesParmTableMapKey(localSalesTable.SalesId, splitSiteId, localSalesLine.DeliveryName, localSalesLine.DeliveryAddress, localSalesLine.DlvMode));
# }
# headers.insert(this.salesParmTableMapKey(localSalesTable.SalesId, splitSiteId, localSalesLine.DeliveryName, localSalesLine.DeliveryAddress, localSalesLine.DlvMode),'');
# }
# else
# if (!headers.exists(this.salesParmTableMapKey(localSalesTable.SalesId, splitSiteId, localSalesLine.DeliveryName, localSalesLine.DeliveryAddress, localSalesLine.DlvMode)))
# {
# if (this.splitSite())
# {
# splitSiteId = localSalesLine.inventDim().InventSiteId;
# localSalesTable.InventSiteId = splitSiteId;
# }
#
# if (this.splitDeliveryInformation())
# {
# localSalesTable.DeliveryName = localSalesLine.DeliveryName;
# localSalesTable.DeliveryAddress = localSalesLine.DeliveryAddress;
# localSalesTable.DlvMode = localSalesLine.DlvMode;
# }
# emptyHeaders.insert(this.salesParmTableMapKey(localSalesTable.SalesId, splitSiteId, localSalesTable.DeliveryName, localSalesTable.DeliveryAddress, localSalesTable.DlvMode), localSalesTable);
# }
# }
# this.createBasedOnPackingSlip(packingSlipJourLines, emptyHeaders, _salesParmTable);
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #classDeclaration
#class SalesFormLetter_Invoice
#extends SalesFormLetter
#{
# CustInvoiceJour custInvoiceJour;
# CustInvoiceTrans custInvoiceTrans;
# SalesQty invoiceUpdatedOnly;
# AmountCur discValue;
#
# VendInvoiceJour vendInvoiceJour;
# VendPackingSlipJour vendPackingSlipJour;
# AddressCountryRegionId vendCountryRegionId;
# AmountCur reversechargeTotal;
# SalesQty newPostingSalesQty;
# InventQty newPostingInventQty;
# RecordInsertList recordInsertSalesParmSubLine;
#
# #define.currentVersion(7)
# #LOCALMACRO.ParmList
# parmId,
# salesParmUpdate,
# backorder,
# queryCriteria,
# editing,
# printOut,
# printFormletter,
# printCODLabel,
# printFreightSlip,
# printerSettingsFormLetter,
# printerSettingsFreightSlip,
# printerSettingsCODLabel,
# printShippingLabel,
# printerSettingsShippingLabel,
# printerSettingsBillOfExchange,
# printerSettingsFormLetterCopy,
# usePrintManagement
# #ENDMACRO
#}
#
ENDSOURCE
SOURCE #createBasedOnPackingSlip
#protected void createBasedOnPackingSlip(Map _packingSlipJourLines,
# Map _emptyHeaders = null,
# SalesParmTable _salesParmTable = null)
#{
# CustPackingSlipTrans custPackingSlipTrans;
# CustPackingSlipJour custPackingSlipJour;
#
# TradeLineRefId tableRefId;
#
# SalesTable prevSalesTable;
# boolean mayJournalBePosted = false;
# List list = new List(Types::Record);
# SalesParmSubId subId;
#
# MapEnumerator me, me_lines;
# SalesParmSubTable localSalesParmSubTable;
# SalesId prevsalesId;
#
# AccountOrder accountOrder;
#
# void createParmTable()
# {
# if (this.allowCreateParmTable())
# {
# if (!_salesParmTable.ParmId || _salesParmTable.TableRefId != tableRefId)
# {
# _salesParmTable.clear();
# _salesParmTable.TableRefId = tableRefId;
#
# this.createParmTable(_salesParmTable,
# prevSalesTable,
# prevSalesTable.InventSiteId,
# prevSalesTable.SalesName,
# prevSalesTable.DeliveryName,
# prevSalesTable.DeliveryAddress,
# prevSalesTable.DlvMode);
#
# recordInsertSalesParmTable.add(_salesParmTable);
#
# localSalesParmSubTable = SalesParmSubTable::createFromSalesParmTable(_salesParmTable,false);
#
# if (custPackingSlipJour.RecId)
# {
# localSalesParmSubTable.initFromCustPackingSlipJour(custPackingSlipJour);
# localSalesParmSubTable.SubId = subId;
# }
#
# recordInsertSalesParmSubTable.add(localSalesParmSubTable);
# }
# else
# {
# if (custPackingSlipJour.RecId)
# {
# select firstonly forupdate localSalesParmSubTable
# where localSalesParmSubTable.ParmId == _salesParmTable.ParmId &&
# localSalesParmSubTable.TableRefId == _salesParmTable.TableRefId;
#
# localSalesParmSubTable.initFromCustPackingSlipJour(custPackingSlipJour);
# localSalesParmSubTable.SubId = subId;
# localSalesParmSubTable.update();
# }
# }
#
# this.allowCreateParmTable(this.allowEmptyTable());
#
# tableRefId = FormLetter::getTableRef();
# }
# }
# ;
#
# this.recordInsertListInit();
#
# if (_salesParmTable.TableRefId)
# tableRefId = _salesParmTable.TableRefId;
# else
# tableRefId = FormLetter::getTableRef();
#
# subId = newguid();
# me = _packingSlipJourLines.getEnumerator();
# while (me.moveNext())
# {
# me_lines = Map::create(me.currentValue()).getEnumerator();
# custPackingSlipJour = me.currentKey();
#
# while (me_lines.moveNext())
# {
# custPackingSlipTrans = me_lines.currentKey();
# if (prevsalesId != custPackingSlipTrans.OrigSalesId)
# {
# if (prevsalesId)
# {
# prevSalesTable = SalesTable::find(prevsalesId);
# createParmTable();
# }
# prevsalesId = custPackingSlipTrans.OrigSalesId;
# }
# list = new List(Types::Record);
# list.addEnd(custPackingSlipTrans);
# this.createParmLineAndSubLines(me_lines.currentValue(),list.pack(),tableRefId,subId);
# }
# prevSalesTable = SalesTable::find(prevsalesId);
# createParmTable();
# subId = newguid();
# prevsalesId = '';
# }
#
# this.recordInsertListInsert();
#
# accountOrder = salesParmUpdate.SumBy;
# salesParmUpdate.SumBy = AccountOrder::None;
# this.reArrange(false);
# this.reArrangeNow(true);
# salesParmUpdate.SumBy = accountOrder;
#
# if (_emptyHeaders)
# {
# _salesParmTable = null;
# this.recordInsertListInit();
#
# custPackingSlipJour = null;
# me = _emptyHeaders.getEnumerator();
# while (me.moveNext())
# {
# prevSalesTable = me.currentValue();
# createParmTable();
# }
# this.recordInsertListInsert();
# }
#}
ENDSOURCE
SOURCE #createCustTrans
#protected void createCustTrans()
#{
# CustVoucher custVoucher;
# CustTrans custTrans;
# CustTransRefType refType;
# Num refId;
#
# LedgerTransTxt ledgerTransTxt;
# ;
#
# if (creditNote)
# ledgerTransTxt = LedgerTransTxt::SalesCreditNoteCust;
# else
# ledgerTransTxt = LedgerTransTxt::SalesInvoiceCust;
#
# custVoucher = CustVoucher::newCustVoucherSales(ledgerVoucher,
# ledgerTransTxt,
# custInvoiceJour,
# salesParmTable,
# salesTable);
#
# custVoucher.parmExchRate(custInvoiceJour.ExchRate);
# custVoucher.parmExchRateSecondary(custInvoiceJour.ExchRateSecondary);
#
# if (custInvoiceJour.creditNote())
# {
# refType = CustTransRefType::CreditNote;
# refId = custInvoiceJour.InvoiceId;
# }
# else
# {
# refType = CustTransRefType::Invoice;
# refId = custInvoiceJour.InvoiceId;
# }
#
# custVoucher.parmTransRefType(refType);
# custVoucher.parmTransRefId(refId);
#
# custVoucher.parmBypassCreditCheck(salesTable.creditCardBypassCreditLimit());
# custVoucher.post(custTrans, NoYes::No,Currency::noYes2UnknownNoYes(custInvoiceJour.Triangulation));
#}
ENDSOURCE
SOURCE #createJournal
#public void createJournal()
#{
# ;
#
# if (!this.checkIfShipmentUpdated())
# {
# return;
# }
#
# //create misc charge from charges feed back by 3rd party carrier software
# this.retreiveShippingInfo();
#
# this.setReverseCharge_UK();
#
# super();
#}
ENDSOURCE
SOURCE #createParmLineAndSubLines
#protected void createParmLineAndSubLines(SalesLine _salesLine,
# container _packedSubLinesList,
# TradeLineRefId _tableRef,
# SalesParmSubId _subId)
#{
# ListEnumerator le;
# SalesParmSubLine _salesParmSubLine;
# SalesParmLine _salesParmLine;
# CustPackingSlipTrans custPackingSlipTrans;
# SalesQty salesQty;
# InventQty inventQty;
# Set subLineSet = new Set(Types::Record);
# SetEnumerator se;
#
# newPostingSalesQty = 0;
# newPostingInventQty = 0;
#
# if (_salesLine.RecId)
# {
# le = List::create(_packedSubLinesList).getEnumerator();
#
# while (le.moveNext())
# {
# custPackingSlipTrans = le.current();
#
# custPackingSlipTrans.Qty = custPackingSlipTrans.remainSalesFinancial();
# custPackingSlipTrans.InventQty = custPackingSlipTrans.remainInventFinancial();
# subLineSet.add(custPackingSlipTrans);
#
# inventQty += custPackingSlipTrans.InventQty;
# salesQty += custPackingSlipTrans.Qty;
# }
#
# newPostingSalesQty = salesQty;
# newPostingInventQty = inventQty;
#
# if (this.createParmLine(_salesLine, _tableRef))
# {
# if (salesParmLineMap.exists(this.salesParmLineMapKey(_salesLine.SalesId, _salesLine.InventTransId)))
# {
# _salesParmLine = salesParmLineMap.lookup(this.salesParmLineMapKey(_salesLine.SalesId, _salesLine.InventTransId));
#
# se = subLineSet.getEnumerator();
# while (se.moveNext())
# {
# custPackingSlipTrans = se.current();
# _salesParmSubLine.clear();
# _salesParmSubLine.initFromSalesParmLine(_salesParmLine);
# _salesParmSubLine.initFromCustPackingSlipTrans(custPackingSlipTrans);
# _salesParmSubLine.SubId = _subId;
# recordInsertSalesParmSubLine.add(_salesParmSubLine);
# }
# }
# }
# }
#}
ENDSOURCE
SOURCE #createParmLineFromWMSOrderTrans
#public boolean createParmLineFromWMSOrderTrans(SalesLine _salesLine,
# InventQty _qty2Invoice,
# TradeLineRefId _tableRef)
#{
# boolean ret = false;
# SalesParmLine _salesParmLine;
# InventQty qtyDelivered = _salesLine.RemainInventFinancial;
# ;
# if (qtyDelivered > _qty2Invoice)
# qtyDelivered = _qty2Invoice;
#
# if (qtyDelivered == 0)
# return false;
#
# _salesLine.InventDeliverNow = qtyDelivered;
# _salesLine.SalesDeliverNow = UnitConvert::qty(_salesLine.InventDeliverNow,
# _salesLine.inventTable().inventUnitId(),
# _salesLine.SalesUnit,
# _salesLine.ItemId);
# if (_salesLine.RecId)
# {
# _salesParmLine.clear();
# _salesParmLine.TableRefId = _tableRef;
#
# [_salesParmLine.DeliverNow, _salesParmLine.RemainBefore , _salesParmLine.RemainAfter ] = this.qtySales (_salesLine, naReal());
# [_salesParmLine.InventNow, _salesParmLine.RemainBeforeInvent, _salesParmLine.RemainAfterInvent] = this.qtyInvent(_salesLine, naReal());
#
# if (_salesParmLine.DeliverNow || (_salesParmLine.RemainBefore)) // && remain))
# {
# _salesParmLine.ParmId = salesParmUpdate.ParmId;
# _salesParmLine.initFromSalesLine(_salesLine);
#
# _salesParmLine.setQty(DocumentStatus::Invoice, salesParmUpdate.CreditRemaining);
# _salesParmLine.setInventDeliverNow();
# _salesParmLine.setLineAmount(_salesLine);
# _salesParmLine.calcPackingUnitQty();
# _salesParmLine.RecId = systemSequence.reserveValues(1,tablenum(SalesParmLine));
# salesParmLineMap.insert(this.salesParmLineMapKey(_salesParmLine.OrigSalesId,_salesParmLine.InventTransId),_salesParmLine);
# recordInsertSalesParmLine.add(_salesParmLine);
#
# this.allowCreateParmTable(true);
# ret = true;
# }
# }
# return ret;
#}
ENDSOURCE
SOURCE #createPayment
#protected void createPayment()
#{
# CustTrans custTrans;
# ;
#
# //Autogeneration of payment, controlled on Method of Payment
# super();
#
# custTrans = custInvoiceJour.custTrans();
#
# if (CustPaymModeTable::find(custTrans.PaymMode).PaymOnInvoice)
# {
# CustVendPaymInvoiceWithJournal::construct(custInvoiceJour).run();
# }
#}
ENDSOURCE
SOURCE #createPaymentSched
#protected void createPaymentSched()
#{
# CustVendPaymSched custVendPaymSched;
# CustPaymSched custPaymSched;
# AmountCur paymScheduleAmount;
# ;
#
# if (salesTable.PaymentSched &&
# ! CustPaymSched::exist(salesTable.TableId,
# salesTable.RecId) &&
# ! CustPaymSched::exist(salesParmTable.TableId,
# salesParmTable.RecId))
# {
# custVendPaymSched = CustVendPaymSched::construct(SysModule::Cust,salesTable);
# custVendPaymSched.setSalesTotals(salesTotals);
# custVendPaymSched.createPaymSched(PaymSched::find(salesTable.PaymentSched));
# }
#
#
# if (CustPaymSched::exist(salesParmTable.TableId, salesParmTable.RecId))
# {
# salesParmTable.copyPaymentSched(custInvoiceJour);
# }
# else
# {
# custPaymSched = CustPaymSched::find(salesTable.TableId, salesTable.RecId);
#
# if (custPaymSched)
# {
# paymScheduleAmount = custPaymSched.paymScheduleAmount();
#
# if (!CustPaymSched::isLinescreated(salesTable.TableId, salesTable.RecId) || paymScheduleAmount != custInvoiceJour.InvoiceAmount)
# {
# custInvoiceJour.createPaymentSched();
# }
# else
# {
# salesTable.copyPaymentSched(custInvoiceJour);
# }
# }
# }
#
# // check that schedule amount matches invoice amount
# if (!custInvoiceJour.validatePaymentSched())
# throw Exception::Error; // error message is added in validatePaymentSched()
#}
ENDSOURCE
SOURCE #custAccountInQuery
#boolean custAccountInQuery()
#{
# return false;
#}
ENDSOURCE
SOURCE #custBankAccountId
#CustBankAccountId custBankAccountId(SalesTable _salesTable)
#{
# return _salesTable.custTable_InvoiceAccount().BankAccount;
#}
ENDSOURCE
SOURCE #deleteFullyInvoiced
#public void deleteFullyInvoiced()
#{
# SalesLine localSalesLine;
# ParmId previousParmId = '';
# SalesId previousSalesId = '';
# ;
#
# if (!recordListSalesParmLine)
# return;
#
# if (SalesParameters::find().DeleteLine == NoYes::Yes)
# {
# salesParmLine.clear();
#
# recordListSalesParmLine.first(salesParmLine);
#
# while (salesParmLine)
# {
# salesLine = salesParmLine.salesLine(true);
#
# if (salesLine.SalesStatus == SalesStatus::Invoiced && salesLine.validateDelete())
# salesLine.delete();
#
# if (! recordListSalesParmLine.next(salesParmLine))
# break;
# }
# }
#
# if (SalesParameters::find().DeleteHeading == NoYes::Yes)
# {
# salesParmLine.clear();
#
# recordListSalesParmLine.first(salesParmLine);
#
# while (salesParmLine)
# {
# if (salesParmLine.OrigSalesId != previousSalesId || salesParmLine.ParmId != previousParmId)
# {
# salesTable = salesParmLine.salesTable(true);
#
# if (salesTable)
# {
# select firstonly localSalesLine
# where localSalesLine.SalesId == salesParmLine.OrigSalesId
# && localSalesLine.SalesStatus != SalesStatus::Invoiced
# && localSalesLine.SalesStatus != SalesStatus::Canceled;
#
# if (!localSalesLine && salesTable.validateDelete())
# salesTable.delete();
# }
# }
#
# previousSalesId = salesParmLine.OrigSalesId;
# previousParmId = salesParmLine.ParmId;
#
# if (! recordListSalesParmLine.next(salesParmLine))
# break;
# }
# }
#}
ENDSOURCE
SOURCE #documentStatus
#DocumentStatus documentStatus()
#{
# return DocumentStatus::Invoice;
#}
ENDSOURCE
SOURCE #getSplitDeliveryInformation
#boolean getSplitDeliveryInformation()
#{
# return SalesParameters::find().SplitDeliveryInvoice;
#}
ENDSOURCE
SOURCE #getSplitSite
#TradeSplitSite getSplitSite()
#{
# return SalesParameters::find().SplitSiteInvoice;
#}
ENDSOURCE
SOURCE #giro
#boolean giro()
#{
# return true;
#}
ENDSOURCE
SOURCE #initJournal
#protected void initJournal()
#{
# NumberSequenceTable numberSequenceTable;
# NumberSequenceReference numberSequenceReference;
# SalesLine salesLineLoc;
# boolean onlyServiceItem = true;
# InventTable inventTable;
# ;
# custInvoiceJour.clear();
# if (TaxParameters::find().UnrealizedTax && isConfigurationkeyEnabled(configurationkeynum(CRSEThailand)))
# {
# select firstonly RecId from salesLineLoc
# exists join inventTable
# where salesLineLoc.SalesId == salesTable.SalesId &&
# salesLineLoc.ItemId == inventTable.ItemId &&
# inventTable.ItemType != ItemType::Service;
# if(salesLineLoc.RecId)
# {
# onlyServiceItem = false;
# }
#
# numberSequenceReference = NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(TaxInvoiceSalesId)));
# numberSequenceTable = NumberSequenceTable::find(numberSequenceReference.NumberSequence);
#
# if(onlyServiceItem)
# {
# if(numberSequenceTable.Continuous)
# {
# custInvoiceJour.initValue();
# }
# }
# else
# {
# if(!numberSequenceTable.Continuous)
# {
# throw error(strfmt("@SYS26207", numberSequenceTable.NumberSequence));
# }
#
# custInvoiceJour.initValue();
# }
# }
# else
# {
# custInvoiceJour.initValue();
# }
#
# custInvoiceJour.InvoiceId = number;
# custInvoiceJour.LedgerVoucher = voucher;
#
# if (!voucher && !salesParmUpdate.Proforma)
# {
# throw error("@SYS71652");
# }
#
# custInvoiceJour.ParmId = salesParmUpdate.ParmId;
# custInvoiceJour.InvoiceDate = this.updateDate();
#
# custInvoiceJour.initFromSalesTable(salesTable);
# custInvoiceJour.initFromSalesParmTable(salesParmTable);
#
# custInvoiceJour.InterCompanyPosted = this.interCompanyPosted();
#}
#
ENDSOURCE
SOURCE #initJournalLine
#protected void initJournalLine()
#{;
# custInvoiceTrans.clear();
# custInvoiceTrans.initValue();
# custInvoiceTrans.initFromSalesLine(salesLine,salesParmLine);
#
# custInvoiceTrans.setLinenum(sumByLineNum);
# sumByLineNum++;
#
# custInvoiceTrans.SalesId = custInvoiceJour.SalesId;
# custInvoiceTrans.InvoiceId = custInvoiceJour.InvoiceId;
# custInvoiceTrans.InvoiceDate = custInvoiceJour.InvoiceDate;
# custInvoiceTrans.NumberSequenceGroup = custInvoiceJour.NumberSequenceGroup;
# custInvoiceTrans.Qty = salesParmLine.DeliverNow;
#
# //If the salesline is from a dropshipment the vendors country or region must be stored to determine Intrastat reporting
# if (salesLine.DeliveryType == TradeLineDlvType::DropShip)
# {
# //if the salesLine is not linked to a different purchase the Vendor country or regioin need not be found again
# if ( (vendInvoiceJour && vendInvoiceJour.PurchId == salesLine.InventRefId)
# ||(vendPackingSlipJour && vendPackingSlipJour.PurchId == salesLine.InventRefId))
# {
# custInvoiceTrans.CountryRegionOfShipment = vendCountryRegionId;
# }
# else //Either a vendInvoiceJour or VendPackingSlipJour will exist for a dropshipment salesline being invoiced
# {
# vendInvoiceJour = VendInvoiceJour::findFromPurchId(salesLine.InventRefId);
#
# if (vendInvoiceJour)
# {
# vendCountryRegionId = VendTable::find(vendInvoiceJour.OrderAccount).CountryRegionId;
# custInvoiceTrans.CountryRegionOfShipment = vendCountryRegionId;
# }
# else
# {
# vendPackingSlipJour = VendPackingSlipJour::findFromPurchId(salesLine.InventRefId);
#
# if (vendPackingSlipJour)
# {
# vendCountryRegionId = VendTable::find(vendPackingSlipJour.OrderAccount).CountryRegionId;
# custInvoiceTrans.CountryRegionOfShipment = vendCountryRegionId;
# }
# }
# }
# }
#
# if (LedgerParameters::find().TaxImportAlandTax)
# {
# if (custInvoiceTrans.TaxGroup && custInvoiceTrans.TaxItemGroup)
# {
# this.requiresTaxBorderNum();
# }
# }
#}
ENDSOURCE
SOURCE #initParmDefault
#public void initParmDefault()
#{
# super();
#
# salesParmUpdate.CreditRemaining = true;
#}
ENDSOURCE
SOURCE #initQueryBuild
#protected void initQueryBuild()
#{;
# if (salesParmUpdate.SpecQty == SalesUpdate::PackingSlip)
# {
# chooseLines = new SysQueryRun(querystr(SalesUpdatePackingSlip));
# }
# else
# super();
#}
ENDSOURCE
SOURCE #initShippingStat
#void initShippingStat(CustInvoiceJour _custInvoiceJour)
#{
# SalesShippingStat salesShippingStatLocal;
#
# recordListShippingLine = new RecordSortedList(tablenum(SalesShippingStat));
# recordListShippingLine.sortOrder(fieldnum(SalesShippingStat, RecId));
#
# while select salesShippingStatLocal
# where salesShippingStatLocal.SalesId == _custInvoiceJour.SalesId &&
# salesShippingStatLocal.InvoiceId == _custInvoiceJour.InvoiceId &&
# salesShippingStatLocal.InvoiceDate == _custInvoiceJour.InvoiceDate
# {
# recordListShippingLine.ins(salesShippingStatLocal);
# }
#}
ENDSOURCE
SOURCE #initTransactionTxt
#protected TransactionTxt initTransactionTxt(LedgerTransTxt ledgerTransTxt)
#{
# TransactionTxt transactionTxt;
# ;
# transactionTxt = new TransactionTxt();
# transactionTxt.setType (ledgerTransTxt);
# transactionTxt.setLanguage (custInvoiceJour.LanguageId);
# transactionTxt.setVoucher (custInvoiceJour.LedgerVoucher);
# transactionTxt.setFormLetter (custInvoiceJour.InvoiceId);
# transactionTxt.setKey1 (custInvoiceJour.SalesId);
# transactionTxt.setKey2 (custInvoiceJour.InvoiceAccount);
# transactionTxt.setKey3 (CustTable::groupId(custInvoiceJour.InvoiceAccount));
#
# return transactionTxt;
#}
ENDSOURCE
SOURCE #insertJournal
#void insertJournal()
#{
# CreditCardPaymentJournal creditCardPaymentJournal;
# SalesTable localSalesTable;
# ;
#
# if (this.interCompanyIsPurchFinancialUpdated())
# {
# if (!this.creditCardDoCaptureOrPostAuthorize())
# {
# return;
# }
#
# // The super() call runs the postUpdate() method which updates the salesTable buffer.
# // Reread the buffer to get the data from the creditCardDoCaptureOrPostAuthorize()
# // and get a copy of the salesTable before calling super().
# salesTable.reread();
# localSalesTable = salesTable.data();
#
# super();
#
# if (localSalesTable.CreditCardCustRefId != 0)
# {
# // Create the payment journal and settle this invoice with credit card payment.
# creditCardPaymentJournal = new CreditCardPaymentJournal(localSalesTable, custInvoiceJour);
# creditCardPaymentJournal.run();
# }
# }
# else
# {
# this.interCompanyPost(false);
# }
#}
ENDSOURCE
SOURCE #interCompanyIsPurchFinancialUpdated
#boolean interCompanyIsPurchFinancialUpdated()
#{
# InventSum inventSum;
# InventDimParm inventDimParm;
# InventSumFinancial inventSumFinancial;
# InventTrans inventTrans;
# SalesQty qtyUpdate;
# boolean ok = true;
#;
# if (salesTable.InterCompanyCompanyId
# && salesTable.interCompanyEndpointActionPolicy().UnitPriceEqualsCostPrice)
# {
# salesLine.clear();
# salesParmLine.clear();
# recordListSalesParmLine.first(salesParmLine);
#
# while (salesParmLine)
# {
# if (!this.checkDiscardLine() && salesParmLine.inventTable().inventItemType().mustInventBeControlled())
# {
# salesLine = this.getSalesLine(salesParmLine);
# qtyUpdate = 0;
#
# if (salesParmLine.InventNow > 0)
# {
# while select sum(Qty), InventDimId from inventTrans
# index hint TransIdIdx
# group by InventDimId
# where inventTrans.InventTransId == salesLine.InventTransId
# && inventTrans.StatusIssue >= StatusIssue::Deducted
# {
# inventSum = InventSum::find(salesLine.ItemId,inventTrans.InventDimId);
# inventDimParm.initFromInventDim(inventTrans.inventDim());
# inventSumFinancial = InventSumFinancial::newSumReport(transDate,inventSum,inventTrans.inventDim(),inventDimParm);
# if (-inventTrans.Qty > inventSumFinancial.qty())
# qtyUpdate += inventSumFinancial.qty();
# else
# qtyUpdate += -inventTrans.Qty;
# }
# if (salesParmLine.InventNow > qtyUpdate)
# ok = false;
# }
# }
# if (!recordListSalesParmLine.next(salesParmLine))
# break;
# }
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #interCompanyParmLineClosed
#boolean interCompanyParmLineClosed(Common _common)
#{
# SalesLine _salesLine = _common;
# SalesTable _salesTable = _salesLine.salesTable();
# PurchParmLine purchParmLine;
# boolean ret;
#;
# if (interCompanyCompanyId)
# {
# changecompany(interCompanyCompanyId)
# {
# select firstonly Closed from purchParmLine
# where purchParmLine.ParmId == interCompanyParmId
# && purchParmLine.OrigPurchId == _salesTable.InterCompanyPurchId
# && purchParmLine.InventTransId == _salesLine.InterCompanyInventTransId;
# ret = purchParmLine.Closed;
# }
# }
# else
# {
# select firstonly Closed from purchParmLine
# where purchParmLine.ParmId == interCompanyParmId
# && purchParmLine.OrigPurchId == _salesLine.InventRefId
# && purchParmLine.InventTransId == _salesLine.InventRefTransId;
# ret = purchParmLine.Closed;
# }
# return ret;
#}
ENDSOURCE
SOURCE #interCompanyParmLineQty
#Qty interCompanyParmLineQty(Common _common, boolean _isInventQty = false)
#{
# SalesLine salesLineLocal = _common;
# VendInvoiceTrans vendInvoiceTransLocal;
# VendInvoiceJour vendInvoiceJourLocal;
#;
# if (interCompanyCompanyId)
# {
# changecompany(interCompanyCompanyId)
# {
# select forceplaceholders InventQty, Qty from vendInvoiceTransLocal
# where vendInvoiceTransLocal.InventTransId == salesLineLocal.InterCompanyInventTransId
# exists join vendInvoiceJourLocal
# where vendInvoiceJourLocal.InvoiceId == vendInvoiceTransLocal.InvoiceId
# && vendInvoiceJourLocal.InvoiceDate == vendInvoiceTransLocal.InvoiceDate
# && vendInvoiceJourLocal.PurchId == vendInvoiceTransLocal.PurchID
# && vendInvoiceJourLocal.InternalInvoiceId == vendInvoiceTransLocal.InternalInvoiceId
# && vendInvoiceJourLocal.ParmId == interCompanyParmId;
# }
# }
# else
# {
# select forceplaceholders InventQty, Qty from vendInvoiceTransLocal
# where vendInvoiceTransLocal.InventTransId == salesLineLocal.InventRefTransId
# exists join vendInvoiceJourLocal
# where vendInvoiceJourLocal.InvoiceId == vendInvoiceTransLocal.InvoiceId
# && vendInvoiceJourLocal.InvoiceDate == vendInvoiceTransLocal.InvoiceDate
# && vendInvoiceJourLocal.PurchId == vendInvoiceTransLocal.PurchID
# && vendInvoiceJourLocal.InternalInvoiceId == vendInvoiceTransLocal.InternalInvoiceId
# && vendInvoiceJourLocal.ParmId == interCompanyParmId;
# }
# return _isInventQty ? vendInvoiceTransLocal.InventQty : vendInvoiceTransLocal.Qty;
#}
#
#
ENDSOURCE
SOURCE #interCompanyPost
#void interCompanyPost(boolean _invoiceCreated = true)
#{;
# if (_invoiceCreated)
# {
# if (custInvoiceJour.interCompanyDoInternalPosting()
# || (custInvoiceJour.InterCompanyCompanyId && custInvoiceJour.interCompanyDoExternalPosting()))
# {
# InterCompanyPostPurch::post(this,custInvoiceJour,journalList);
# }
# }
# else
# {
# warning("@SYS94391");
#
# if (salesParmLine.interCompanyDoExternalPosting())
# {
# info("@SYS94392");
#
# salesParmLine.clear();
# recordListSalesParmLine.first(salesParmLine);
# InterCompanyPostSales::post(this,salesParmLine,null,false,true);
# }
# }
#}
#
ENDSOURCE
SOURCE #interCompanyUpdateSalesPrice
#void interCompanyUpdateSalesPrice(SalesLine _salesLine)
#{
# SalesLine salesLineLocal;
#;
# if (_salesLine.InterCompanyInventTransId
# && _salesLine.salesTable().interCompanyEndpointActionPolicy().UnitPriceEqualsCostPrice)
# {
# ttsbegin;
#
# salesLineLocal = SalesLine::findRecId(_salesLine.RecId,true);
#
# _salesLine.SalesPrice = SalesLineType::construct(_salesLine).interCompanyCalcSalesPrice();
# _salesLine.LineAmount = _salesLine.calcLineAmount();
#
# salesLineLocal.SalesPrice = _salesLine.SalesPrice;
# salesLineLocal.LineAmount = _salesLine.LineAmount;
# salesLineLocal.SkipUpdate = InterCompanySkipUpdate::Internal;
# salesLineLocal.update();
#
# ttscommit;
# }
#}
#
ENDSOURCE
SOURCE #invoiceAccountInQuery
#boolean invoiceAccountInQuery()
#{
# return true;
#}
ENDSOURCE
SOURCE #journal
#CustInvoiceJour journal()
#{
# return custInvoiceJour;
#}
ENDSOURCE
SOURCE #ledgerRefRecid
#protected recId ledgerRefRecid()
#{
# return salesLine.RecId;
#}
ENDSOURCE
SOURCE #ledgerRefTableId
#protected tableId ledgerRefTableId()
#{
# return salesLine.TableId;
#}
ENDSOURCE
SOURCE #mayJournalBePosted
#public boolean mayJournalBePosted(SalesTable _salesTable)
#{
# return _salesTable.mayInvoiceBeUpdated();
#}
ENDSOURCE
SOURCE #mayJournalTransBePosted
#public boolean mayJournalTransBePosted(SalesLine _salesLine)
#{
# return _salesLine.mayInvoiceBeUpdated();
#}
#
ENDSOURCE
SOURCE #new
#void new(boolean getParmId = true)
#{
# super(getParmId);
#
# useShippingStat = SalesParameters::find().useShippingStatOnInvoice();
#}
ENDSOURCE
SOURCE #newJournalList
#///
#/// Constructs a record sorted list.
#///
#///
#/// The constructed record sorted list.
#///
#public RecordSortedList newJournalList()
#{
# RecordSortedList recordSortedList;
# ;
#
# recordSortedList = new RecordSortedList(tablenum(CustInvoiceJour));
# recordSortedList.sortOrderFromContainer(this.formLetterSorting(tablenum(CustInvoiceJour), fieldnum(CustInvoiceJour, RecId)));
#
# return recordSortedList;
#}
#
ENDSOURCE
SOURCE #pack
#container pack()
#{
# return [#CurrentVersion+#ParentVersion,#ParmList,#ParmListCommonCS];
#}
ENDSOURCE
SOURCE #postEndDisc
#protected void postEndDisc()
#{
# TransactionTxt transactionTxt;
# LedgerVoucherTransObject ledgerVoucherTransObject;
# ;
# if (custInvoiceJour.EndDisc)
# {
# transactionTxt = this.initTransactionTxt(LedgerTransTxt::SalesEndDisc);
#
# ledgerVoucherTransObject = LedgerVoucherTransObject::newCreateTrans(
# ledgerVoucher.findLedgerVoucherObject(),
# LedgerPostingType::CustInvoiceDisc,
# LedgerSystemAccounts::accountNum(LedgerPostingType::CustInvoiceDisc),
# custInvoiceJour.Dimension,
# custInvoiceJour.CurrencyCode,
# custInvoiceJour.EndDisc,
# custInvoiceJour.TableId,
# custInvoiceJour.RecId,
# 0,
# custInvoiceJour.ExchRate,
# custInvoiceJour.ExchRateSecondary,
# Currency::noYes2UnknownNoYes(custInvoiceJour.Triangulation));
# ledgerVoucherTransObject.parmTransTxt(transactionTxt.txt());
# ledgerVoucher.addTrans(ledgerVoucherTransObject);
# }
#}
ENDSOURCE
SOURCE #postInvoiceRoundOff
#protected void postInvoiceRoundOff()
#{
# TransactionTxt transactionTxt;
# LedgerVoucherTransObject ledgerVoucherTransObject;
# ;
# if (custInvoiceJour.InvoiceRoundOff)
# {
# transactionTxt = this.initTransactionTxt(LedgerTransTxt::CustRoundOff);
#
# ledgerVoucherTransObject = LedgerVoucherTransObject::newCreateTrans(
# ledgerVoucher.findLedgerVoucherObject(),
# LedgerPostingType::SalesRoundOff,
# LedgerSystemAccounts::accountNum(LedgerPostingType::SalesRoundOff),
# custInvoiceJour.Dimension,
# custInvoiceJour.CurrencyCode,
# -custInvoiceJour.InvoiceRoundOff,
# custInvoiceJour.TableId,
# custInvoiceJour.RecId,
# 0,
# custInvoiceJour.ExchRate,
# custInvoiceJour.ExchRateSecondary,
# Currency::noYes2UnknownNoYes(custInvoiceJour.Triangulation));
# ledgerVoucherTransObject.parmTransTxt(transactionTxt.txt());
# ledgerVoucher.addTrans(ledgerVoucherTransObject);
# }
#}
ENDSOURCE
SOURCE #postJournal
#protected void postJournal()
#{
# this.postMarkupTable();
# this.postTax(true);
# this.createCustTrans();
#
# this.postInvoiceRoundOff();
# this.postEndDisc();
#
# this.endJournalLedger();
#
# ledgerVoucher.end();
#}
ENDSOURCE
SOURCE #postMarkupOnJour
#protected void postMarkupOnJour(SalesTable _salesTableMarkup)
#{
# ;
# markup.postInvoice(1,
# salesTotals.totalOrderBalance(_salesTableMarkup.RecId),
# _salesTableMarkup,
# ledgerVoucher,
# _salesTableMarkup.Dimension,
# custInvoiceJour);
#}
ENDSOURCE
SOURCE #postMarkupOnTrans
#protected void postMarkupOnTrans()
#{;
# markup.postInvoice(updateNow,
# lineValue,
# salesLine,
# ledgerVoucher,
# salesLine.Dimension,
# custInvoiceTrans,
# salesLine.interCompanyLineAmount(updateNow,custInvoiceTrans.InvoiceDate));
#}
ENDSOURCE
SOURCE #postTaxOnProforma
#boolean postTaxOnProforma()
#{
# return true;
#}
ENDSOURCE
SOURCE #postUpdate
#void postUpdate()
#{;
# super();
#
# this.updateEstimate();
# this.deleteFullyInvoiced();
# this.updateWMSShipment();
#}
ENDSOURCE
SOURCE #printJournal
#void printJournal()
#{
# SalesShippingStat salesShippingStat;
# boolean newline;
# ;
#
# if (journalList.len() > 0)
# {
# if (printFormletter)
# {
# this.sendAsXML();
#
# custInvoiceJour.printJournal(this, journalList);
# }
#
# if (printCODLabel)
# this.printSalesCODLabel();
#
# if (printFreightSlip)
# this.printoutFreightSlip();
#
# if (printShippingLabel && SalesParameters::find().ShippingStat != SalesShipping::PackingSlip && ! this.proforma())
# {
# newline = journalList.first(custInvoiceJour);
# while (newline)
# {
# this.initShippingStat(custInvoiceJour);
#
# if (recordListShippingLine && recordListShippingLine.len() != 0)
# salesShippingStat.printJournal(this, recordListShippingLine);
#
# newline = journalList.next(custInvoiceJour);
# }
# }
#
# if (this.proforma())
# this.removeProforma();
# }
#}
#
ENDSOURCE
SOURCE #printMgmtDocumentType
#///
#/// Identifies the print management document type.
#///
#///
#/// The print management document type for sales order invoice.
#///
#protected PrintMgmtDocumentType printMgmtDocumentType()
#{
# return PrintMgmtDocumentType::SalesOrderInvoice;
#}
#
#
ENDSOURCE
SOURCE #printSalesCODLabel
#protected void printSalesCODLabel()
#{
# Args parameters = new Args();
# ReportRun salesCODLabel;
# CustTrans custTrans
# ;
#
# if (salesTable.payment().PaymMethod == NetCurrent::COD)
# {
# custTrans = custInvoiceJour.custTrans();
#
# parameters.name(reportstr(SalesCODLabel));
# parameters.caller(this);
# parameters.record(custTrans);
#
# salesCODLabel = new ReportRun(parameters);
# salesCODLabel.run();
# }
#}
ENDSOURCE
SOURCE #qtyInvent
#container qtyInvent(Common _common, InventQty _qty)
#{
# if (salesParmUpdate.SpecQty == SalesUpdate::PackingSlip)
# {
# _qty = newPostingInventQty;
# }
# return super(_common, _qty);
#}
ENDSOURCE
SOURCE #qtySales
#container qtySales(Common _common, SalesQty _qty)
#{
# if (salesParmUpdate.SpecQty == SalesUpdate::PackingSlip)
# {
# _qty = newPostingSalesQty;
# }
# return super(_common, _qty);
#}
ENDSOURCE
SOURCE #reArrangePost
#protected void reArrangePost()
#{
# SalesParmSubLine localSalesParmSubLine;
# SalesParmLine localSalesParmLine;
# Map counter = new Map(typeId2Type(typeid(recId)),Types::Record);
# SalesParmLine sumParmLine;
# salesLineRefRecID prevSalesLineRecId;
# SalesParmLineRefRecId prevLineRefRecId;
#
#
#
# if (salesParmUpdate.SumBy != AccountOrder::Journal)
# {
# while select count(RecId), sum(DeliverNow), sum(InventNow) from localSalesParmLine
# group by SalesLineRecId
# where localSalesParmLine.ParmId == salesParmUpdate.ParmId
#
# {
# if (localSalesParmLine.RecId > 1)
# counter.insert(localSalesParmLine.SalesLineRecId, localSalesParmLine);
# }
#
# if (counter.elements() > 0)
# {
# ttsbegin;
# while select forupdate localSalesParmSubLine
# order by SalesLineRecId
# outer join forupdate localSalesParmLine
# where localSalesParmSubLine.ParmId == salesParmUpdate.ParmId &&
# localSalesParmSubLine.LineRefRecId == localSalesParmLine.RecId
# {
# if (counter.exists(localSalesParmSubLine.SalesLineRecId))
# {
# if (prevSalesLineRecId == localSalesParmSubLine.SalesLineRecId)
# {
# localSalesParmSubLine.LineRefRecId = prevLineRefRecId;
# localSalesParmSubLine.doUpdate();
# localSalesParmLine.doDelete();
# }
# else
# {
# if (localSalesParmLine)
# {
# sumParmLine = counter.lookup(localSalesParmSubLine.SalesLineRecId);
# localSalesParmLine.DeliverNow = sumParmLine.DeliverNow;
# localSalesParmLine.InventNow = sumParmLine.InventNow;
# localSalesParmLine.setLineAmount();
# localSalesParmLine.calcPackingUnitQty();
# localSalesParmLine.doUpdate();
# prevLineRefRecId = localSalesParmLine.RecId;
# prevSalesLineRecId = localSalesParmSubLine.SalesLineRecId;
# }
# }
# }
# }
# ttscommit;
# }
# }
#}
ENDSOURCE
SOURCE #reArrangePre
#protected void reArrangePre()
#{
# SalesParmLine localSalesParmLine, salesParmLineNew;
# SalesParmSubLine localSalesParmSubLine;
# Set counter = new Set(typeId2Type(typeid(recId)));
# ;
#
# if (salesParmUpdate.SumBy == AccountOrder::Journal)
# {
# while select count(RecId) from localSalesParmSubLine
# group by LineRefRecId
# where localSalesParmSubLine.ParmId == salesParmUpdate.ParmId
# {
# if (localSalesParmSubLine.RecId > 1)
# counter.add(localSalesParmSubLine.LineRefRecId);
# }
#
# if (counter.elements() > 0)
# {
# ttsbegin;
# while select forupdate localSalesParmSubLine
# order by LineRefRecId
# where localSalesParmSubLine.ParmId == salesParmUpdate.ParmId
# {
# if (counter.in(localSalesParmSubLine.LineRefRecId))
# {
# if (localSalesParmLine.RecId == localSalesParmSubLine.LineRefRecId)
# {
# salesParmLineNew = localSalesParmLine.data();
# salesParmLineNew.DeliverNow = localSalesParmSubLine.DeliverNow;
# salesParmLineNew.InventNow = localSalesParmSubLine.InventNow;
# salesParmLineNew.setLineAmount();
# salesParmLineNew.calcPackingUnitQty();
# salesParmLineNew.doInsert();
# localSalesParmSubLine.LineRefRecId = salesParmLineNew.RecId;
# localSalesParmSubLine.doUpdate();
# }
# else
# {
# localSalesParmLine = SalesParmLine::findRecId(localSalesParmSubLine.LineRefRecId, true);
# localSalesParmLine.InventNow = localSalesParmSubLine.InventNow;
# localSalesParmLine.DeliverNow = localSalesParmSubLine.DeliverNow;
# localSalesParmLine.setLineAmount();
# localSalesParmLine.calcPackingUnitQty();
# localSalesParmLine.doUpdate();
# }
# }
# }
# ttscommit;
# }
# }
#}
ENDSOURCE
SOURCE #recommendedSpecQty
#public SalesUpdate recommendedSpecQty()
#{
# return SalesUpdate::PackingSlip;
#}
ENDSOURCE
SOURCE #recordInsertListInit
#protected void recordInsertListInit()
#{
# super();
# recordInsertSalesParmSubLine = new RecordInsertList(tablenum(SalesParmSubLine));
#}
ENDSOURCE
SOURCE #recordInsertListInsert
#protected void recordInsertListInsert()
#{
# super();
# recordInsertSalesParmSubLine.insertDatabase();
#}
ENDSOURCE
SOURCE #reduceOnHand
#boolean reduceOnHand()
#{
# ;
# return SalesParameters::find().ReduceInvoice;
#}
ENDSOURCE
SOURCE #removeJournalFromList
#void removeJournalFromList()
#{
# journalList.del(custInvoiceJour);
#}
ENDSOURCE
SOURCE #removeProforma
#void removeProforma()
#{
# CustInvoiceJour proformaJour;
# ;
#
# ttsbegin;
#
# proformaJour.clear();
#
# journalList.first(proformaJour);
#
# while (proformaJour)
# {
# proformaJour = CustInvoiceJour::findRecId(proformaJour.RecId, true);
#
# proformaJour.delete();
#
# InventPackagingMaterialTrans::removeAll(custInvoiceJour);
#
# if (!journalList.next(proformaJour))
# break;
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #requiresTaxBorderNum
#private void requiresTaxBorderNum()
#{
# TaxGroupData taxGroupData;
# TaxOnItem taxOnItem;
# TaxTable taxTable;
# CustTable custTable;
# ;
#
# select firstonly TaxBorderNumber_FI from custTable
# where custTable.AccountNum == custInvoiceJour.InvoiceAccount;
#
# if (!custTable.TaxBorderNumber_FI)
# {
# // Check for tax code requiring border number
# select firstonly RecId from taxGroupData where taxGroupData.TaxGroup == custInvoiceTrans.TaxGroup
# exists join taxOnItem where taxOnItem.TaxCode == taxGroupData.TaxCode
# exists join taxTable where taxOnItem.TaxCode == taxTable.TaxCode &&
# taxTable.TaxBorderNumReq_FI;
#
# if (taxGroupData.RecId)
# {
# throw error("@SYS97541");
# }
# }
#}
ENDSOURCE
SOURCE #reSelect
#void reSelect(SalesUpdate _salesUpdate,
# NoYes _creditRemaining)
#{
# SalesUpdate _orgSalesUpdate = salesParmUpdate.SpecQty;
# SalesParmTable _salesParmTable;
# SalesParmSubTable _salesParmSubTable;
# SalesLine _salesLine;
# InventDim _inventDim;
# InventTrans _inventTrans;
# CustPackingSlipJour custPackingSlipJour;
# CustPackingSlipTrans custPackingSlipTrans;
#
# SalesParmSubTable newSalesParmSubTable;
# Map salesParmSubTableMap;
# MapEnumerator me;
#
# List list = new List(Types::Record);
# TradeLineRefId tableRefId;
# boolean subTableUpdated;
# guid subId, emptySubId;
#
# CustPackingSlipTrans prevPackingSLipTrans;
# SalesLine prevSalesLine;
# SalesId prevSalesId;
# InventSiteId prevInventSiteId;
# Addressing prevDeliveryAddress;
# CustDlvModeId prevDlvMode;
# CustName prevDeliveryName;
#
# container packedClass;
#
# void updateSalesParmSubTable()
# {
# subId = newguid();
# this.createParmLineAndSubLines(prevSalesLine, list.pack(), tableRefId, subId);
# list = new List(Types::Record);
# custPackingSlipJour = CustPackingSlipJour::findFromCustPackingSlipTrans(prevPackingSLipTrans.SalesId,
# prevPackingSLipTrans.PackingSlipId,
# prevPackingSLipTrans.DeliveryDate);
#
# if (subTableUpdated)
# {
# newSalesParmSubTable = _salesParmSubTable.data();
# newSalesParmSubTable.SubId = subId;
# newSalesParmSubTable.JournalRefRecId = custPackingSlipJour.RecId;
# newSalesParmSubTable.JournalRefTableId = custPackingSlipJour.TableId;
# salesParmSubTableMap.insert(newSalesParmSubTable.OrigSalesId + '#' + int642str(newSalesParmSubTable.JournalRefRecId), newSalesParmSubTable);
# }
# else
# {
# _salesParmSubTable.JournalRefRecId = custPackingSlipJour.RecId;
# _salesParmSubTable.JournalRefTableId = custPackingSlipJour.TableId;
# _salesParmSubTable.SubId = subId;
# _salesParmSubTable.doUpdate();
# subTableUpdated = true;
# }
# }
# ;
#
# //If running on the client, execute reSelect method on the server side to reduce the interaction between tiers
# if (!this.objectOnServer())
# {
# packedClass = SalesFormLetter::execReSelectOnServer(this.documentStatus(), this.parmId(), this.pack(), _salesUpdate, _creditRemaining);
# this.unpack(packedClass);
# return;
# }
#
#
# salesParmUpdate.SpecQty = _salesUpdate;
# salesParmUpdate.CreditRemaining = _creditRemaining;
#
# if (_orgSalesUpdate == _salesUpdate)
# {//DO Nothing
# break;
# }
# else if (_salesUpdate == SalesUpdate::PackingSlip)
# {
# this.recordInsertListInit();
#
# salesParmSubTableMap = new Map(Types::String, Types::Record);
# ttsbegin;
# while select forceplaceholders _salesParmTable
# where _salesParmTable.ParmId == salesParmUpdate.ParmId
# join forupdate _salesParmSubTable
# where _salesParmSubTable.ParmId == _salesParmTable.ParmId &&
# _salesParmSubTable.TableRefId == _salesParmTable.TableRefId
# {
# SalesParmLine::deleteFromSalesParmSubTable(_salesParmSubTable);
#
# while select _salesLine
# where _salesLine.SalesId == _salesParmSubTable.OrigSalesId
# && _salesLine.Blocked == NoYes::No
# && (!this.splitDeliveryInformation() ||
# (_salesLine.DeliveryAddress == _salesParmTable.DeliveryAddress &&
# _salesLine.DeliveryName == _salesParmTable.DeliveryName &&
# _salesLine.DlvMode == _salesParmTable.DlvMode))
# join InventTransId, PackingSlipId from _inventTrans
# where _inventTrans.InventTransId == _salesLine.InventTransId &&
# ((_inventTrans.StatusReceipt == StatusReceipt::Received &&
# _inventTrans.StatusIssue == StatusIssue::None) ||
# (_inventTrans.StatusReceipt == StatusReceipt::None &&
# _inventTrans.StatusIssue == StatusIssue::Deducted))
# join custPackingSlipTrans
# order by PackingSlipId
# where custPackingSlipTrans.InventTransId == _inventTrans.InventTransId &&
# custPackingSlipTrans.PackingSlipId == _inventTrans.PackingSlipId
# exists join _inventDim
# where _inventDim.InventDimId == _salesLine.InventDimId &&
# (!this.splitSite() || _inventDim.InventSiteId == _salesParmTable.InventSiteId)
# {
# subTableUpdated = false;
# tableRefId = _salesParmSubTable.TableRefId;
# if (prevPackingSLipTrans.PackingSlipId != custPackingSlipTrans.PackingSlipId ||
# prevPackingSLipTrans.InventTransId != custPackingSlipTrans.InventTransId)
# {
# if (prevPackingSLipTrans.PackingSlipId)
# {
# updateSalesParmSubTable();
# }
#
# prevSalesLine = _salesLine.data();
# prevPackingSLipTrans = custPackingSlipTrans.data();
# }
# list.addEnd(custPackingSlipTrans);
# }
#
# if (prevPackingSLipTrans.PackingSlipId)
# {
# updateSalesParmSubTable();
# prevSalesLine = null;
# prevPackingSLipTrans = null;
# }
# }
#
# me = salesParmSubTableMap.getEnumerator();
# while (me.moveNext())
# {
# newSalesParmSubTable = me.currentValue();
# recordInsertSalesParmSubTable.add(newSalesParmSubTable);
# }
# this.recordInsertListInsert();
# this.reArrangePost();
# ttscommit;
# }
# else
# {
# if (_orgSalesUpdate == SalesUpdate::PackingSlip)
# {//remove sub table records created by specQty = PackingSlip
# ttsbegin;
# while select forupdate _salesParmSubTable
# order by OrigSalesId
# where _salesParmSubTable.ParmId == salesParmUpdate.ParmId &&
# _salesParmSubTable.JournalRefTableId != 0
# join _salesParmTable
# order by InventSiteId
# where _salesParmTable.TableRefId == _salesParmSubTable.TableRefId
# {
# if (prevSalesId == _salesParmSubTable.OrigSalesId &&
# prevInventSiteId == _salesParmTable.InventSiteId &&
# prevDeliveryAddress == _salesParmTable.DeliveryAddress &&
# prevDeliveryName == _salesParmTable.DeliveryName &&
# prevDlvMode == _salesParmTable.DlvMode)
# {
# _salesParmSubTable.doDelete();
# }
# else
# {
# prevSalesId = _salesParmSubTable.OrigSalesId;
# prevInventSiteId = _salesParmTable.InventSiteId;
# prevDeliveryAddress = _salesParmTable.DeliveryAddress;
# prevDeliveryName = _salesParmTable.DeliveryName;
# prevDlvMode = _salesParmTable.DlvMode;
# _salesParmSubTable.JournalRefRecId = 0;
# _salesParmSubTable.JournalRefTableId = 0;
# _salesParmSubTable.SubId = emptySubId;
# _salesParmSubTable.update();
# }
# }
# ttscommit;
# }
#
# super(_salesUpdate, _creditRemaining);
# }
#}
#
ENDSOURCE
SOURCE #retreiveShippingInfo
#///
#/// Create miscellaneous charge on sales header from tables ShipCarrierPackage, ShipCarrierCODPackage, and ShipCarrierTracking.
#///
#///
#/// Called before invoice has been posted.
#///
#private void retreiveShippingInfo()
#{
# ShipCarrierShippingRequest shippingRequest;
# ShipCarrierPackage package;
# ;
#
# if (!Global::isConfigurationkeyEnabled(configurationkeynum(ShipCarrier)))
# {
# return;
# }
#
# ttsbegin;
# while select forupdate package
# where package.SalesId == salesTable.SalesId &&
# !package.MiscChargeCreated
# exists join shippingRequest
# where shippingRequest.SalesId == package.SalesId &&
# shippingRequest.PackingSlipId == package.PackingSlipId &&
# (!this.parmShipmentId() || this.parmShipmentId() == shippingRequest.wmsShipmentId)
# {
# package.createMiscCharge();
#
# package.MiscChargeCreated = NoYes::Yes;
# package.update();
# }
# ttscommit;
#}
ENDSOURCE
SOURCE #run
#public void run()
#{
# ;
# super();
#
#}
ENDSOURCE
SOURCE #selectFromJournal
#public void selectFromJournal(container _packedTmpFrmVirtualList)
#{
# List tmpFrmVirtualList = List::create(_packedTmpFrmVirtualList);
# ListEnumerator enumerator = tmpFrmVirtualList.getEnumerator();
#
# CustPackingSlipJour custPackingSlipJour;
# CustPackingSlipTrans custPackingSlipTrans;
# InventTrans inventTrans;
# TmpFrmVirtual tmpFrmVirtual;
#
# SalesLine localSalesLine;
# SalesTable localSalesTable;
#
# Map allowPostingMap = new Map(Types::String, Types::Enum);
# Map salesIdLinesMap = new Map(Types::String, Types::Container);
# List packingSlipLinelist = new List(Types::Record);
#
# AccountOrder accountOrder;
#
# Map packingSlipJourLines = new Map(Types::Record,Types::Container);
# Map packingSlipLineSalesLine = new Map(Types::Record, Types::Record);
#
# List list = new List(Types::Record);
#
# ttsbegin;
# SalesParmTable::deleteWithoutUpdate(salesParmUpdate.ParmId);
#
# while (enumerator.moveNext())
# {
# tmpFrmVirtual.data(enumerator.current());
# tmpFrmVirtual.insert();
# }
#
# while select tmpFrmVirtual
# order by Id
# join custPackingSlipJour
# where tmpFrmVirtual.RecordNo == custPackingSlipJour.RecId &&
# tmpFrmVirtual.TableNum == custPackingSlipJour.TableId
# join custPackingSlipTrans
# order by OrigSalesId
# where custPackingSlipJour.SalesId == custPackingSlipTrans.SalesId &&
# custPackingSlipJour.PackingSlipId == custPackingSlipTrans.PackingSlipId &&
# custPackingSlipJour.DeliveryDate == custPackingSlipTrans.DeliveryDate
# join localSalesLine
# where localSalesLine.InventTransId == custPackingSlipTrans.InventTransId
# exists join inventTrans
# where inventTrans.InventTransId == localSalesLine.InventTransId &&
# inventTrans.VoucherPhysical == custPackingSlipJour.LedgerVoucher &&
# inventTrans.StatusIssue != StatusIssue::Sold
# {
# if (!allowPostingMap.exists(custPackingSlipTrans.OrigSalesId))
# {
# localSalesTable = SalesTable::find(custPackingSlipTrans.OrigSalesId);
# allowPostingMap.insert(custPackingSlipTrans.OrigSalesId, this.mayJournalBePosted(localSalesTable));
# }
# if (!allowPostingMap.lookup(custPackingSlipTrans.OrigSalesId))
# continue;
#
# if (packingSlipJourLines.exists(custPackingSlipJour))
# packingSlipLineSalesLine = Map::create(packingSlipJourLines.lookup(custPackingSlipJour));
# else
# packingSlipLineSalesLine = new Map(Types::Record, Types::Record);
#
# packingSlipLineSalesLine.insert(custPackingSlipTrans,localSalesLine);
# packingSlipJourLines.insert(custPackingSlipJour,packingSlipLineSalesLine.pack());
# }
# this.createBasedOnPackingSlip(packingSlipJourLines);
#
# ttscommit;
#
# accountOrder = salesParmUpdate.SumBy;
# salesParmUpdate.SumBy = AccountOrder::None;
# this.reArrange(false);
# this.reArrangeNow(true);
# salesParmUpdate.SumBy = accountOrder;
#}
ENDSOURCE
SOURCE #sendAsXML
#protected void sendAsXML()
#{
# boolean newLine;
#
# if (new PrintJobSettings(printerSettingsFormletter, true).getTarget() != PrintMedium::Screen && !this.proforma())
# {
# newLine = journalList.first(custInvoiceJour);
# while (newLine)
# {
# custInvoiceJour.sendElectronically(XMLDocPurpose::Original, AifSendMode::Async);
# newLine = journalList.next(custInvoiceJour);
# }
# }
#}
ENDSOURCE
SOURCE #setReverseCharge_UK
#///
#/// Checks if reverse charge applies to the current invoice update and if so updates the applicable lines with the reverse charge sales tax group.
#///
#///
#/// If the reverse charge feature is disabled, no additional checks are performed.
#///
#protected void setReverseCharge_UK()
#{
# if (ReverseChargeParameters_UK::find().rcEnabled)
# {
# if ((ReverseCharge_invoice_UK::isSalesLineReverseChargeApplicable(salesTable.SalesId,salesParmTable.ParmId,salesParmTable.TableRefId) ||
# (ReverseChargeParameters_UK::find().rcInvoiceThreshold &&
# ReverseCharge_invoice_UK::reverseChargeSalesTotal(salesTable.SalesId,salesParmTable.ParmId,salesParmTable.TableRefId)>=ReverseChargeParameters_UK::find().rcInvoiceThresholdAmount)) &&
# ReverseCharge_invoice_UK::isSalesDomestic(salesTable) &&
# ReverseCharge_invoice_UK::isReverseChargeApplicableSales(salesTable.SalesId,salesParmTable.ParmId,salesParmTable.TableRefId))
# {
# if (salesTable.vatNum)
# {
# ReverseCharge_invoice_UK::setReverseChargeSalesItemSalesTaxGroup(salesTable.SalesId,salesParmTable.ParmId,salesParmTable.TableRefId);
# }
# else
# {
# warning("@SYS125408");
# }
# }
# }
#}
ENDSOURCE
SOURCE #trackBackorder
#boolean trackBackorder()
#{
# return CustFormletterParameters::find().TrackBackorderInvoice != BackorderTracking::NoTracking;
#}
ENDSOURCE
SOURCE #transactionLogTxt
#TransTxt transactionLogTxt()
#{;
# return "@SYS16103";
#}
ENDSOURCE
SOURCE #transactionLogType
#TransactionLogType transactionLogType()
#{
# return TransactionLogType::SalesInvoice;
#}
ENDSOURCE
SOURCE #unpack
#boolean unpack(container packedClass)
#{
# Integer version = conpeek(packedClass,1);
# NoYes approved;
# EmplId approvedBy;
# NoYes printBillOfExchange;
#
# #LOCALMACRO.ParmList_v25sp2
# parmId,
# salesParmUpdate.proforma,
# salesParmUpdate.specQty,
# backorder,
# salesParmUpdate.creditRemaining,
# queryCriteria,
# editing,
# approved,
# approvedBy,
# printOut,
# printFormletter,
# printCODLabel,
# printFreightSlip,
# printerSettingsFormLetter,
# printerSettingsFreightSlip,
# printerSettingsCODLabel,
# printShippingLabel,
# printerSettingsShippingLabel
# #ENDMACRO
#
# #LOCALMACRO.ParmList_v30
# parmId,
# salesParmUpdate,
# backorder,
# queryCriteria,
# editing,
# printOut,
# printFormletter,
# printCODLabel,
# printFreightSlip,
# printBillOfExchange,
# printerSettingsFormLetter,
# printerSettingsFreightSlip,
# printerSettingsCODLabel,
# printShippingLabel,
# printerSettingsShippingLabel,
# printerSettingsBillOfExchange
# #ENDMACRO
#
# #LOCALMACRO.ParmList_v401
# parmId,
# salesParmUpdate,
# backorder,
# queryCriteria,
# editing,
# printOut,
# printFormletter,
# printCODLabel,
# printFreightSlip,
# printerSettingsFormLetter,
# printerSettingsFreightSlip,
# printerSettingsCODLabel,
# printShippingLabel,
# printerSettingsShippingLabel,
# printerSettingsBillOfExchange,
# printerSettingsFormLetterCopy
# #ENDMACRO
#
# ;
#
# switch (version)
# {
# case #CurrentVersion + #ParentVersion : [version, #ParmList, #ParmListCommonCS] = packedClass;
# break;
#
# case 6 : [version, #ParmList_v401] = packedClass;
# break;
#
# case 5 : [version, #ParmList_v30] = packedClass;
# printerSettingsFormLetterCopy = printerSettingsFormLetter;
# break;
#
# case 2 : [version, #ParmList_v25sp2] = packedClass;
# break;
#
# default :
# return false;
# }
#
# return true;
#}
#
ENDSOURCE
SOURCE #updateCommission
#protected void updateCommission()
#{;
# custInvoiceTrans.updateCommission(ledgerVoucher,
# custInvoiceJour);
#}
ENDSOURCE
SOURCE #updateEstimate
#void updateEstimate()
#{
# ;
# super();
#
# if (salesTable.setEstimate(salesTotals))
# {
# salesTable.doUpdate();
# }
#}
#
ENDSOURCE
SOURCE #updateInventory
#protected void updateInventory(InventMovement _inventMovement)
#{
# InventUpd_Financial inventUpd_Financial;
# SalesParmLine localSalesParmLine;
# SalesQty localUpdateNow;
# InventQty localUpdateNowInvent;
# SalesQty localInvoiceUpdatedOnly;
# List list;
# ListEnumerator le;
# Counter subLines;
# InventQty inventQtyLeft;
# SalesQty salesQtyLeft;
# SalesParmSubLine salesParmSubLine;
#
# void updateInventory()
# {
# ;
# inventUpd_Financial = InventUpd_Financial::newSalesInvoice(_inventMovement,
# ledgerVoucher,
# number,
# localSalesParmLine,
# salesParmSubLine,
# salesParmUpdate.ReduceOnHand);
# inventUpd_Financial.updateNow();
#
# localUpdateNow += -inventUpd_Financial.updFinancialUnit();
# localUpdateNowInvent += -inventUpd_Financial.updFinancial();
# localInvoiceUpdatedOnly += -inventUpd_Financial.updPhysicalUnit();
# }
#
# if (SalesParmSubLine::existSalesParmLine(salesParmLine.RecId))
# {
# list = new List(Types::Record);
# while select salesParmSubLine
# where salesParmSubLine.LineRefRecId == salesParmLine.RecId
# {
# list.addEnd(salesParmSubLine);
# }
#
# subLines = list.elements();
# le = list.getEnumerator();
# salesQtyLeft = salesParmLine.DeliverNow;
# inventQtyLeft = salesParmLine.InventNow;
#
# while (le.moveNext())
# {
# salesParmSubLine = le.current();
# localSalesParmLine = salesParmLine.data();
#
# if (subLines == 1)
# {
# localSalesParmLine.DeliverNow = salesQtyLeft;
# localSalesParmLine.InventNow = inventQtyLeft;
# }
# else
# {
# localSalesParmLine.DeliverNow = salesParmSubLine.DeliverNow;
# localSalesParmLine.InventNow = salesParmSubLine.InventNow;
# }
#
# updateInventory();
# subLines--;
# salesQtyLeft -= salesParmSubLine.DeliverNow;
# inventQtyLeft -= salesParmSubLine.InventNow;
# }
# }
# else
# {
# localSalesParmLine = salesParmLine;
# updateInventory();
# }
#
# updateNow = localUpdateNow;
# updateNowInvent = localUpdateNowInvent;
# invoiceUpdatedOnly = localInvoiceUpdatedOnly;
#}
ENDSOURCE
SOURCE #updateNow
#boolean updateNow()
#{
# InventMovement inventMovement;
# SalesLineType salesLineType;
# TransactionTxt transactionTxt;
# LedgerAccount accountSales;
# LedgerAccount accountDisc;
# InventTable inventTable;
# boolean qtyReduced = false;
# SalesId oldSalesId;
#
# boolean hasMoreSalesParmLine;
# LedgerTransTxt ledgerTransTxt;
#
# boolean onlyOneCashDiscOnInvoice = true;
# LedgerAccount cashDiscAccount;
# LedgerSystemAccounts ledgerSystemAccounts;
# TaxParameters taxParameters;
# LedgerTable postingLedgerTable;
# ;
#
# this.initJournal();
#
# if (this.salesTable().ProjId)
# {
# ledgerTransTxt = creditNote ? LedgerTransTxt::ProjectCreditNoteLedger : LedgerTransTxt::ProjectInvoiceLedger;
# }
# else
# {
# ledgerTransTxt = creditNote ? LedgerTransTxt::SalesCreditNoteLedger : LedgerTransTxt::SalesInvoiceLedger;
# }
#
# transactionTxt = this.initTransactionTxt(ledgerTransTxt);
#
# this.initLedgerVoucher(transactionTxt);
# this.initMarkup();
# this.initRecordListInventReportDimHistory();
#
# salesLine.clear();
# salesParmLine.clear();
#
# taxParameters = TaxParameters::find();
#
# for(hasMoreSalesParmLine = recordListSalesParmLine.first(salesParmLine); hasMoreSalesParmLine; hasMoreSalesParmLine = recordListSalesParmLine.next(salesParmLine))
# {
# if (! this.checkDiscardLine())
# {
# salesLine = this.getSalesLine(salesParmLine, true);
# inventTable = salesLine.inventTable();
#
# setprefix(#PreFixField(salesLine, SalesId));
#
# if (InventParameters::find().UseQualityManagement)
# {
# if (InventQualityOrderTable::openDestructiveTestOrderExists(InventTestReferenceType::Sales, salesLine.SalesId, salesLine.InventTransId))
# throw error("@SYS114216");
# }
#
# // If the tax codes are to be verified, check if sales tax id and Item tax id
# // are defined per line. If the ledger account requires a tax code, and tax code
# // is not provided, the posting will be stopped.
# if (taxParameters.ValidateTaxCode)
# {
# postingLedgerTable = LedgerTable::find(
# InventPosting::accountItem(InventAccountType::SalesRevenue,
# salesLine.ItemId,
# inventTable.ItemGroupId,
# salesLine.CustAccount,
# salesLine.CustGroup,
# salesLine.TaxGroup ));
#
# if (!this.tax().checkNoTax(postingLedgerTable,
# salesLine.TaxGroup,
# salesLine.TaxItemGroup))
# {
# throw error("@SYS21533");
# }
# }
#
# this.checkBeforePosting();
# this.displayProgress();
#
# #LinePrefix(salesLine,salesLine.inventdim().prefixitemdim(inventTable.dimGroupId))
#
# // Create misc charge from charges feed back by 3rd party carrier software
# if (salesLine.SalesId != oldSalesId)
# {
# this.retreiveShippingInfo();
# }
#
# this.createScrapOnInventory(salesLine, salesParmLine);
#
# this.initJournalLine();
# this.initJournalLineLedger();
#
# inventMovement = InventMovement::construct(salesLine);
# this.updateInventory(inventMovement);
#
# if (salesLine.returnJournal())
# {
# salesLine.returnLineUpdate(this.documentStatus());
# }
#
# lineValue = salesLine.calcLineAmountExclTax (updateNow, this.updateDate());
# lineValueInclTax = salesLine.calcLineAmount (updateNow);
# discValue = salesLine.calcLineDiscExclTax (updateNow, this.updateDate());
#
# if (salesParmLine.DeliverNow != updateNow || salesParmLine.InventNow != updateNowInvent)
# {
# salesParmLine = SalesParmLine::findRecId(salesParmLine.RecId, true);
# qtyReduced = true;
# info(strfmt("@SYS26397",updateNow));
# salesParmLine.DeliverNow = updateNow;
# salesParmLine.InventNow = updateNowInvent;
# salesParmLine.setLineAmount(salesLine);
# salesParmLine.update();
# }
#
# this.updateNonPostedParmLines(salesParmLine);
#
# this.calcStatLineAmount();
#
# accountSales = salesLine.accountSales(inventTable);
# accountDisc = salesLine.accountDisc(inventTable);
#
# if (salesLine.SalesPrice && accountDisc)
# {
# ledgerVoucher.addTrans(
# LedgerVoucherTransObject::newCreateTrans(
# ledgerVoucher.findLedgerVoucherObject(),
# salesLine.postingSales(),
# accountSales,
# salesLine.Dimension,
# salesLine.CurrencyCode,
# -(lineValue + discValue),
# this.ledgerRefTableId(),
# 0,//this.ledgerRefRecid(),
# 0,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# false,
# ProjLedger::newInventSales(salesLine.ProjId,
# salesLine.ProjCategoryId,
# salesLine.ActivityNumber,
# salesLine.InventTransId,
# number,
# inventMovement.projAdjustRefId(),
# inventMovement.projTransactionOrigin(),
# inventMovement.projLedgerOrigin(),
# salesLine.ItemId)));
#
# ledgerVoucher.addTrans(
# LedgerVoucherTransObject::newCreateTrans(
# ledgerVoucher.findLedgerVoucherObject(),
# LedgerPostingType::SalesDisc,
# accountDisc,
# salesLine.Dimension,
# salesLine.CurrencyCode,
# discValue,
# this.ledgerRefTableId(),
# this.ledgerRefRecid(),
# 0,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# false,
# ProjLedger::newInventSales(salesLine.ProjId,
# salesLine.ProjCategoryId,
# salesLine.ActivityNumber,
# salesLine.InventTransId,
# number,
# inventMovement.projAdjustRefId(),
# inventMovement.projTransactionOrigin(),
# inventMovement.projLedgerOrigin(),
# salesLine.ItemId)));
# }
# else
# {
# discValue = 0;
#
# ledgerVoucher.addTrans(
# LedgerVoucherTransObject::newCreateTrans(
# ledgerVoucher.findLedgerVoucherObject(),
# salesLine.postingSales(),
# accountSales,
# salesLine.Dimension,
# salesLine.CurrencyCode,
# -lineValue,
# this.ledgerRefTableId(),
# 0,//this.ledgerRefRecid(),
# 0,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# false,
# ProjLedger::newInventSales(salesLine.ProjId,
# salesLine.ProjCategoryId,
# salesLine.ActivityNumber,
# salesLine.InventTransId,
# number,
# inventMovement.projAdjustRefId(),
# inventMovement.projTransactionOrigin(),
# inventMovement.projLedgerOrigin(),
# salesLine.ItemId)));
# }
#
# if (salesTable.CashDiscPercent && onlyOneCashDiscOnInvoice && !salesTable.ProjId && TaxParameters::canApplyCashDiscOnInvoice_ES())
# {
# onlyOneCashDiscOnInvoice = false;
# cashDiscAccount = CashDisc::find(salesTable.CashDisc).AccountPaid;
#
# if (cashDiscAccount)
# {
# ledgerVoucher.addTrans(
# LedgerVoucherTransObject::newCreateTrans(ledgerVoucher.findLedgerVoucherObject(),
# LedgerPostingType::CustCashDisc,
# cashDiscAccount,
# salesLine.Dimension,
# salesLine.CurrencyCode,
# cashDiscAmount,
# this.ledgerRefTableId(),
# this.ledgerRefRecid(),
# 0,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# false,
# ProjLedger::newInventSales(salesLine.ProjId, salesLine.ProjCategoryId,
# salesLine.ActivityNumber,
# salesLine.InventTransId, number,
# inventMovement.projAdjustRefId(),
# inventMovement.projTransactionOrigin(),
# inventMovement.projLedgerOrigin(),
# salesLine.ItemId)));
# }
# else
# {
# ledgerSystemAccounts = LedgerSystemAccounts::find(LedgerPostingType::CustCashDisc);
#
# if (ledgerSystemAccounts.AccountNum)
# {
# ledgerVoucher.addTrans(
# LedgerVoucherTransObject::newCreateTrans(ledgerVoucher.findLedgerVoucherObject(),
# LedgerPostingType::CustCashDisc,
# ledgerSystemAccounts.AccountNum,
# salesLine.Dimension,
# salesLine.CurrencyCode,
# cashDiscAmount,
# this.ledgerRefTableId(),
# this.ledgerRefRecid(),
# 0,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# false,
# ProjLedger::newInventSales(salesLine.ProjId, salesLine.ProjCategoryId,
# salesLine.ActivityNumber,
# salesLine.InventTransId, number,
# inventMovement.projAdjustRefId(),
# inventMovement.projTransactionOrigin(),
# inventMovement.projLedgerOrigin(),
# salesLine.ItemId)));
#
# }
# else
# throw error("@SYS99048");
# }
# }
#
# this.writeJournalLine();
# this.writeProjTrans(inventMovement);
# this.updateCommission();
# this.postMarkupLine();
#
# this.endJournalLineLedger();
#
# if (custInvoiceTrans.Remain)
# foundRemains = NoYes::Yes;
#
# if (salesParmLine.OrigSalesId != oldSalesId)
# {
# if (salesParmTable.SalesId != salesParmLine.OrigSalesId)
# this.updateSumSalesId();
# }
#
# oldSalesId = salesParmLine.OrigSalesId;
#
# #if.never //#speedtest
# if (speedExecute_Sales)
# speedExecute_Sales.timing(SpeedSalesTiming::LineInvoice, salesParmLine.itemId);
# #endif
#
# salesLineType = SalesLineType::construct(salesLine);
# salesLineType.updateSalesLine(inventMovement.transIdSum());
# if (salesTable.InterCompanyCompanyId)
# {
# salesLineType.interCompanyResetDeliverNow();
# if (!salesTable.InterCompanyDirectDeliveryOrig)
# {
# InterCompanyTransferInventDim::doTransfer(salesLine.DataAreaId,
# salesLine.InventTransId,
# salesTable.InterCompanyCompanyId,
# salesLine.InterCompanyInventTransId,
# salesTable.interCompanyEndpointActionPolicy().transferExternal(),
# StatusIssue::Sold,
# number);
# }
# }
# salesLine.doUpdate();
# }
# }
#
# if (! this.checkIfSomethingIsPosted())
# return false;
#
# progress.setText("@SYS25781");
#
# if (qtyReduced)
# {
# salesTotals = SalesTotals::construct(salesParmTable, salesParmUpdate.SpecQty, salesParmUpdate.SumBy, salesParmUpdate.ParmId, salesParmUpdate.SumSalesId, this.documentStatus());
# salesTotals.prepareTotalAmountCalculation();
# salesTotals.prepareQuantitiesCalculation();
# this.tax(salesTotals.tax());
# }
#
# this.writeJournal();
# this.writeRecordListInventReportDimHistory();
# this.updateSalesShippingStat(salesParmTable);
# this.createPaymentSched();
# this.postJournal();
#
# #if.never// #speedtest
# if (speedExecute_Sales)
# speedExecute_Sales.timing(SpeedSalesTiming::InvoiceEnd,'');
# #endif
#
# return true;
#}
#
ENDSOURCE
SOURCE #updateQueryBuild
#void updateQueryBuild()
#{
# QueryBuildDataSource qbds;
# QueryBuildRange qbr;
# str range;
# super();
#
# if (!defaultGiroType
# && !interCompanyParmId)
# {
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, GiroType));
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).rangeField(fieldnum(SalesTable, GiroType)).value(queryValue(this.giroType()));
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).rangeField(fieldnum(SalesTable, GiroType)).status(RangeStatus::Locked);
# }
#
# if (salesParmUpdate.SpecQty == SalesUpdate::PackingSlip)
# {
# qbds = chooseLines.query().dataSourceTable(tablenum(InventTrans));
# if (qbds)
# {
# range = strfmt("(((%1.%2== %4) && (%1.%3== %5)) || ((%1.%2==%6) && (%1.%3==%7)))",
# qbds.name(),
# fieldstr(InventTrans,StatusReceipt),
# fieldstr(InventTrans,StatusIssue),
# queryValue(enum2int(StatusReceipt::Received)),
# queryValue(enum2int(StatusIssue::None)),
# queryValue(enum2int(StatusReceipt::None)),
# queryValue(enum2int(StatusIssue::Deducted)));
#
# qbr = SysQuery::findOrCreateRange(qbds, fieldnum(InventTrans, StatusIssue));
# qbr.value(range);
# qbr.status(RangeStatus::Hidden);
# }
# }
#}
#
ENDSOURCE
SOURCE #updateSalesShippingStat
#void updateSalesShippingStat(SalesParmTable _salesParmTable)
#{
# SalesShippingStat salesShippingStat;
# ;
#
# if (!this.useShippingStat())
# return;
#
# ttsbegin;
#
# delete_from salesShippingStat
# where salesShippingStat.TableRefId == _salesParmTable.TableRefId &&
# salesShippingStat.ParmId == _salesParmTable.ParmId &&
# salesShippingStat.Quantity == 0;
#
# update_recordset salesShippingStat
# setting invoiceId = number,
# invoiceDate = salesParmTable.Transdate,
# parmId = ''
# where salesShippingStat.TableRefId == _salesParmTable.TableRefId &&
# salesShippingStat.ParmId == _salesParmTable.ParmId;
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #updateWMSShipment
#protected void updateWMSShipment()
#{
# WMSShipment wmsShipment;
# ShipCarrierShipmentInvoice shipCarrierShipmentInvoice;
# ;
#
# if (!this.wmsShipment_ds())
# return ;
#
# for (wmsShipment = wmsShipment_ds.getFirst(true) ? wmsShipment_ds.getFirst(true) : wmsShipment_ds.cursor(); wmsShipment; wmsShipment = wmsShipment_ds.getNext())
# {
# if (!ShipCarrierShipmentInvoice::exist(wmsShipment.ShipmentId, custInvoiceJour.RecId))
# {
# shipCarrierShipmentInvoice.clear();
# shipCarrierShipmentInvoice.wmsShipmentId = wmsShipment.ShipmentId;
# shipCarrierShipmentInvoice.CustInvoiceJourRefRecId = custInvoiceJour.RecId;
# shipCarrierShipmentInvoice.insert();
# }
# }
#}
ENDSOURCE
SOURCE #useBillOfLading
#boolean useBillOfLading()
#{
# return ! salesParmUpdate.Proforma && SalesParameters::find().useBillOfLadingOnInvoice();
#}
ENDSOURCE
SOURCE #writeBackorderLines
#protected void writeBackorderLines(SalesLine _salesLine)
#{
# CustInvoiceBackorderLine custInvoiceBackorderLine;
# ;
#
# custInvoiceBackorderLine.clear();
#
# custInvoiceBackorderLine.initValue();
# custInvoiceBackorderLine.initFromSalesLine (_salesLine);
# custInvoiceBackorderLine.initFromCustInvoiceJour(custInvoiceJour);
#
# custInvoiceBackorderLine.insert();
#}
ENDSOURCE
SOURCE #writeCreditInvoicingJour
#protected void writeCreditInvoicingJour(SalesTable _salesTable)
#{
# CustVendCreditInvoicingTable custVendCreditInvoicingTable;
# CustVendCreditInvoicingJour custVendCreditInvoicingJour;
# ;
# if(CustParameters::find().CreditInvoicing)
# {
# if(_salesTable)
# {
# custVendCreditInvoicingTable = CustVendCreditInvoicingTable::findRefId(salesTable.TableId,
# salesTable.RecId,
# true);
# if(custVendCreditInvoicingTable)
# {
# custVendCreditInvoicingJour.insertFromCustVendCreditInvoicingTable(custVendCreditInvoicingTable,
# custInvoiceJour);
# }
# }
# }
#}
ENDSOURCE
SOURCE #writeCreditInvoicingTrans
#protected void writeCreditInvoicingTrans(SalesLine _salesLine)
#{
# CustVendCreditInvoicingLine custVendCreditInvoicingLine;
# CustVendCreditInvoicingTrans custVendCreditInvoicingTrans;
# ;
# if(CustParameters::find().CreditInvoicing)
# {
# if(_salesLine)
# {
# custVendCreditInvoicingLine = CustVendCreditInvoicingLine::findRefId(salesLine.TableId,
# salesLine.RecId,
# true);
# if(custVendCreditInvoicingLine)
# {
# custVendCreditInvoicingTrans.insertFromCustVendCreditInvoicingLine(custVendCreditInvoicingLine,
# custInvoiceTrans);
# }
# }
# }
#}
ENDSOURCE
SOURCE #writeJournal
#protected void writeJournal()
#{
# WMSBillOfLading wmsBillOfLading;
# PaymId paymId;
# PaymMoneyTransferSlip moneyTransferSlip;
#
# ;
#
# if (lineDeliveryName || lineDeliveryAddress)
# {
# custInvoiceJour.DeliveryAddress = lineDeliveryAddress;
# custInvoiceJour.DeliveryName = lineDeliveryName;
# custInvoiceJour.DeliveryStreet = lineDeliveryStreet;
# custInvoiceJour.DlvZipCode = lineDeliveryZipCode;
# custInvoiceJour.DeliveryCity = lineDeliveryCity;
# custInvoiceJour.DlvCounty = lineDeliveryCounty;
# custInvoiceJour.DlvState = lineDeliveryState;
# custInvoiceJour.DlvCountryRegionId = lineDeliveryCountryRegionId;
# }
#
# if (lineDlvMode)
# {
# custInvoiceJour.DlvMode = lineDlvMode;
# }
#
# custInvoiceJour.PrintMgmtSiteId = lineInventSiteId;
#
# if (ReverseChargeParameters_UK::find().rcEnabled)
# {
# custInvoiceJour.initFromSalesTotals(salesTotals, cashDiscAmount, ReverseCharge_invoice_UK::setReverseChargeSalesTotal(salesTable.SalesId, salesParmLine.ParmId, salesParmLine.TableRefId));
# }
# else
# {
# custInvoiceJour.initFromSalesTotals(salesTotals, cashDiscAmount);
# }
#
# custInvoiceJour.Backorder = foundRemains;
#
# custInvoiceJour.calcDue();
# custInvoiceJour.calcCashDiscDate();
# custInvoiceJour.Updated = NoYes::Yes;
#
# if (this.useBillOfLading())
# {
# wmsBillOfLading = WMSBillOfLading::constructFromInvoice(custInvoiceJour, salesParmUpdate);
# custInvoiceJour.BillOfLadingId = wmsBillOfLading.BillOfLadingId;
# }
#
# if (CompanyInfo::find().EnableNorway && numberSeq)
# {
# moneyTransferSlip = PaymMoneyTransferSlip::construct(custInvoiceJour.GiroType);
# moneyTransferSlip.init(custInvoiceJour.GiroType);
#
# moneyTransferSlip.parmNumSeqCode(numberSeq.parmNumberSequenceCode());
#
# paymId = moneyTransferSlip.ocrField( custInvoiceJour.InvoiceAccount, custInvoiceJour.InvoiceId,
# strlen(int2str(NumberSeq::highest(numberSeq.parmNumberSequenceCode()))));
#
# custInvoiceJour.PaymId = strLRTrim(paymId);
# }
#
# if (this.proforma())
# custInvoiceJour.Proforma = NoYes::Yes;
#
# custInvoiceJour.insert();
#
# this.writeCreditInvoicingJour(salesTable);
#
# Docu::copy(salesTable, custInvoiceJour);
#
# journalList.ins(custInvoiceJour);
#
# this.writeTmpTaxWorkTrans(custInvoiceJour.RecId);
#
# this.writeJournalSalesLink();
#
# TradeBLWIFormCodes::initClassFromCust(custInvoiceJour, TradeBLWITypeOfForm::CustInvoiceJour, TradeBLWITypeOfForm::SalesTable);
#}
#
#
ENDSOURCE
SOURCE #writeJournalLine
#protected void writeJournalLine()
#{
# Label label = new Label(custInvoiceJour.LanguageId);
# ;
#
# super();
#
# custInvoiceTrans.Qty = updateNow;
# custInvoiceTrans.InventQty = updateNowInvent;
# custInvoiceTrans.QtyPhysical = invoiceUpdatedOnly;
# custInvoiceTrans.LineAmount = lineValue;
# custInvoiceTrans.LineAmountTax = lineValueInclTax - lineValue;
# custInvoiceTrans.SumLineDisc = discValue;
# custInvoiceTrans.PartDelivery = !(salesLine.SalesStatus == SalesStatus::Invoiced &&
# salesLine.SalesQty == custInvoiceTrans.Qty);
#
# custInvoiceTrans.LineHeader = label.extractString(literalstr("@SYS9694")) + ' ' + salesLine.SalesId + ' '
# + label.extractString(literalstr("@SYS24704")) + ' ' + salesLine.salesTable().CustAccount + ' '
# + (!this.splitDeliveryInformation() ? (label.extractString(literalstr("@SYS7924")) + ' ' + salesLine.DeliveryAddress + ' ') : '')
# + (salesLine.salesTable().PurchOrderFormNum ? (label.extractString(literalstr("@SYS9452")) + ' ' + salesLine.salesTable().PurchOrderFormNum + ' ') : '')
# + custInvoiceTrans.LineHeader;
#
# custInvoiceTrans.LineAmountMST = custInvoiceJour.amountMST(custInvoiceTrans.LineAmount);
# custInvoiceTrans.LineAmountTaxMST = custInvoiceJour.amountMST(custInvoiceTrans.LineAmountTax);
# custInvoiceTrans.SumLineDiscMST = custInvoiceJour.amountMST(custInvoiceTrans.SumLineDisc);
# custInvoiceTrans.StatLineAmountMST = custInvoiceJour.amountMST(statLineValue);
#
# if(!this.proforma())
# {
# this.addToInventReportDimHistory(custInvoiceTrans);
# }
#
# custInvoiceTrans.write();
#
# this.writeCreditInvoicingTrans(salesLine);
#
# if (custInvoiceTrans.Qty != 0)
# {
# InventPackagingMaterialTrans::createFromSalesParmLine(salesParmLine, custInvoiceJour);
# }
# Docu::copy(salesLine, custInvoiceTrans);
#}
#
ENDSOURCE
SOURCE #writeJournalSalesLink
#protected void writeJournalSalesLink()
#{
# SalesParmLine localSalesParmLine;
# CustInvoiceSalesLink custInvoiceSalesLink;
# ;
#
# ttsbegin;
#
# while select localSalesParmLine
# group by OrigSalesId
# where localSalesParmLine.ParmId == salesParmTable.ParmId
# && localSalesParmLine.TableRefId == salesParmTable.TableRefId
# {
# custInvoiceSalesLink.clear();
# custInvoiceSalesLink.initFromSalesParmLine (localSalesParmLine);
# custInvoiceSalesLink.initFromSalesTable (SalesTable::find(localSalesParmLine.OrigSalesId));
# custInvoiceSalesLink.initFromCustInvoiceJour (custInvoiceJour);
# custInvoiceSalesLink.insert();
# }
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #writeProjTrans
#protected void writeProjTrans(InventMov_Sales _inventMovement)
#{
# ;
#}
ENDSOURCE
SOURCE #description
#private static ClassDescription description()
#{
# return "@SYS23177";
#}
ENDSOURCE
ENDMETHODS
ENDCLASS
***Element: CLS
; Microsoft Dynamics AX Class: SalesFormLetter descargados
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #SalesFormLetter
Id 524
PROPERTIES
Name #SalesFormLetter
Extends #FormLetter
RunOn #Called from
ENDPROPERTIES
METHODS
Version: 3
SOURCE #calcAutomaticTotalDiscount
#protected void calcAutomaticTotalDiscount(SalesTable _salesTable)
#{
# ;
# if(CustParameters::find().AutomaticTotalDiscount)
# {
# _salesTable = SalesTable::findRecId(_salesTable.RecId, true);
# _salesTable.updateFinalDisc();
# }
#}
#
ENDSOURCE
SOURCE #calcLine
#protected void calcLine(SalesLine _salesLine,
# SalesParmLine _salesParmLine)
#{;
# _salesLine = this.getSalesLine(_salesParmLine);
# updateNow = _salesParmLine.DeliverNow;
# updateNowInvent = _salesParmLine.InventNow;
# lineValue = _salesLine.calcLineAmountExclTax(updateNow, this.updateDate());
# lineValueInclTax = _salesLine.calcLineAmount(updateNow);
#}
ENDSOURCE
SOURCE #calcShippingStat
#void calcShippingStat(SalesShippingStat _salesShippingStat,
# SalesShippingStat _oldSalesShippingStat)
#{
#}
ENDSOURCE
SOURCE #calcStatLineAmount
#void calcStatLineAmount()
#{
# statLineValue = 0;
#}
ENDSOURCE
SOURCE #canBeCreditnote
#public boolean canBeCreditnote()
#{
# return true;
#}
ENDSOURCE
SOURCE #canSwapBetweenCS
#protected boolean canSwapBetweenCS()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkAOSPrinters
#///
#/// Verifies if selected printers for printing from the SalesFormLetter class hierarchy are AOS configured printers.
#///
#///
#/// true if the selected printers AOS configured printer; otherwise, false.
#///
#protected boolean checkAOSPrinters()
#{
# boolean ret;
# ;
#
# ret = super();
#
# if (printCODLabel)
# {
# if (FormLetter::isAOSPrinter(printerSettingsCODLabel))
# {
# ret = checkFailed(strfmt("@SYS118769"));
# }
# }
#
# if (printFreightSlip)
# {
# if (!FormLetter::isAOSPrinter(printerSettingsFreightSlip))
# {
# ret = checkFailed(strfmt("@SYS118770"));
# }
# }
#
# if (printShippingLabel)
# {
# if (!FormLetter::isAOSPrinter(printerSettingsShippingLabel))
# {
# ret = checkFailed(strfmt("@SYS118771"));
# }
# }
#
# return ret;
#}
#
#
ENDSOURCE
SOURCE #checkAOSPrintersPrintManagement
#///
#/// Verifies if selected printers in print management, for printing original and copy of reports are AOS configured printers.
#///
#///
#/// false.
#///
#protected boolean checkAOSPrintersPrintManagement()
#{
# boolean ret;
# ;
# ret = super();
#
# if (printCODLabel)
# {
# if (FormLetter::isAOSPrinter(printerSettingsCODLabel))
# {
# ret = checkFailed(strfmt("@SYS118769"));
# printerSetupError = true;
# }
# }
#
# if (printFreightSlip)
# {
# if (!FormLetter::isAOSPrinter(printerSettingsFreightSlip))
# {
# ret = checkFailed(strfmt("@SYS118770"));
# printerSetupError = true;
# }
# }
#
# if (printShippingLabel)
# {
# if (!FormLetter::isAOSPrinter(printerSettingsShippingLabel))
# {
# ret = checkFailed(strfmt("@SYS118771"));
# printerSetupError = true;
# }
# }
#
# return ret;
#}
#
#
ENDSOURCE
SOURCE #checkBlockedLevel
#protected boolean checkBlockedLevel()
#{
# boolean ok = true;
# ;
#
# if (!CustTable::canCustomerBeUpdated(salesTable.CustAccount, salesTable.InvoiceAccount, this.documentStatus()))
# ok = checkFailed(strfmt("@SYS7987",salesTable.CustAccount));
#
# return ok;
#}
ENDSOURCE
SOURCE #checkCallerDataSource
#///
#/// Check if the calling data source can be processed in this update.
#///
#///
#/// The tableId of the records in the calling data source.
#///
#///
#/// The data source from the calling form.
#///
#///
#/// true if the check succeeded; otherwise, false.
#///
#boolean checkCallerDataSource(tableId _callingTableId, FormDataSource _recordDataSource)
#{
# return true;
#}
ENDSOURCE
SOURCE #checkCreateParmLine
#protected boolean checkCreateParmLine(SalesLine _salesLine)
#{
# return true;
#}
ENDSOURCE
SOURCE #checkCreateScrapOnInventory
#boolean checkCreateScrapOnInventory()
#{
# return false;
#}
ENDSOURCE
SOURCE #checkCreditMaxInit
#protected TypeOfCreditmaxCheck checkCreditMaxInit()
#{
# return CustParameters::find().CreditMaxCheck;
#}
ENDSOURCE
SOURCE #checkDiscardLine
#protected boolean checkDiscardLine()
#{
# if (salesParmLine.DeliverNow == 0)
# return true;
#
# return false;
#}
ENDSOURCE
SOURCE #checkHeading
#protected boolean checkHeading()
#{
# boolean ok = true;
# ;
#
# if (! salesTable.RecId)
# ok = checkFailed(strfmt("@SYS15067",salesTable.SalesId));
#
# if (! salesTable.CustAccount)
# ok = checkFailed(strfmt("@SYS17565",salesTable.SalesId));
#
# if (! CustTable::exist(salesTable.CustAccount))
# ok = checkFailed(strfmt("@SYS17163",salesTable.CustAccount,salesTable.SalesId));
#
# if (! salesTable.InvoiceAccount)
# ok = checkFailed(strfmt("@SYS17564",salesTable.SalesId));
#
# if (! CustTable::exist(salesTable.InvoiceAccount))
# ok = checkFailed(strfmt("@SYS17704",salesTable.InvoiceAccount,salesTable.SalesId));
#
# if (salesTable.CurrencyCode && ! Currency::exist(salesTable.CurrencyCode))
# ok = checkFailed(strfmt("@SYS20790",salesTable.CurrencyCode,salesTable.SalesId));
#
# if (! salesTable.checkPaymMode())
# ok = checkFailed("@SYS124613");
#
# return ok;
#}
ENDSOURCE
SOURCE #checkIfSalesOrderExist
#protected boolean checkIfSalesOrderExist(SalesTable _salesTable)
#{
# if (! _salesTable)
# return false;
#
# return true;
#}
ENDSOURCE
SOURCE #checkIfSomethingIsPosted
#protected boolean checkIfSomethingIsPosted()
#{
# if (! salesLine)
# return checkFailed("@SYS26185");
#
# return true;
#}
ENDSOURCE
SOURCE #checkifWMSorder
#protected boolean checkifWMSorder()
#{
# return false;
#}
ENDSOURCE
SOURCE #checkInterCompany
#protected boolean checkInterCompany()
#{
# SalesParmTable salesParmTableLocal;
# SalesTable salesTableLocal;
#
# Counter recordCount = 0;
# boolean interCompanyFound = false;
# boolean ok = true;
# ;
#
# if (salesParmUpdate.SumBy == AccountOrder::Order)
# {
# while select salesParmTableLocal
# where salesParmTableLocal.ParmId == salesParmUpdate.ParmId
# join salesTableLocal
# where salesTableLocal.SalesId == salesParmTableLocal.SalesId
# {
# recordCount++;
#
# if (salesTableLocal.InterCompanyOrder)
# {
# interCompanyFound = true;
# }
#
# if (interCompanyFound && recordCount > 1)
# {
# ok = checkFailed(strfmt("@SYS75337", "@SYS57755"));
# break;
# }
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkLateSelection
#protected boolean checkLateSelection()
#{
# boolean ok = true;
# ;
#
# if (salesParmUpdate.LateSelection && !salesParmUpdate.LateSelectionQuery)
# {
# ok = checkFailed(strfmt("@SYS72782"));
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkLines
#protected boolean checkLines()
#{
# SalesParmLine salesParmLineCheck;
# SalesLine salesLineCheck;
# boolean ok = true;
# ;
#
# setprefix(#PreFixField(Salesline, LineNum));
#
# if (! SalesLine::exist(salesTable.SalesId))
# ok = checkFailed(strfmt("@SYS16741"));
#
# salesParmLineCheck.clear();
#
# recordListSalesParmLine.first(salesParmLineCheck);
#
# while (salesParmLineCheck)
# {
# if (! InventTable::exist(salesParmLineCheck.ItemId))
# ok = checkFailed(strfmt("@SYS20812", salesParmLineCheck.ItemId));
#
# salesLineCheck = salesParmLineCheck.salesLine();
#
# if (! this.checkSalesLineChanged(salesParmLineCheck, salesLineCheck))
# ok = false;
#
# if (! recordListSalesParmLine.next(salesParmLineCheck))
# break;
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #checkSales
#protected boolean checkSales()
#{
# boolean ok = true;
# ;
#
# ttsbegin; // In transactions in order to get enforce selection of eg. CustTable
#
# if (!interCompanyParmId)
# {
# if (salesParmUpdate.Proforma && ! printFormletter)
# ok = false;
# }
#
# if (! this.checkHeading() ||
# ! this.checkBlockedLevel() ||
# ! this.checkLines())
# {
# ok = false;
# }
#
#
# setprefix(strfmt("@SYS76767", this.salesTable().SalesId));
#
# if (! this.creditMaxOk(salesTotals))
# {
# if (ok && CustParameters::find().CreditLineError == CreditLineErrorType::Error)
# {
# ok = false;
# }
# }
#
# ttscommit;
#
# return ok;
#}
ENDSOURCE
SOURCE #checkSalesLineChanged
#protected boolean checkSalesLineChanged(SalesParmLine _salesParmLine, SalesLine _salesLine)
#{
# boolean ok = true;
# SalesQty remainBefore;
# InventQty remainBeforeInvent;
# Qty dummy;
# ;
#
# [dummy, remainBefore , dummy] = this.qtySales (_salesLine, naReal());
# [dummy, remainBeforeInvent, dummy] = this.qtyInvent(_salesLine, naReal());
#
# if (remainBefore != _salesParmLine.RemainBefore ||
# remainBeforeInvent != _salesParmLine.RemainBeforeInvent)
# {
# ok = checkFailed(strfmt("@SYS78952", _salesParmLine.OrigSalesId));
# }
# // PBA begin
# ok = ok && _salesLine.PBAItemLine::checkMandatory();
# // PBA end
#
# return ok;
#}
#
ENDSOURCE
SOURCE #checkSalesLinesChanged
#protected boolean checkSalesLinesChanged()
#{
# SalesParmLine salesParmLineLocal;
# SalesLine salesLineLocal;
#
# boolean ok = true;
# ;
# while select forceplaceholders salesParmLineLocal
# where salesParmLineLocal.ParmId == salesParmUpdate.ParmId
# outer join salesLineLocal
# where salesLineLocal.InventTransId == salesParmLineLocal.InventTransId
# {
# if (!this.checkSalesLineChanged(salesParmLineLocal, salesLineLocal))
# ok = false;
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkSalesType
#protected boolean checkSalesType()
#{
# SalesParmTable salesParmTableLocal;
# boolean ok = true;
# boolean first = true;
# SalesType salesType;
#
# if (salesParmUpdate.SumBy != AccountOrder::None)
# {
# while select salesParmTableLocal
# where salesParmTableLocal.ParmId == salesParmUpdate.ParmId
# {
# if (first)
# {
# salesType = salesParmTableLocal.salesTable().SalesType;
# first = false;
# }
# else
# {
# if ((salesType != SalesType::Blanket && salesParmTableLocal.salesTable().SalesType == SalesType::Blanket) ||
# (salesType == SalesType::Blanket && salesParmTableLocal.salesTable().SalesType != SalesType::Blanket))
# {
# ok = checkFailed("@SYS59601");
# break;
# }
# }
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkSumBy
#protected boolean checkSumBy()
#{
# SalesSummary checkSalesSummary = SalesSummary::construct(salesParmUpdate.SumBy, salesParmUpdate.ParmId, salesParmUpdate.SumSalesId, this.documentStatus());
# ;
# return checkSalesSummary.checkUpdateAllowed();
#}
ENDSOURCE
SOURCE #checkSumNum
#protected boolean checkSumNum()
#{
# boolean ok = true;
# ;
#
#
# if (salesParmUpdate.SumBy == AccountOrder::Order)
# {
# if (!SalesParmLine::existSales(parmId, salesParmUpdate.SumSalesId))
# ok = checkFailed(strfmt("@SYS26185", salesParmUpdate.SumSalesId));
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #checkTaxWorkRegulation
#boolean checkTaxWorkRegulation()
#{
# boolean ret = true;
# SalesParmSubTable mySalesParmSubTable;
# SalesTable mySalesTable;
# TaxWorkRegulation myTaxWorkRegulation;
#
#;
# setprefix("@SYS82342");
#
# while select forceplaceholders mySalesTable
# join TableId from mySalesParmSubTable
# where mySalesParmSubTable.ParmId == this.parmId() &&
# mySalesTable.SalesId == mySalesParmSubTable.OrigSalesId
# exists join myTaxWorkRegulation
# where myTaxWorkRegulation.HeadingTableId == mySalesTable.TableId
# && myTaxWorkRegulation.HeadingRecId == mySalesTable.RecId
# {
# ret = false;
# error(strfmt("@SYS82332", mySalesTable.SalesId), '', SysInfoAction_TableField::newBufferField(mySalesTable, fieldnum(SalesTable, SalesId)));
# }
#
# if (!ret)
# info("@SYS82333" + '\n' +
# "@SYS82345");
#
# return ret;
#}
#
ENDSOURCE
SOURCE #chooseLines
#void chooseLines(SalesParmTable _salesParmTable = null, boolean _directDeliveryUpdate = false)
#{
# SalesLine localSalesLine;
# SalesTable localSalesTable;
#
# CustName deliveryName;
# Addressing deliveryAddress;
# CustDlvModeId dlvMode;
#
# Addressing tpAddress;
# ShipCarrierId carrierId;
# ShipCarrierAccount carrierAccount;
#
# boolean mayJournalBePosted = false;
# boolean salesParmLinesExist;
#
# InventSiteId inventSiteId;
# TradeLineRefId tableRefId;
# boolean tableRefIdUsed = true;
#
# SalesParmSubTable salesParmSubTable;
#
# void createParmTable()
# {
# if (this.allowCreateParmTable())
# {
# if (!_salesParmTable.ParmId)
# {
# this.createParmTable(_salesParmTable,
# localSalesTable,
# inventSiteId,
# localSalesTable.SalesName,
# deliveryName,
# deliveryAddress,
# dlvMode,
# carrierId,
# carrierAccount,
# tpAddress);
#
# recordInsertSalesParmTable.add(_salesParmTable);
# salesParmTableMap.insert(this.salesParmTableMapKey(_salesParmTable.SalesId,
# inventSiteId,
# _salesParmTable.DeliveryName,
# _salesParmTable.DeliveryAddress,
# dlvMode,
# carrierId,
# carrierAccount,
# tpAddress),
# _salesParmTable);
#
# salesParmSubTable = SalesParmSubTable::createFromSalesParmTable(_salesParmTable,false);
# recordInsertSalesParmSubTable.add(salesParmSubTable);
#
# tableRefIdUsed = true;
# this.allowCreateParmTable(this.allowEmptyTable());
# }
# }
# }
# ;
#
# this.recordInsertListInit();
#
# ttsbegin;
#
# giroAllSame = true;
#
# this.allowCreateParmTable(this.allowEmptyTable());
#
# salesParmLinesExist = (select firstonly RecId from salesParmLine
# where salesParmLine.ParmId == parmId).RecId != 0;
#
# chooseLines.reset(); // if the select button is used from saleseditlines
#
# while (chooseLines.next())
# {
# progressTotal++;
#
# if (chooseLines.changed(tablenum(SalesTable)))
# {
# localSalesTable = chooseLines.get(tablenum(SalesTable));
# mayJournalBePosted = this.mayJournalBePosted(localSalesTable);
# }
# localSalesLine = chooseLines.get(tablenum(SalesLine));
#
# if (localSalesTable.returnJournal() && localSalesLine.isReturnReservationLine())
# {
# continue;
# }
#
# if (!interCompanyParmId
# && !_directDeliveryUpdate)
# {
# if (! mayJournalBePosted)
# continue;
# }
#
# if (!salesParmLinesExist ||
# !salesParmLineMap.exists(this.salesParmLineMapKey(localSalesLine.SalesId,localSalesLine.InventTransId)))
# {
# inventSiteId = this.site(localSalesLine, localSalesTable);
# deliveryName = this.deliveryName(localSalesLine, localSalesTable);
# deliveryAddress = this.deliveryAddress(localSalesLine, localSalesTable);
# dlvMode = this.dlvMode(localSalesLine, localSalesTable);
# carrierId = this.shipCarrierId(localSalesLine, localSalesTable);
# carrierAccount = this.shipCarrierAccount(localSalesLine, localSalesTable);
# tpAddress = this.tpAddress(localSalesLine, localSalesTable);
#
# if (!_salesParmTable.RecId ||
# _salesParmTable.SalesId != localSalesLine.SalesId ||
# _salesParmTable.InventSiteId != inventSiteId ||
# _salesParmTable.DeliveryName != deliveryName ||
# _salesParmTable.DeliveryAddress!= deliveryAddress ||
# _salesParmTable.DlvMode != dlvMode ||
# _salesParmTable.ShipCarrierId != carrierId ||
# _salesParmTable.ShipCarrierAccount != carrierAccount ||
# _salesParmTable.ShipCarrierAddress != tpAddress )
# {
#
# if (salesParmTableMap.exists(this.salesParmTableMapKey(localSalesTable.SalesId,
# inventSiteId,
# deliveryName,
# deliveryAddress,
# dlvMode,
# carrierId,
# carrierAccount,
# tpAddress
# )))
# {
# _salesParmTable = salesParmTableMap.lookup(this.salesParmTableMapKey(localSalesTable.SalesId,
# inventSiteId,
# deliveryName,
# deliveryAddress,
# dlvMode,
# carrierId,
# carrierAccount,
# tpAddress
# ));
# }
# else
# {
# _salesParmTable.clear();
# }
# }
#
# if (!_salesParmTable.TableRefId)
# {
# _salesParmTable.clear();
# if (tableRefIdUsed)
# {
# tableRefId = FormLetter::getTableRef();
# tableRefIdUsed = false;
# }
# _salesParmTable.TableRefId = tableRefId;
# }
#
# if (this.createParmLine(localSalesLine, _salesParmTable.TableRefId) ||
# this.allowEmptyTable())
# {
# createParmTable();
# }
# }
# }
#
# this.recordInsertListInsert();
# this.updateAllSalesShippingStat();
#
# ttscommit;
#
# salesParmTable = _salesParmTable;
#
# reArrangeNow = true;
#}
#
ENDSOURCE
SOURCE #chooseLinesFromJournalTransList
#void chooseLinesFromJournalTransList()
#{
# SalesLine localSalesLine;
# SalesTable localSalesTable;
# SalesParmTable localSalesParmTable;
#
# CustName deliveryName;
# Addressing deliveryAddress;
# CustDlvModeId dlvMode;
#
# Addressing tpAddress;
# ShipCarrierId carrierId;
# ShipCarrierAccount carrierAccount;
#
# Common common;
# VendPackingSlipTrans vendPackingSlipTrans;
# VendInvoiceTrans vendInvoiceTrans;
# PurchQty purchQty;
# PurchUnit purchUnit;
# InventQty inventQty;
# InventSiteId inventSiteId;
# SalesParmSubTable salesParmSubTable;
#
# void createParmTable()
# {
# if (this.allowCreateParmTable())
# {
# if (!localSalesParmTable.ParmId)
# {
# this.createParmTable(localSalesParmTable,
# localSalesTable,
# inventSiteId,
# localSalesTable.SalesName,
# deliveryName,
# deliveryAddress,
# dlvMode);
#
# recordInsertSalesParmTable.add(localSalesParmTable);
# salesParmTableMap.insert(this.salesParmTableMapKey(localSalesParmTable.SalesId,
# inventSiteId,
# deliveryName,
# deliveryAddress,
# dlvMode,
# carrierId,
# carrierAccount,
# tpAddress),
# localSalesParmTable);
#
# salesParmSubTable = SalesParmSubTable::createFromSalesParmTable(localSalesParmTable,false);
# recordInsertSalesParmSubTable.add(salesParmSubTable);
#
# }
#
# this.allowCreateParmTable(this.allowEmptyTable());
# }
# }
# ;
#
# this.allowEmptyTable(false);
# this.allowCreateParmTable(this.allowEmptyTable());
# salesParmUpdate.SpecQty = SalesUpdate::DeliverNow;
#
# ttsbegin;
#
# switch (fromJournalTransList_TableId)
# {
# case tablenum(VendInvoiceTrans):
# fromJournalTransList.first(vendInvoiceTrans);
# common = vendInvoiceTrans;
# break;
#
# case tablenum(VendPackingSlipTrans):
# fromJournalTransList.first(vendPackingSlipTrans);
# common = vendPackingSlipTrans;
# break;
# }
#
# this.recordInsertListInit();
#
# while (common)
# {
# switch (fromJournalTransList_TableId)
# {
# case tablenum(VendInvoiceTrans):
# vendInvoiceTrans = common;
# localSalesLine = vendInvoiceTrans.purchLine().salesLine();
# purchQty = vendInvoiceTrans.QtyPhysical;
# purchUnit = vendInvoiceTrans.PurchUnit;
# inventQty = vendInvoiceTrans.inventQtyPhysical();
# break;
#
# case tablenum(VendPackingSlipTrans):
# vendPackingSlipTrans = common;
# localSalesLine = vendPackingSlipTrans.purchLine().salesLine();
# purchQty = vendPackingSlipTrans.Qty;
# purchUnit = vendPackingSlipTrans.PurchUnit;
# inventQty = vendPackingSlipTrans.inventQty();
# break;
# }
#
# if (! this.mayJournalTransBePosted(localSalesLine))
# continue;
#
# localSalesTable = localSalesLine.salesTable();
#
# localSalesLine.SalesDeliverNow = UnitConvert::qty(purchQty,
# purchUnit,
# salesLine.SalesUnit,
# salesLine.ItemId);
#
# localSalesLine.InventDeliverNow = inventQty;
#
# if (!salesParmLineMap.exists(this.salesParmLineMapKey(localSalesLine.SalesId,localSalesLine.InventTransId)))
# {
# inventSiteId = this.site(localSalesLine, localSalesTable);
# deliveryName = this.deliveryName(localSalesLine, localSalesTable);
# deliveryAddress = this.deliveryAddress(localSalesLine, localSalesTable);
# dlvMode = this.dlvMode(localSalesLine, localSalesTable);
# carrierId = this.shipCarrierId(localSalesLine, localSalesTable);
# carrierAccount = this.shipCarrierAccount(localSalesLine, localSalesTable);
# tpAddress = this.tpAddress(localSalesLine, localSalesTable);
#
# if (!salesParmTableMap.exists(this.salesParmTableMapKey(localSalesLine.SalesId,
# inventSiteId,
# deliveryName,
# deliveryAddress,
# dlvMode,
# carrierId,
# carrierAccount,
# tpAddress)))
# {
# localSalesParmTable.clear();
# localSalesParmTable.TableRefId = FormLetter::getTableRef();
# }
# else
# {
# localSalesParmTable = salesParmTableMap.lookup(this.salesParmTableMapKey(localSalesLine.SalesId,
# inventSiteId,
# deliveryName,
# deliveryAddress,
# dlvMode));
# }
#
# if (this.createParmLine(localSalesLine, localSalesParmTable.TableRefId)
# || this.allowEmptyTable())
# {
# createParmTable();
# }
# }
#
# if (! fromJournalTransList.next(common))
# break;
# }
# this.recordInsertListInsert();
#
# ttscommit;
#
# salesParmUpdate.SpecQty = SalesUpdate::All;
#}
#
ENDSOURCE
SOURCE #chooseLinesFromSalesLine
#void chooseLinesFromSalesLine(SalesUpdate _specQty)
#{
# SalesLine localSalesLine;
# SalesTable localSalesTable;
# SalesParmTable localSalesParmTable;
#
# CustName deliveryName;
# Addressing deliveryAddress;
# CustDlvModeId dlvMode;
#
# Addressing tpAddress;
# ShipCarrierId carrierId;
# ShipCarrierAccount carrierAccount;
#
# container salesRecordContainer;
# Map mapSalesRecord;
# MapEnumerator mapSalesRecordEnumerator;
# InventSiteId inventSiteId;
# SalesParmSubTable salesParmSubTable;
#
# void createParmTable()
# {
# if (this.allowCreateParmTable())
# {
# if (!localSalesParmTable.ParmId)
# {
# this.createParmTable(localSalesParmTable,
# localSalesTable,
# inventSiteId,
# localSalesTable.SalesName,
# deliveryName,
# deliveryAddress,
# dlvMode);
#
# recordInsertSalesParmTable.add(localSalesParmTable);
# salesParmTableMap.insert(this.salesParmTableMapKey(localSalesParmTable.SalesId,
# inventSiteId,
# deliveryName,
# deliveryAddress,
# dlvMode,
# carrierId,
# carrierAccount,
# tpAddress),
#
# localSalesParmTable);
#
# salesParmSubTable = SalesParmSubTable::createFromSalesParmTable(localSalesParmTable,false);
# recordInsertSalesParmSubTable.add(salesParmSubTable);
# }
#
# this.allowCreateParmTable(this.allowEmptyTable());
# }
# }
# ;
#
# this.allowEmptyTable(false);
# this.allowCreateParmTable(this.allowEmptyTable());
#
# salesParmUpdate.SpecQty = _specQty;
#
# salesRecordContainer = FormLetter::getFormRecord(callerFormDataSource);
# if (salesRecordContainer)
# {
# this.recordInsertListInit();
# ttsbegin;
#
# mapSalesRecord = Map::create(salesRecordContainer);
# mapSalesRecordEnumerator = mapSalesRecord.getEnumerator();
#
# while (mapSalesRecordEnumerator.moveNext())
# {
# localSalesLine = mapSalesRecordEnumerator.currentValue();
# localSalesTable = localSalesLine.salesTable();
#
# if (! this.mayJournalTransBePosted(localSalesLine))
# continue;
#
# if (!salesParmLineMap.exists(this.salesParmLineMapKey(localSalesLine.SalesId,localSalesLine.InventTransId)))
# {
# inventSiteId = this.site(localSalesLine, localSalesTable);
# deliveryName = this.deliveryName(localSalesLine, localSalesTable);
# deliveryAddress = this.deliveryAddress(localSalesLine, localSalesTable);
# dlvMode = this.dlvMode(localSalesLine, localSalesTable);
# carrierId = this.shipCarrierId(localSalesLine, localSalesTable);
# carrierAccount = this.shipCarrierAccount(localSalesLine, localSalesTable);
# tpAddress = this.tpAddress(localSalesLine, localSalesTable);
#
# if (!salesParmTableMap.exists(this.salesParmTableMapKey(localSalesLine.SalesId,
# inventSiteId,
# deliveryName,
# deliveryAddress,
# dlvMode,
# carrierId,
# carrierAccount,
# tpAddress)))
# {
# localSalesParmTable.clear();
# localSalesParmTable.TableRefId = FormLetter::getTableRef();
# }
# else
# {
# localSalesParmTable = salesParmTableMap.lookup(this.salesParmTableMapKey(localSalesLine.SalesId,
# inventSiteId,
# deliveryName,
# deliveryAddress,
# dlvMode,
# carrierId,
# carrierAccount,
# tpAddress
# ));
# }
#
# if (this.createParmLine(localSalesLine, localSalesParmTable.TableRefId)
# || this.allowEmptyTable())
# {
# createParmTable();
# }
# }
# }
# this.recordInsertListInsert();
# ttscommit;
# }
#}
#
ENDSOURCE
SOURCE #chooseLinesFromWMSArrival
#///
#/// Selects SalesLines for update based on entries in the Arrival journal.
#///
#///
#/// This is the base version and should always be over ridden.
#///
#///
#/// Exeption to be thrown if the method is called directly.
#///
#protected void chooseLinesFromWMSArrival()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #chooseLinesFromWMSShipment
#protected void chooseLinesFromWMSShipment()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #chooseLinesFromWMSShipmentSet
#protected void chooseLinesFromWMSShipmentSet()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #chooseLinesPackingslip
#protected void chooseLinesPackingslip()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #classDeclaration
#abstract class SalesFormLetter
#extends FormLetter
#{
# RecordSortedList recordListSalesParmLine;
# RecordSortedList recordListShippingLine;
#
# SalesTotals salesTotals;
# SalesQuantity salesQuantity;
#
# QueryRun salesTableQuery;
#
# boolean ledgerVoucherIsSet;
#
# LedgerVoucher ledgerVoucher;
# SalesCalcTax salesCalcTax;
#
# SalesTable salesTable;
#
# SalesLine salesLine;
# SalesParmUpdate salesParmUpdate;
# SalesParmTable salesParmTable;
# SalesParmLine salesParmLine;
#
# StartDateTime startDateTimeUpdate;
# StartDateTime startDateTimeTable;
#
# Markup markup;
#
# SalesId salesId;
# SalesQty updateNow;
#
# NoYes released;
# NoYes foundRemains;
#
# boolean editLinesChanged;
# NoYes creditNote;
#
# container printerSettingsCODLabel;
# container printerSettingsFreightSlip;
# container printerSettingsShippingLabel;
# container printerSettingsBillOfExchange;
# NoYes printCODLabel;
# NoYes printFreightSlip;
# NoYes printShippingLabel;
#
# FormDataSource salesEditLinesDatasource;
# FormDataSource wmsShipment_ds;
# FormDataSource wmsArrival_ds;
#
# #if.never //#SpeedTest
# SpeedExecute_Sales speedExecute_Sales;
# #endif
# LineNum sumByLineNum;
#
# boolean useShippingStat;
#
# CustAccount sumAccount;
#
# PaymentStub giroType;
# NoYes defaultGiroType;
# CompanyBankAccountId giroAccountId;
# boolean giroAllSame;
#
# tableId fromJournalTransList_TableId;
# RecordSortedList fromJournalTransList;
#
# Factor statLineAmountFactor;
#
# boolean createFromHistory;
#
# SalesPurchCycleAction salesPurchCycleAction;
# boolean interCompanyUnitPriceEqualCostPrice;
#
# boolean lockSalesUpdate;
# boolean enableUpdateNow;
#
# SalesUpdate salesUpdateValue;
# AmountCur cashDiscAmount;
#
# Set postedTableRefIds;
# Set wmsShipmentIdSet;
#
# InventSiteId lineInventSiteId;
#
# RecordInsertList recordInsertSalesParmTable;
# RecordInsertList recordInsertSalesParmSubTable;
# RecordInsertList recordInsertSalesParmLine;
# Map salesParmTableMap;
# Map salesParmLineMap;
# systemSequence systemSequence;
#
# //shipping module
# Addressing lineTPAddress;
# ShipCarrierId lineCarrierId;
# ShipCarrierAccount lineCarrierAccount;
# WMSShipmentId shipmentId;
# boolean skipPrompt;
#
# //List of parameters common for SalesFormLetter_* classes that needs to be packed
# //for the correct class transition between client and server.
# //If you need some additional parameters on the client, add them to this list.
# //All variables in the parmListCommonCS must also be added to the method resetParmListCommonCS.
# //After any changes, both versions must be increased.
# #define.ParentVersion(1)
# #define.CurrentVersion(1)
# #LOCALMACRO.ParmListCommonCS
# salesTable,
# editLinesChanged,
# reArrangeNow,
# initAllowEmptyTable,
# allowEmptyTable,
# enableUpdateNow,
# lockSalesUpdate,
# createFromLines,
# createFromHistory,
# showQueryForm,
# multiForm,
# transDate,
# giroType,
# defaultGiroType
# #ENDMACRO
#
# //List of parameters extracted from arguments for the transfer from main() to mainOnServer()
# #LOCALMACRO.CachedArgsList
# parmEnum,
# callerFormName,
# isProforma,
# formHasInterCompanyRefreshCacheMethod,
# parmSkipPrompt
# #ENDMACRO
#}
#
#
ENDSOURCE
SOURCE #cleanupDialog
#protected void cleanupDialog()
#{;
# SalesParmUpdate::deleteWithoutUpdate(salesParmUpdate.ParmId);
#}
#
ENDSOURCE
SOURCE #createBackorderLines
#protected void createBackorderLines()
#{
# SalesLine localSalesLine;
# ;
# if (!this.trackBackorder())
# return;
#
# ttsbegin;
#
# while select localSalesLine
# where localSalesLine.SalesId == salesTable.SalesId
# && localSalesLine.SalesStatus == SalesStatus::Backorder
# && localSalesLine.RemainInventPhysical != 0
# && (localSalesLine.SalesType != SalesType::Subscription || // Only create backorders for subscriptions
# localSalesLine.RemainInventPhysical != localSalesLine.QtyOrdered) // if the remaining quantity is different from the ordered quantity
# && (this.splitDeliveryInformation() == NoYes::No || // Only check the address if there is a split per address
# (localSalesLine.DeliveryAddress == salesParmTable.DeliveryAddress &&
# localSalesLine.DeliveryName == salesParmTable.DeliveryName &&
# localSalesLine.DlvMode == salesParmTable.DlvMode))
# {
# if (this.splitSite()) // if split on site
# {
# if (localSalesLine.inventDim().InventSiteId == salesParmTable.InventSiteId) // check for same site
# {
# this.writeBackorderLines(localSalesLine);
# }
# }
# else
# {
# this.writeBackorderLines(localSalesLine);
# }
# }
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #createFromHistory
#boolean createFromHistory(boolean _createFromHistory = createFromHistory)
#{;
# createFromHistory = _createFromHistory;
# return createFromHistory;
#}
#
ENDSOURCE
SOURCE #createJournal
#///
#/// Posts a sales order into journals.
#///
#public void createJournal()
#{;
# startDateTimeTable = DateTimeUtil::newDateTime(systemdateget(),timenow(),DateTimeUtil::getUserPreferredTimeZone());
#
# progress.setText("@SYS8311");
# salesTotals = SalesTotals::construct(salesParmTable, salesParmUpdate.SpecQty, salesParmUpdate.SumBy, salesParmUpdate.ParmId, salesParmUpdate.SumSalesId, this.documentStatus());
# this.initFromSalesTotals(salesTotals);
#
# sumByLineNum = 1;
#
# #if.never //#Speedtest
# if (speedExecute_Sales)
# speedExecute_Sales.timing(SpeedSalesTiming::Totals,salesTable.salesId);
# #endif
#
# if (! this.checkSales())
# throw error(strfmt("@SYS26498", salesParmTable.SalesId));
#
# if (salesParmUpdate.Proforma)
# this.insertProforma();
# else
# this.insertJournal();
#
# if (printout == Printout::Current && ! salesParmUpdate.Proforma)
# this.printJournal();
#}
#
ENDSOURCE
SOURCE #createParmLine
#protected boolean createParmLine(SalesLine _salesLineOrig,
# TradeLineRefId _tableRef = '')
#{
# PurchParmLine purchParmLine;
# SalesParmLine localSalesParmLine;
# boolean lineCreated = false;
#
#
# ;
# if (_salesLineOrig.RecId && this.checkCreateParmLine(_salesLineOrig))
# {
# this.interCompanyUpdateSalesPrice(_salesLineOrig);
#
# localSalesParmLine.clear();
#
# if (interCompanyParmId
# && !this.interCompanyParmSelectFromJournal())
# {
# localSalesParmLine.Closed = this.interCompanyParmLineClosed(_salesLineOrig);
# [localSalesParmLine.DeliverNow, localSalesParmLine.RemainBefore , localSalesParmLine.RemainAfter] = this.qtySales (_salesLineOrig, this.interCompanyParmLineQty(_salesLineOrig));
# [localSalesParmLine.InventNow , localSalesParmLine.RemainBeforeInvent, localSalesParmLine.RemainAfterInvent] = this.qtyInvent (_salesLineOrig, this.interCompanyParmLineQty(_salesLineOrig, true));
# salesLine.SalesDeliverNow = localSalesParmLine.DeliverNow;
# salesLine.setInventDeliverNow();
# if (localSalesParmLine.Closed)
# {
# localSalesParmLine.RemainAfter = 0;
# localSalesParmLine.setRemainAfterInvent();
# }
# }
# else
# {
# [localSalesParmLine.DeliverNow, localSalesParmLine.RemainBefore , localSalesParmLine.RemainAfter ] = this.qtySales (_salesLineOrig, naReal());
# [localSalesParmLine.InventNow , localSalesParmLine.RemainBeforeInvent, localSalesParmLine.RemainAfterInvent] = this.qtyInvent (_salesLineOrig, naReal());
#
# if ((_salesLineOrig.DeliveryType == TradeLineDlvType::DropShip) && parmIdSynched)
# {
# purchParmLine = PurchParmLine::findInventTransId(parmIdSynched,_salesLineOrig.InventRefTransId);
#
# if (purchParmLine.Closed)
# {
# localSalesParmLine.Closed = purchParmLine.Closed;
# localSalesParmLine.RemainAfter = 0;
# localSalesParmLine.setRemainAfterInvent();
# }
#
# }
# }
#
# if (localSalesParmLine.DeliverNow || (localSalesParmLine.RemainBefore && backorder))
# {
# localSalesParmLine.ParmId = salesParmUpdate.ParmId;
# localSalesParmLine.initFromSalesLine(_salesLineOrig);
# localSalesParmLine.setLineAmount(_salesLineOrig);
# localSalesParmLine.calcPackingUnitQty();
# localSalesParmLine.TableRefId = _tableRef;
#
#//RecId is needed if salesParmSubLines is going to be created.
# localSalesParmLine.RecId = systemSequence.reserveValues(1,tablenum(SalesParmLine));
#
# salesParmLineMap.insert(this.salesParmLineMapKey(localSalesParmLine.OrigSalesId,localSalesParmLine.InventTransId),localSalesParmLine);
# recordInsertSalesParmLine.add(localSalesParmLine);
#
# lineCreated = true;
#
# this.allowCreateParmTable(true);
#
# #if.never //#Speedtest
# if (speedExecute_Sales)
# speedExecute_Sales.timing(SpeedSalesTiming::ParmLineInsert, strfmt(salesParmLine.parmId, salesParmLine.itemId));
# #endif
# }
# }
#
# return lineCreated;
#}
#
ENDSOURCE
SOURCE #createParmLineFromWMSArrivalTrans
#///
#/// Selects SalesLines for update based on entries in the Arrival journal.
#///
#///
#/// A SalesLine tablebuffer.
#///
#///
#/// An InventQty Extended data type.
#///
#///
#/// A TradeLineRefId Extended data type.
#///
#///
#/// Returns nothing as this is just a base method meant to be overridden.
#///
#///
#/// This is the base version and should always be over ridden.
#///
#///
#/// Exeption to be thrown if the method is called directly.
#///
#protected boolean createParmLineFromWMSArrivalTrans(SalesLine _salesLine,
# InventQty _qtyReceived,
# TradeLineRefId _tableRef)
#{
# throw error(Error::missingOverload(funcname()));
#}
#
ENDSOURCE
SOURCE #createParmLineFromWMSOrderTrans
#protected boolean createParmLineFromWMSOrderTrans(SalesLine _salesLine,
# InventQty _qtyReceived,
# TradeLineRefId _tableRef)
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #createParmTable
#void createParmTable(SalesParmTable _salesParmTable,
# SalesTable _salesTable,
# InventSiteId _inventSiteId = _salesTable.InventSiteId,
# Name _salesName = _salesTable.SalesName,
# CustName _deliveryName = _salesTable.DeliveryName,
# Addressing _deliveryAddress = _salesTable.DeliveryAddress,
# CustDlvModeId _dlvMode = _salesTable.DlvMode,
# ShipCarrierId _carrierId = _salesTable.ShipCarrierId,
# ShipCarrierAccount _carrierAccount = _salesTable.ShipCarrierAccount,
# Addressing _tpAddress = _salesTable.tpAddress()
# )
#{;
# this.calcAutomaticTotalDiscount(_salesTable);
# _salesParmTable.initFromSalesTable(_salesTable);
#
# _salesParmTable.InventSiteId = _inventSiteId;
# _salesParmTable.SalesName = _salesName;
# _salesParmTable.DeliveryName = _deliveryName;
# _salesParmTable.DeliveryAddress = _deliveryAddress;
# _salesParmTable.DlvMode = _dlvMode;
# _salesParmTable.Transdate = this.transDate();
# _salesParmTable.ParmId = salesParmUpdate.ParmId;
# _salesParmTable.Ordering = this.documentStatus();
# _salesParmTable.BatchAdministration = multiForm;
# _salesParmTable.ParmJobStatus = ParmJobStatus::Waiting;
# _salesParmTable.CustBankAccountId = this.custBankAccountId(_salesTable);
# _salesParmTable.ShipCarrierId = _carrierId;
# _salesParmTable.ShipCarrierAccount = _carrierAccount;
# _salesParmTable.ShipCarrierAddress = _tpAddress;
#
# if (_salesTable.GiroType != giroType)
# giroAllSame = false;
#}
#
ENDSOURCE
SOURCE #createParmUpdate
#void createParmUpdate(boolean _allowRecommendedSpecQty = true)
#{;
# salesParmUpdate.ParmId = this.parmId();
# salesParmUpdate.DocumentStatus = this.documentStatus();
# salesParmUpdate.CheckCreditMax = this.checkCreditMaxInit();
# salesParmUpdate.Storno = CustParameters::find().CreditError;
# salesParmUpdate.LateSelection = NoYes::No;
# salesParmUpdate.LateSelectionQuery = connull();
# salesParmUpdate.SumBy = this.sumByInit();
# salesParmUpdate.SplitSite = this.getSplitSite();
# salesParmUpdate.SplitDeliveryInformation = this.getSplitDeliveryInformation();
#
# if (salesParmUpdate.inventSiteActive())
# {
# salesParmUpdate.SplitSite = this.getSplitSite();
# }
# else
# {
# salesParmUpdate.SplitSite = false;
# }
#
# salesParmUpdate.bolPackageAppearance = '';
# salesParmUpdate.initFromSalesParameters();
# salesParmUpdate.ReduceOnHand = this.reduceOnHand();
# salesParmUpdate.CreditRemaining = this.creditRemaining();
#
# if (salesParmUpdate.ReduceOnHand && salesParmUpdate.DocumentStatus == DocumentStatus::PickingList)
# {
# salesParmUpdate.Reserve = true;
# }
#
# if (this.lockSalesUpdateField())
# {
# salesParmUpdate.SpecQty = this.setParmSalesUpdate();
# }
# else if (!salesParmUpdate.RecId && _allowRecommendedSpecQty)
# {
# salesParmUpdate.SpecQty = this.setParmSalesUpdate(this.recommendedSpecQty());
# }
#
# // When called from the batch dialog the record already exists
# if (! SalesParmUpdate::exist(salesParmUpdate.ParmId))
# {
# salesParmUpdate.insert();
# }
#
#}
#
ENDSOURCE
SOURCE #createParmUpdateFromParmUpdateRecord
#void createParmUpdateFromParmUpdateRecord(SalesParmUpdate _salesParmUpdate)
#{
# ;
#
# salesParmUpdate.data(_salesParmUpdate);
# salesParmUpdate.ParmId = this.parmId();
#
# if (! SalesParmUpdate::exist(salesParmUpdate.ParmId))
# salesParmUpdate.insert();
#}
ENDSOURCE
SOURCE #createPayment
#protected void createPayment()
#{
#}
ENDSOURCE
SOURCE #createSalesShippingStat
#void createSalesShippingStat(SalesParmSubTable _salesParmSubTable)
#{
# SalesShippingStat localSalesShippingStat;
# SalesTotals shippingSalesTotals;
#
# if (this.useShippingStat())
# {
# SalesShippingStat::deleteFromSalesParmSubTable(_salesParmSubTable);
#
# shippingSalesTotals = SalesTotals::construct(_salesParmSubTable, salesParmUpdate.SpecQty, AccountOrder::None, salesParmUpdate.ParmId, '', this.documentStatus());
# shippingSalesTotals.prepareRemainQuantitiesCalculation();
#
# localSalesShippingStat.clear();
# localSalesShippingStat.initFromSalesParmSubTable(_salesParmSubTable);
# localSalesShippingStat.initFromSalesTotals(shippingSalesTotals);
# localSalesShippingStat.initFromSalesTable(_salesParmSubTable.salesTable());
# localSalesShippingStat.insert();
# }
#}
#
#
ENDSOURCE
SOURCE #createScrapOnInventory
#void createScrapOnInventory(SalesLine _salesLine,
# SalesParmLine _salesParmLine)
#{
# InventUpd_Estimated estimated;
#
# if (!_salesLine.Scrap)
# return;
#
# if (!this.checkCreateScrapOnInventory())
# return;
#
# estimated = InventUpd_Estimated::newInventMovement(InventMovement::construct(_salesLine));
# estimated.parmTransEstimated(-_salesParmLine.InventNow);
# estimated.parmEstimated(-_salesParmLine.InventNow);
# estimated.updateNow();
#}
ENDSOURCE
SOURCE #creditCardDoCaptureOrPostAuthorize
#boolean creditCardDoCaptureOrPostAuthorize()
#{
# ;
#
# //do nothing if credit card module is not turned on
# if (!Global::isConfigurationkeyEnabled(configurationkeynum(CreditCard)))
# {
# return true;
# }
#
# //do nothing if payent method is not credit card
# if (!(salesTable.CreditCardCustRefId && salesTable.payment().CreditCardPaymentType == CreditCardPaymentType::CreditCard ))
# {
# return true;
# }
#
# if (!CreditCardProcess::doCapture(salesTable, salesTotals))
# {
# if (this.isInBatch())
# {
# info(strfmt("@SYS116944", //"Credit card capture failed for S/O %1. Invoice posting will skip this order."
# salesTable.SalesId));
# return false;
# }
# else
# {
# throw error("@SYS116946"); //"Credit card capture failed."
# }
# }
#
# return true;
#}
ENDSOURCE
SOURCE #creditCardDoPreAuthorize
#boolean creditCardDoPreAuthorize()
#{
# ;
#
# //do credit card pre-authorization when needed
# if (Global::isConfigurationkeyEnabled(configurationkeynum(CreditCard)) &&
# CustParameters::find().CreditCardPreAuthorization &&
# salesTable.CreditCardCustRefId &&
# salesTable.payment().CreditCardPaymentType == CreditCardPaymentType::CreditCard
# )
# {
# this.progressUpdate("@SYS116969"); //"Processing pre-authorization ..."
# return CreditCardProcess::doPreAuth(salesTable,false);
# }
#
# return true;
#}
ENDSOURCE
SOURCE #creditMaxOk
#protected boolean creditMaxOk(SalesTotals _salesTotals)
#{
# CustCreditLimit custCreditLimit;
# boolean ret = true;
# ;
#
# if (this.mustCheckCreditLimit())
# {
# custCreditLimit = CustCreditLimit::construct(salesParmTable, _salesTotals);
# ret = custCreditLimit.check();
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #creditRemaining
#boolean creditRemaining(boolean _creditRemaining = salesParmUpdate.CreditRemaining)
#{;
# salesParmUpdate.CreditRemaining = _creditRemaining;
# return salesParmUpdate.CreditRemaining;
#}
ENDSOURCE
SOURCE #custAccountInQuery
#boolean custAccountInQuery()
#{
# return true;
#}
ENDSOURCE
SOURCE #custBankAccountId
#CustBankAccountId custBankAccountId(SalesTable _salesTable)
#{
# return '';
#}
ENDSOURCE
SOURCE #defaultGiroType
#NoYes defaultGiroType(NoYes _defaultGiroType = defaultGiroType)
#{
# defaultGiroType = _defaultGiroType;
#
# return defaultGiroType;
#}
ENDSOURCE
SOURCE #deleteGiro
#void deleteGiro()
#{
# SalesParmTable _salesParmTable;
# ;
#
# ttsbegin;
#
# while select forupdate _salesParmTable
# where _salesParmTable.ParmId == salesParmUpdate.ParmId
# {
# if (_salesParmTable.salesTable().GiroType != this.giroType() && (!this.defaultGiroType()))
# {
# SalesParmLine::deleteFromSalesParmTable(_salesParmTable);
#
# if (this.useShippingStat())
# SalesShippingStat::deleteFromSalesParmTable(_salesParmTable);
#
# _salesParmTable.delete();
# }
# }
#
# ttscommit;
#
# this.updateQueryBuild();
#}
#
ENDSOURCE
SOURCE #deleteGiroAndInitQuery
#///
#/// Executes methods deleteGiro() and initLinesQuery() on the server side to reduce the interaction between tiers.
#///
#///
#/// SalesEditLines form executes deleteGiro() and initLinesQuery() methods on SalesParmUpdate.GiroType field change. To minimize calls between tiers, this action is moved to the server side via this proxy method.
#/// The method calls for the server static function deleteGiroAndInitQueryOnServer to execute given methods using server instance of the SalesFormLetter class.
#///
#void deleteGiroAndInitQuery()
#{
# container packedClass;
# ;
#
# packedClass = SalesFormLetter::execDeleteGiroAndInitQueryOnServer(this.documentStatus(), this.parmId(), this.pack());
#
# this.unpack(packedClass);
#}
ENDSOURCE
SOURCE #deliveryAddress
#Addressing deliveryAddress(SalesLine _salesLine,
# SalesTable _salesTable = _salesLine.salesTable())
#{;
# return this.splitDeliveryInformation() ? _salesLine.DeliveryAddress
# : _salesTable.DeliveryAddress;
#}
ENDSOURCE
SOURCE #deliveryName
#CustName deliveryName(SalesLine _salesLine,
# SalesTable _salesTable = _salesLine.salesTable())
#{;
# return this.splitDeliveryInformation() ? _salesLine.DeliveryName
# : _salesTable.DeliveryName;
#}
ENDSOURCE
SOURCE #dialog
#Object dialog()
#{
# FormRun salesEditLines;
# ;
#
# salesEditLines = classfactory.formRunClass(FormLetter::newClientArgs(formstr(SalesEditLines), this));
#
# salesEditLines.init();
#
# if (showDialog)
# return salesEditLines;
#
# return null;
#}
ENDSOURCE
SOURCE #displayProgress
#protected void displayProgress()
#{
# this.progressUpdate(strfmt("@SYS26810", salesTable.SalesId, salesLine.ItemId));
#}
ENDSOURCE
SOURCE #dlvMode
#CustDlvModeId dlvMode(SalesLine _salesLine,
# SalesTable _salesTable = _salesLine.salesTable())
#{;
# return this.splitDeliveryInformation() ? _salesLine.DlvMode
# : _salesTable.DlvMode;
#}
ENDSOURCE
SOURCE #editLinesChanged
#boolean editLinesChanged(boolean _editLinesChanged = editLinesChanged)
#{;
# editLinesChanged = _editLinesChanged;
#
# return editLinesChanged;
#}
ENDSOURCE
SOURCE #enableUpdateNowField
#public boolean enableUpdateNowField(boolean _enableUpdateNow = enableUpdateNow)
#{
# ;
# enableUpdateNow = _enableUpdateNow;
#
# return enableUpdateNow;
#}
#
ENDSOURCE
SOURCE #endUpdate
#void endUpdate()
#{
# ;
# if (salesParmUpdate.Proforma)
# {
# ttsbegin;
# salesParmUpdate = SalesParmUpdate::find(salesParmUpdate.ParmId, true);
# salesParmUpdate.delete();
# ttscommit;
# }
#
# if (SalesParmUpdate::exist(this.parmId()))
# {
# ttsbegin;
#
# salesParmUpdate = SalesParmUpdate::find(this.parmId(), true);
#
# salesParmUpdate.StartDateTime = startDateTimeUpdate;
# salesParmUpdate.EndDateTime = DateTimeUtil::newDateTime(systemdateget(),timenow(),DateTimeUtil::getUserPreferredTimeZone());
# salesParmUpdate.update();
#
# ttscommit;
# }
#}
#
ENDSOURCE
SOURCE #fixedEuroTriangulation
#protected UnknownNoYes fixedEuroTriangulation()
#{
# return(salesTable.fixedEuroTriangulation());
#}
#
ENDSOURCE
SOURCE #fixedExchRate
#protected CustExchRate fixedExchRate()
#{
# return(salesTable.fixedExchRate(true));
#}
#
ENDSOURCE
SOURCE #fixedExchRateSecondary
#protected ExchrateSecondary fixedExchRateSecondary()
#{
# return (salesTable.fixedExchRateSecondary());
#}
#
ENDSOURCE
SOURCE #fromJournalTransList
#RecordSortedList fromJournalTransList(RecordSortedList _fromJournalTransList = fromJournalTransList)
#{
# fromJournalTransList = _fromJournalTransList;
# return fromJournalTransList;
#}
#
ENDSOURCE
SOURCE #fromJournalTransList_TableId
#tableId fromJournalTransList_TableId(tableId _fromJournalTransList_TableId = fromJournalTransList_TableId)
#{
# ;
# fromJournalTransList_TableId = _fromJournalTransList_TableId;
# return fromJournalTransList_TableId;
#}
#
ENDSOURCE
SOURCE #getNumAndVoucher
#container getNumAndVoucher()
#{
# return numberSeq.numAndVoucher();
#}
ENDSOURCE
SOURCE #getSalesLine
#protected SalesLine getSalesLine(SalesParmLine _salesParmLine,
# boolean _forUpdate = false)
#{
# SalesLine _salesLine;
# ;
#
# _salesLine.selectForUpdate(_forUpdate);
#
# select firstonly _salesLine
# where _salesLine.RecId == _salesParmLine.SalesLineRecId;
#
# if (! SalesTable::exist(_salesLine.SalesId))
# throw error("@SYS16740");
#
# return _salesLine;
#}
ENDSOURCE
SOURCE #getSplitSite
#TradeSplitSite getSplitSite()
#{
# return false;
#}
#
ENDSOURCE
SOURCE #giro
#protected boolean giro()
#{
# return false;
#}
ENDSOURCE
SOURCE #giroType
#PaymentStub giroType(PaymentStub _giroType = giroType)
#{
# giroType = _giroType;
#
# return giroType;
#}
ENDSOURCE
SOURCE #initFromSalesTotals
#///
#///Performs initialization based on SalesTotals object passed as argument
#///
#///
#/// The salesTotals that should be used for initialization.
#///
#protected void initFromSalesTotals(SalesTotals _salesTotals)
#{
# _salesTotals.prepareTotalAmountCalculation();
# _salesTotals.prepareQuantitiesCalculation();
# this.tax(_salesTotals.tax());
#
# recordListSalesParmLine = _salesTotals.recordSortedListLine();
#
# if (this.canBeCreditnote())
# {
# if (TaxParameters::find().CashDiscOnInvoice)
# {
# cashDiscAmount = salesTotals.cashDiscAmount();
#
# if (salesTotals.totalAmountCashDiscOnInvoice(true) < 0)
# creditNote = NoYes::Yes;
# else
# creditNote = NoYes::No;
# }
# else
# {
# if (salesTotals.totalAmount() < 0)
# creditNote = NoYes::Yes;
# else
# creditNote = NoYes::No;
# }
# }
# else
# {
# creditNote = NoYes::No;
# }
#}
ENDSOURCE
SOURCE #initLedgerVoucher
#protected void initLedgerVoucher(TransactionTxt _transactionTxt)
#{
# LedgerVoucherObject ledgerVoucherObject;
# ;
#
# if (! ledgerVoucherIsSet)
# {
#
# //If the payment term option to post offsetting a/r entries is selected
# //then make sure this transaction posts in detail so records are present
# //in the LedgerTrans table even if the offsetting entries cancel out.
# //This is an Italian legal requirement for their fiscal journal (GFR 11110)
# if (PaymTerm::find(salesTable.Payment, false).PostOffsettingAR == NoYes::Yes)
# {
# ledgerVoucher = LedgerVoucher::newLedgerPost(DetailSummary::Detail,
# SysModule::Sales,
# numberSeq.parmVoucherSequenceCode());
# }
# else
# {
# ledgerVoucher = LedgerVoucher::newLedgerPost(DetailSummary::Summary,
# SysModule::Sales,
# numberSeq.parmVoucherSequenceCode());
# }
#
# ledgerVoucherObject = LedgerVoucherObject::newVoucher(voucher,
# this.updateDate(),
# SysModule::Sales,
# LedgerTransType::Sales,
# (creditNote ? salesParmUpdate.Storno : NoYes::No));
#
# ledgerVoucherObject.parmDocument(
# salesParmTable.DocumentDate ? salesParmTable.DocumentDate : salesParmTable.Transdate,
# number);
# if (this.tax())
# {
# ledgerVoucherObject.parmTaxReference(this.tax().taxReference());
# }
# ledgerVoucher.addVoucher(ledgerVoucherObject);
# }
#
# ledgerVoucher.findLedgerVoucherObject(voucher).lastTransTxt(_transactionTxt.txt());
#}
ENDSOURCE
SOURCE #initLinesQuery
#void initLinesQuery()
#{
# container packedClass;
# container packedChooseLines;
# ;
#
# //If running on the client, execute initLinesQuery method on the server side to reduce the interaction between tiers
# if (!this.objectOnServer())
# {
# if (chooseLines)
# packedChooseLines = chooseLines.pack();
# else
# packedChooseLines = connull();
#
# [packedClass, packedChooseLines] = SalesFormLetter::execInitLinesQueryOnServer(this.documentStatus(),
# this.parmId(),
# this.pack(),
# packedChooseLines);
# this.unpack(packedClass);
# this.chooseLinesQuery(new SysQueryRun(packedChooseLines));
# return;
# }
#
#
# this.updateQueryBuild();
#
# if (!this.promptChooseLines())
# {
# continue;
# }
# else
# {
# SalesParmTable::deleteWithoutUpdate(parmId);
#
# if (wmsShipment_ds)
# {
# this.chooseLinesFromWMSShipment();
# }
# else
# if (wmsShipmentIdSet)
# {
# this.chooseLinesFromWMSShipmentSet();
# }
# else
# if (wmsArrival_ds)
# {
# this.chooseLinesFromWMSArrival();
# }
# else
# {
# if (this.createFromLines())
# {
# if (this.fromJournalTransList())
# this.chooseLinesFromJournalTransList();
#
# else if (salesParmUpdate)
# this.chooseLinesFromSalesLine(salesParmUpdate.SpecQty);
#
# else
# this.chooseLinesFromSalesLine(SalesUpdate::All);
# }
# else
# {
# if (!salesParmUpdate.LateSelection)
# this.chooseLines();
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #initMarkup
#protected void initMarkup()
#{;
# markup = new Markup(salesTable.CurrencyCode);
# markup.setTax(this.tax());
# markup.parmExchRate(this.fixedExchRate(), this.fixedExchRateSecondary(), this.fixedEuroTriangulation());
#}
#
ENDSOURCE
SOURCE #initParameters
#void initParameters(SalesParmUpdate _salesParmUpdate = salesParmUpdate,
# Printout _printout = printout,
# NoYes _printFormLetter = printFormLetter,
# NoYes _printCODLabel = printCODLabel,
# NoYes _printFreightSlip = printFreightSlip,
# NoYes _printShippingLabel = printShippingLabel,
# NoYes _usePrintManagement = usePrintManagement,
# boolean _parmCopyOnly = false)
#
#{;
# salesParmUpdate = _salesParmUpdate;
#
# printout = _printout;
# printFormLetter = _printFormLetter;
# printCODLabel = _printCODLabel;
# printFreightSlip = _printFreightSlip;
# printShippingLabel = _printShippingLabel;
# usePrintManagement = _usePrintManagement;
#
# if (!_parmCopyOnly)
# {
# giroAccountId = BankAccountTable::find(CompanyInfo::find().Bank).AccountNum;
#
# if (printFormLetter)
# {
# this.initPrinterSettingsFormletter();
# }
# }
#}
ENDSOURCE
SOURCE #initParmDefault
#public void initParmDefault()
#{;
# super();
#}
ENDSOURCE
SOURCE #initParmSalesTable
#protected void initParmSalesTable(SalesTable _salesTable)
#{;
# salesTable = _salesTable;
#
# if (! salesTable)
# multiForm = NoYes::Yes;
#}
ENDSOURCE
SOURCE #initParmUpdate
#protected void initParmUpdate(boolean createNew = false)
#{;
# if (createNew)
# {
# salesParmUpdate.clear();
#
# salesParmUpdate.ParmId = this.parmId();
# salesParmUpdate.DocumentStatus = this.documentStatus();
# }
# else
# {
# salesParmUpdate = SalesParmUpdate::find(this.parmId());
# }
#}
ENDSOURCE
SOURCE #initPrinterSettingsFormletter
#///
#/// Initializes printer settings for the posting the sales order with default values
#///
#void initPrinterSettingsFormletter()
#{
#}
ENDSOURCE
SOURCE #initQueryBuild
#protected void initQueryBuild()
#{;
# chooseLines = new SysQueryRun(querystr(SalesUpdate));
#}
ENDSOURCE
SOURCE #initShippingStat
#protected void initShippingStat(Common _common)
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #insertJournal
#protected void insertJournal()
#{;
# try
# {
# ttsbegin;
#
# numberSeq = this.allocateNumAndVoucher();
# [number, voucher] = this.getNumAndVoucher();
#
# if (this.updateNow())
# {
# this.postUpdate();
#
# this.interCompanyPost();
#
# TransactionLog::create(this.transactionLogType(),this.transactionLogTxt());
# ttscommit;
# this.createPayment();
#
# postedTableRefIds.add(salesParmTable.TableRefId);
# }
# else
# throw error(strfmt("@SYS21533"));
# }
# catch(Exception::Error)
# {
# ttsabort;
# throw error("@SYS93289");
# }
#
#}
ENDSOURCE
SOURCE #insertProforma
#protected void insertProforma()
#{;
# try
# {
# ttsbegin;
#
# this.setForUpdateSalesParmTable();
# this.initJournal();
#
# salesLine.clear();
# salesParmLine.clear();
#
# recordListSalesParmLine.first(salesParmLine);
# while (salesParmLine)
# {
# salesLine = salesParmLine.salesLine();
#
# this.displayProgress();
#
# updateNow = salesParmLine.DeliverNow;
# updateNowInvent = salesParmLine.InventNow;
# lineValue = salesLine.calcLineAmountExclTax(updateNow, this.updateDate());
# lineValueInclTax = salesLine.calcLineAmount(updateNow);
#
# this.initJournalLine();
# this.writeJournalLine();
#
# if (! recordListSalesParmLine.next(salesParmLine))
# break;
# }
#
# if (! this.checkIfSomethingIsPosted())
# throw error(strfmt("@SYS21533"));
#
# this.writeJournal();
#
# if (this.postTaxOnProforma())
# {
# this.postTax(false);
# }
# this.createBackorderLines();
# this.interCompanyPost();
# this.printJournal();
#
# ttscommit;
# }
# catch(Exception::Error)
# {
# ttsabort;
# throw error("@SYS93289");
# }
#
#}
ENDSOURCE
SOURCE #interCompanySelectFromJournal
#boolean interCompanySelectFromJournal()
#{
# boolean ret;
#
# ret = super();
#
# if (salesParmUpdate.SpecQty == SalesUpdate::PackingSlip)
# {
# ret = true;
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #interCompanyUpdateSalesPrice
#void interCompanyUpdateSalesPrice(SalesLine _salesLine)
#{
#}
ENDSOURCE
SOURCE #invoiceAccountInQuery
#boolean invoiceAccountInQuery()
#{
# return false;
#}
ENDSOURCE
SOURCE #lateSelectionRemoveLines
#boolean lateSelectionRemoveLines()
#{
# boolean ok = true;
# ;
#
# if (salesParmUpdate.LateSelection && salesParmUpdate.numberOfTables() > 0)
# {
# if (Box::yesNo("@SYS72909", DialogButton::Yes))
# {
# SalesParmTable::deleteWithoutUpdate(salesParmUpdate.ParmId);
# }
# else
# {
# salesParmUpdate.LateSelection = false;
# ok = false;
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #lockSalesUpdateField
#boolean lockSalesUpdateField(boolean _lockSalesUpdate = lockSalesUpdate)
#{
# lockSalesUpdate = _lockSalesUpdate;
# return lockSalesUpdate;
#}
ENDSOURCE
SOURCE #mayJournalBePosted
#public boolean mayJournalBePosted(SalesTable _salesTable)
#{
# return super(_salesTable);
#}
ENDSOURCE
SOURCE #mayJournalTransBePosted
#abstract public boolean mayJournalTransBePosted(SalesLine _salesLine)
#{
#}
#
ENDSOURCE
SOURCE #mustCheckCreditLimit
#protected boolean mustCheckCreditLimit()
#{
# return (!salesTable.creditCardBypassCreditLimit() &&
# (salesParmUpdate.CheckCreditMax || salesTable.custTable_CustAccount().MandatoryCreditLimit) && salesParmUpdate.isCreditCheckEligible());
#}
ENDSOURCE
SOURCE #New
#void new(boolean getParmId = false)
#{;
# super(getParmId);
#
# salesQuantity = SalesQuantity::construct(this.documentStatus());
#
# useShippingStat = false;
# giroAllSame = true;
# printFormLetter = false;
# reArrangeNow = true;
#
# this.initParmUpdate(getParmId);
#
# postedTableRefIds = new Set(Types::String);
#}
#
ENDSOURCE
SOURCE #pack
#container pack()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #parmSalesPurchCycleAction
#SalesPurchCycleAction parmSalesPurchCycleAction(SalesPurchCycleAction _action = salesPurchCycleAction)
#{
# ;
# salesPurchCycleAction = _action;
# return salesPurchCycleAction;
#}
ENDSOURCE
SOURCE #parmShipmentId
#WMSShipmentId parmShipmentId(WMSShipmentId _shipmentId = shipmentId)
#{
# shipmentId = _shipmentId;
#
# return shipmentId;
#}
ENDSOURCE
SOURCE #parmSkipPrompt
#boolean parmSkipPrompt(boolean _skipPrompt = skipPrompt)
#{
# skipPrompt = _skipPrompt;
# return skipPrompt;
#}
#
#
ENDSOURCE
SOURCE #parmSourceTable
#public SalesTable parmSourceTable(SalesTable _salesTable = salesTable)
#{
# ;
# salesTable = _salesTable;
#
# return salesTable;
#}
ENDSOURCE
SOURCE #parmTable2Update
#public Common parmTable2Update(SalesParmTable _parmTable2Update = salesParmTable)
#{
# ;
# salesParmTable = _parmTable2Update;
# return salesParmTable;
#}
ENDSOURCE
SOURCE #parmWmsShipmentIdSet
#public Set parmWmsShipmentIdSet(Set _wmsShipmentIdSet = wmsShipmentIdSet)
#{;
# wmsShipmentIdSet = _wmsShipmentIdSet;
# return wmsShipmentIdSet;
#}
ENDSOURCE
SOURCE #postMarkupLine
#protected void postMarkupLine()
#{
# this.postMarkupOnTrans();
#}
#
ENDSOURCE
SOURCE #postMarkupOnJour
#protected void postMarkupOnJour(SalesTable _salesTableMarkup)
#{
#}
#
ENDSOURCE
SOURCE #postMarkupOnTrans
#protected void postMarkupOnTrans()
#{;
#}
#
ENDSOURCE
SOURCE #postMarkupTable
#protected void postMarkupTable()
#{
# QueryRun queryRun;
# SalesTable salesTableMarkup;
# SalesParmSubTable salesParmSubTable;
# ;
# queryRun = new QueryRun(salesParmTable.querySalesParmSubTableGroupByOrigSalesId());
# while (queryRun.next())
# {
# salesTableMarkup = null;
# if (queryRun.changed(tablenum(SalesParmSubTable)))
# {
# salesParmSubTable = queryRun.get(tablenum(SalesParmSubTable));
# salesTableMarkup = salesParmSubTable.salesTable();
# }
#
# if (!salesTableMarkup)
# continue;
#
# this.postMarkupOnJour(salesTableMarkup);
# }
#}
ENDSOURCE
SOURCE #postTax
#protected void postTax(boolean post)
#{;
# salesCalcTax = SalesCalcTax::construct(this.journal());
# salesCalcTax.tax(this.tax());
# salesCalcTax.post(ledgerVoucher, post);
#}
ENDSOURCE
SOURCE #postTaxOnProforma
#boolean postTaxOnProforma()
#{
# return false;
#}
ENDSOURCE
SOURCE #postUpdate
#protected void postUpdate()
#{
# SalesParmTable localSalesParmTable;
# ParmId parmIdPrev;
# SalesId salesIdPrev;
# ;
#
# ttsbegin;
#
# localSalesParmTable = this.setForUpdateSalesParmTable();
#
# localSalesParmTable.StartDateTime = startDateTimeTable;
# localSalesParmTable.EndDateTime = DateTimeUtil::newDateTime(systemdateget(),timenow(),DateTimeUtil::getUserPreferredTimeZone());
#
# localSalesParmTable.updateParmJobStatusExecuted();
#
# salesParmLine.clear();
# // Sales totals are nulled in order to force a recalculation of the sales totals
# // which are then stored in the SalesTable.estimate field for utilization during credit limit check
# salesTotals = null;
#
# recordListSalesParmLine.first(salesParmLine);
# while (salesParmLine)
# {
# if (salesParmLine.OrigSalesId != salesIdPrev || salesParmLine.ParmId != parmIdPrev)
# {
# //counting number of SalesOrders we deal with
# if (salesParmLine.OrigSalesId != salesIdPrev)
# {
# ++numberOfRecords;
# }
#
# salesTable = salesParmLine.salesTable(true);
# if (salesTable)
# {
# salesTable.updateDocumentStatus(this.documentStatus());
# salesTable.updateBackStatus();
# this.updateSalesType();
# this.createBackorderLines();
# salesTable.updateDeadline(salesParmUpdate.RespiteDate);
#
# if (salesTable.SalesId != salesParmTable.SalesId)
# {
# // If this is not the primary sales order in the summary order,
# // void the credit card preauthorization that may exist as it is no longer valid
# this.voidCreditCardPreauthorize();
# }
# }
#
# localSalesParmTable = salesParmLine.salesParmTable(true);
# if (localSalesParmTable)
# {
# localSalesParmTable.updateParmJobStatusExecuted();
# }
# }
#
# salesIdPrev = salesParmLine.OrigSalesId;
# parmIdPrev = salesParmLine.ParmId;
#
# if (!recordListSalesParmLine.next(salesParmLine))
# break;
# }
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #prePromptInit
#void prePromptInit()
#{
# ;
#
# this.createParmUpdate();
#
# if (salesTable || wmsShipment_ds || wmsArrival_ds || this.createFromLines())
# {
# this.showQueryForm(false);
# this.giroType(salesTable.GiroType);
# this.initLinesQuery();
# }
# else
# {
# this.showQueryForm(true);
# }
#
# this.initPrinterSettingsFormletter();
#}
#
ENDSOURCE
SOURCE #printCODLabel
#boolean printCODLabel(boolean _printCODLabel = printCODLabel)
#{
# printCODLabel = _printCODLabel;
# return printCODLabel;
#}
ENDSOURCE
SOURCE #printerSettingsCODLabel
#container printerSettingsCODLabel()
#{
# return printerSettingsCODLabel;
#}
ENDSOURCE
SOURCE #printerSettingsFreightSlip
#container printerSettingsFreightSlip()
#{
# return printerSettingsFreightSlip;
#}
ENDSOURCE
SOURCE #printerSettingsShippingLabel
#container printerSettingsShippingLabel()
#{
# return printerSettingsShippingLabel;
#}
ENDSOURCE
SOURCE #printFreightSlip
#boolean printFreightSlip(boolean _printFreightSlip = printFreightSlip)
#{
# printFreightSlip =_printFreightSlip;
# return printFreightSlip;
#}
ENDSOURCE
SOURCE #printMgmtNodeType
#///
#/// Identifies the print management node type.
#///
#///
#/// The print management node type.
#///
#protected PrintMgmtNodeType printMgmtNodeType()
#{
# ;
# return PrintMgmtNodeType::Sales;
#}
ENDSOURCE
SOURCE #printout
#Printout printout()
#{
# ;
# if(this.proforma())
# {
# return Printout::Current;
# }
# return printout;
#}
ENDSOURCE
SOURCE #printoutFreightSlip
#protected void printoutFreightSlip()
#{
# Args parameters = new Args();
# ReportRun salesFreightSlip;
# ;
#
# if ( salesTable.SalesType == SalesType::ReturnItem
# && salesTable.FreightSlipType != FreightSlipType::None)
# {
# parameters.name(reportstr(SalesFreightSlip));
# parameters.caller(this);
# parameters.record(salesTable);
#
# salesFreightSlip = new ReportRun(parameters);
# salesFreightSlip.run();
# }
#}
ENDSOURCE
SOURCE #printShippingLabel
#boolean printShippingLabel(boolean _printShippingLabel = printShippingLabel)
#{
# printShippingLabel = _printShippingLabel;
# return printShippingLabel;
#}
ENDSOURCE
SOURCE #proforma
#boolean proforma(boolean _proforma = salesParmUpdate.Proforma)
#{;
# salesParmUpdate.Proforma = _proforma;
# return salesParmUpdate.Proforma;
#}
ENDSOURCE
SOURCE #prompt
#public boolean prompt()
#{
# ;
#
# if (this.parmSkipPrompt())
# return true;
#
# return super();
#}
#
ENDSOURCE
SOURCE #promptAndRun
#///
#/// Executes "if prompt then run" scenario. This wrapper method should be used instead of manually calling prompt() and run() methods
#///
#///
#/// For the correct functioning of prompt() method objecct reference must be saved to global cache and prePromptInit() method called.
#///
#void promptAndRun()
#{
# SysGlobalCache cache = classfactory.globalCache();
# ParmId _parmId = this.parmId();
# ;
#
# //Save object reference to global cache
# cache.set(classstr(SalesFormLetter), _parmId, this);
#
# this.prePromptInit();
# if (this.prompt())
# {
# this.run();
# }
#
# //Delete saved object reference from the global cache
# if (cache.isSet(classstr(SalesFormLetter), _parmId))
# cache.remove(classstr(SalesFormLetter), _parmId);
#}
ENDSOURCE
SOURCE #purchSalesDocumentStatus
#anytype purchSalesDocumentStatus()
#{
# SalesPrintDocumentStatus salesPrintDocumentStatus;
#;
# switch(this.documentStatus())
# {
# case(DocumentStatus::Quotation) : salesPrintDocumentStatus = SalesPrintDocumentStatus::Quotation; break;
# case(DocumentStatus::Confirmation): salesPrintDocumentStatus = SalesPrintDocumentStatus::Confirmation; break;
# case(DocumentStatus::PickingList) : salesPrintDocumentStatus = SalesPrintDocumentStatus::PickingList; break;
# case(DocumentStatus::PackingSlip) : salesPrintDocumentStatus = SalesPrintDocumentStatus::PackingSlip; break;
# case(DocumentStatus::Invoice) : salesPrintDocumentStatus = SalesPrintDocumentStatus::Invoice; break;
# }
# return salesPrintDocumentStatus;
#}
ENDSOURCE
SOURCE #qtyInvent
#container qtyInvent(Common _common,
# InventQty qty = naReal())
#{;
# return salesQuantity.qtyInvent(_common, salesParmUpdate.SpecQty, qty, salesParmUpdate.CreditRemaining);
#}
ENDSOURCE
SOURCE #qtySales
#container qtySales(Common _common,
# SalesQty qty = naReal())
#{;
# return salesQuantity.qtySales(_common, salesParmUpdate.SpecQty, qty, salesParmUpdate.CreditRemaining);
#}
ENDSOURCE
SOURCE #queryBuild
#QueryRun queryBuild()
#{
# Query query;
# QueryBuildDataSource dataSourceUpdate;
# QueryBuildDataSource dataSourceTable;
# QueryRun queryRun;
# ;
# #query
#
# query = new Query();
# dataSourceUpdate = query.addDataSource(tablenum(SalesParmUpdate));
# dataSourceTable = dataSourceUpdate.addDataSource(tablenum(SalesParmTable));
# dataSourceTable.relations(true);
#
# queryRun = new QueryRun(query);
# queryRun.query().dataSourceTable(tablenum(SalesParmUpdate)).addRange(fieldnum(SalesParmUpdate, ParmId)).value(salesParmUpdate.ParmId);
#
# queryRun.query().dataSourceTable(tablenum(SalesParmTable)).addRange(fieldnum(SalesParmTable, ParmJobStatus)).value(queryValue(ParmJobStatus::Waiting));
#
# queryRun.literals(#queryForcePlaceholders);
#
# return queryRun;
#}
ENDSOURCE
SOURCE #reArrange
#boolean reArrange(boolean validate = true)
#{
# SalesSummary salesSummary;
# QueryRun query;
# SalesParmTable localSalesParmTable;
# SalesParmTable oldSalesParmTable;
# SalesParmSubTable localSalesParmSubTable;
# SalesShippingStat salesShippingStat;
# SalesParmSubLine localSalesParmSubLine;
# InventDim inventDim;
# CustName deliveryName;
# Addressing deliveryAddress;
# CustDlvModeId dlvMode;
# InventSiteId inventSiteId;
#
# boolean result;
# container packedClass;
#
# void moveParmLine(SalesId _fromSalesId,
# TradeLineRefId _fromTableRefId,
# SalesId _toSalesId,
# TradeLineRefId _toTableRefId)
# {;
# ttsbegin;
#
# update_recordset salesParmLine
# setting tableRefId = _toTableRefId
# where salesParmLine.ParmId == salesParmUpdate.ParmId
# && salesParmLine.OrigSalesId == _fromSalesId
# && salesParmLine.TableRefId == _fromTableRefId
# && (!localSalesParmSubLine.LineRefRecId || salesParmLine.RecId == localSalesParmSubLine.LineRefRecId);
#
# if (this.useShippingStat())
# {
# update_recordset salesShippingStat
# setting salesId = _toSalesId,
# tableRefId = _toTableRefId
# where salesShippingStat.ParmId == salesParmUpdate.ParmId
# && salesShippingStat.TableRefId == _fromTableRefId
# && salesShippingStat.OrigSalesId == _fromSalesId;
# }
# ttscommit;
# }
#
#
# void updateSalesParmTable(SalesParmTable _salesParmTable,
# SalesParmLine _salesParmLine)
# {;
#
# inventSiteId = this.splitSite() ? salesParmLine.inventDim().InventSiteId : salesParmTable.InventSiteId;
# deliveryName = this.splitDeliveryInformation() ? salesParmLine.DeliveryName : salesParmTable.DeliveryName;
# deliveryAddress = this.splitDeliveryInformation() ? salesParmLine.DeliveryAddress : salesParmTable.DeliveryAddress;
# dlvMode = this.splitDeliveryInformation() ? salesParmLine.DlvMode : salesParmTable.DlvMode;
#
# // look for existing salesParmTable with site and address from salseParmLine
# localSalesParmTable = SalesParmTable::findDeliveryInformation(_salesParmTable.ParmId,
# _salesParmTable.SalesId,
# inventSiteId,
# deliveryName,
# deliveryAddress,
# dlvMode,
# salesParmLine.ShipCarrierId,
# salesParmLine.ShipCarrierAccount,
# salesParmLine.ShipCarrierAddress);
#
# // if salesParmTable not found - create new salesParmTable with the site and adresses from salesParmLine
# if (!localSalesParmTable.RecId)
# {
# localSalesParmTable.data(_salesParmTable);
# localSalesParmTable.TableRefId = FormLetter::getTableRef();
# localSalesParmTable.InventSiteId = _salesParmLine.inventDim().InventSiteId;
# localSalesParmTable.DeliveryAddress = _salesParmLine.DeliveryAddress;
# localSalesParmTable.DeliveryName = _salesParmLine.DeliveryName;
# localSalesParmTable.DlvMode = _salesParmLine.DlvMode;
# localSalesParmTable.ShipCarrierId = _salesParmLine.ShipCarrierId;
# localSalesParmTable.ShipCarrierAccount = _salesParmLine.ShipCarrierAccount;
# localSalesParmTable.ShipCarrierAddress = _salesParmLine.ShipCarrierAddress;
#
# localSalesParmTable.doInsert();
# }
#
# localSalesParmSubTable = SalesParmSubTable::find(localSalesParmTable.ParmId,
# localSalesParmTable.TableRefId,
# salesParmLine.OrigSalesId,
# salesParmLine.subId());
# if (!localSalesParmSubTable.RecId)
# {
# localSalesParmSubTable.data(salesParmLine.salesParmSubTable());
# localSalesParmSubTable.TableRefId = localSalesParmTable.TableRefId;
# localSalesParmSubTable.doInsert();
# }
#
# salesParmLine.TableRefId = localSalesParmTable.TableRefId;
# salesParmLine.doUpdate();
# }
# ;
#
#
# //If running on the client, execute reArrange method on the server side to reduce the interaction between tiers
# if (!this.objectOnServer())
# {
# [result, packedClass] = SalesFormLetter::execReArrangeOnServer(this.documentStatus(), this.parmId(), this.pack(), validate);
#
# this.unpack(packedClass);
# return result;
# }
#
#
# if (validate && !this.validate())
# return false;
#
# salesSummary = SalesSummary::construct(salesParmUpdate.SumBy, salesParmUpdate.ParmId, salesParmUpdate.SumSalesId, this.documentStatus());
# query = salesSummary.queryBuild(this.isInBatch());
#
# if (salesParmUpdate.SumSalesId)
# {
# salesSummary.summarySalesId (salesParmUpdate.SumSalesId);
# salesSummary.summaryTableRef(FormLetter::getTableRef());
# }
#
#
# ttsbegin;
# this.reArrangePre();
#
# while (query.next())
# {
# localSalesParmSubTable = query.get(tablenum(SalesParmSubTable));
# salesTable = localSalesParmSubTable.salesTable();
#
# if (salesParmUpdate.SumBy == AccountOrder::Journal)
# localSalesParmSubLine = query.get(tablenum(SalesParmSubLine));
#
# if (!salesTable.isInterCompanyOrder()
# || salesParmUpdate.SumBy == AccountOrder::Auto
# || salesParmUpdate.SumBy == AccountOrder::Journal)
# {
# if (this.checkIfSalesOrderExist(salesTable) && salesSummary.createNewJournal(salesParmUpdate.SumBy == AccountOrder::Journal ? localSalesParmSubTable : salesTable))
# {
# if (!salesParmUpdate.SumSalesId)
# {
# salesSummary.summarySalesId (salesTable.SalesId);
# salesSummary.summaryTableRef(FormLetter::getTableRef());
# }
# oldSalesParmTable = localSalesParmSubTable.salesParmTable();
# if (oldSalesParmTable.RecId && query.changed(tablenum(SalesParmSubTable)))
# {
# localSalesParmTable.data(oldSalesParmTable);
# if (localSalesParmTable.SalesId != salesTable.SalesId)
# this.updateParmTable(localSalesParmTable, salesTable);
# }
# else
# {
# localSalesParmTable.clear();
# this.createParmTable(localSalesParmTable, salesTable);
# }
# localSalesParmTable.TableRefId = salesSummary.summaryTableRef();
# localSalesParmTable.doInsert();
# }
#
# moveParmLine(localSalesParmSubTable.OrigSalesId, localSalesParmSubTable.TableRefId,
# salesSummary.summarySalesId(), salesSummary.summaryTableRef());
#
# localSalesParmSubTable.TableRefId = salesSummary.summaryTableRef();
# }
# else
# {
# oldSalesParmTable = localSalesParmSubTable.salesParmTable();
# if (oldSalesParmTable.RecId && query.changed(tablenum(SalesParmSubTable)))
# {
# localSalesParmTable.data(oldSalesParmTable);
# if (localSalesParmTable.SalesId != salesTable.SalesId)
# this.updateParmTable(localSalesParmTable, salesTable);
# }
# else
# {
# localSalesParmTable.clear();
# this.createParmTable(localSalesParmTable, salesTable);
# }
# localSalesParmTable.TableRefId = FormLetter::getTableRef();
# localSalesParmTable.doInsert();
#
# moveParmLine(localSalesParmSubTable.OrigSalesId, localSalesParmSubTable.TableRefId,
# localSalesParmTable.SalesId, localSalesParmTable.TableRefId);
#
# localSalesParmSubTable.TableRefId = localSalesParmTable.TableRefId;
# }
# if (localSalesParmSubTable.TableRefId != localSalesParmSubTable.orig().TableRefId &&
# !SalesParmSubTable::exist(localSalesParmSubTable.ParmId, localSalesParmSubTable.TableRefId, localSalesParmSubTable.OrigSalesId, localSalesParmSubTable.SubId))
# {
# localSalesParmSubTable.doUpdate();
# }
# }
#
# switch (true)
# {
# // find the salesParmLines with same parmId and tableRefId from salesParmTable,
# // but have a different site or address than the salesParmTable
# // updateSalesParmTable creates salesParmTables and update salesParmLine with tableRef.
#
# case this.splitSite() && this.splitDeliveryInformation():
#
# while select forceplaceholders salesParmTable
# where salesParmTable.ParmId == salesParmUpdate.ParmId
# join forupdate salesParmLine
# order by DeliveryAddress
# exists join inventDim
# where salesParmLine.ParmId == salesParmTable.ParmId
# && salesParmLine.TableRefId == salesParmTable.TableRefId
# && salesParmLine.InventDimId == inventDim.InventDimId
# && (inventDim.InventSiteId != salesParmTable.InventSiteId
# || salesParmLine.DeliveryAddress != salesParmTable.DeliveryAddress
# || salesParmLine.DeliveryName != salesParmTable.DeliveryName
# || salesParmLine.DlvMode != salesParmTable.DlvMode)
#
# {
# updateSalesParmTable(salesParmTable, salesParmLine);
# this.updateAllSalesShippingStat();
# }
# break;
#
# // split on site only
# case this.splitSite() && !this.splitDeliveryInformation():
#
# while select forceplaceholders salesParmTable
# where salesParmTable.ParmId == salesParmUpdate.ParmId
# join forupdate salesParmLine
# exists join inventDim
# where salesParmLine.ParmId == salesParmTable.ParmId
# && salesParmLine.TableRefId == salesParmTable.TableRefId
# && salesParmLine.InventDimId == inventDim.InventDimId
# && inventDim.InventSiteId != salesParmTable.InventSiteId
# {
# updateSalesParmTable(salesParmTable, salesParmLine);
# this.updateAllSalesShippingStat();
# }
# break;
#
# // split on delivery addresses only
# case !this.splitSite() && this.splitDeliveryInformation():
#
# while select forceplaceholders salesParmTable
# where salesParmTable.ParmId == salesParmUpdate.ParmId
# join forupdate salesParmLine
# order by DeliveryAddress
# where salesParmLine.ParmId == salesParmTable.ParmId
# && salesParmLine.TableRefId == salesParmTable.TableRefId
# && (salesParmLine.DeliveryAddress != salesParmTable.DeliveryAddress
# || salesParmLine.DeliveryName != salesParmTable.DeliveryName
# || salesParmLine.DlvMode != salesParmTable.DlvMode)
# {
# updateSalesParmTable(salesParmTable, salesParmLine);
# this.updateAllSalesShippingStat();
# }
# break;
# }
#
# this.reArrangePost();
#
# delete_from forceplaceholders localSalesParmSubTable
# where localSalesParmSubTable.ParmId == salesParmUpdate.ParmId
# notexists join salesParmLine
# where salesParmLine.ParmId == localSalesParmSubTable.ParmId
# && salesParmLine.TableRefId == localSalesParmSubTable.TableRefId
# && salesParmLine.OrigSalesId == localSalesParmSubTable.OrigSalesId;
#
# delete_from forceplaceholders localSalesParmTable
# where localSalesParmTable.ParmId == salesParmUpdate.ParmId
# notexists join localSalesParmSubTable
# where localSalesParmSubTable.ParmId == localSalesParmTable.ParmId
# && localSalesParmSubTable.TableRefId == localSalesParmTable.TableRefId;
#
# if (!this.checkTaxWorkRegulation())
# throw error("@SYS21628");
#
# ttscommit;
#
# reArrangeNow = false;
#
# return true;
#}
#
ENDSOURCE
SOURCE #reArrangePost
#protected void reArrangePost()
#{
#}
ENDSOURCE
SOURCE #reArrangePre
#protected void reArrangePre()
#{
#}
ENDSOURCE
SOURCE #recommendedSpecQty
#public SalesUpdate recommendedSpecQty()
#{
# return SalesUpdate::All;
#}
ENDSOURCE
SOURCE #recordInsertListInit
#protected void recordInsertListInit()
#{
# ;
# this.suspendRecIds();
# recordInsertSalesParmTable = new RecordInsertList(tablenum(SalesParmTable),true);
# recordInsertSalesParmSubTable = new RecordInsertList(tablenum(SalesParmSubTable));
# recordInsertSalesParmLine = new RecordInsertList(tablenum(SalesParmLine));
#
# salesParmLineMap = new Map(Types::String,Types::Record);
# salesParmTableMap = new Map(Types::String,Types::Record);
#}
ENDSOURCE
SOURCE #recordInsertListInsert
#protected void recordInsertListInsert()
#{
# recordInsertSalesParmTable.insertDatabase();
# recordInsertSalesParmSubTable.insertDatabase();
# recordInsertSalesParmLine.insertDatabase();
# this.removeRecIdSuspension();
#}
ENDSOURCE
SOURCE #reduceOnHand
#boolean reduceOnHand()
#{
# return false;
#}
ENDSOURCE
SOURCE #removeRecIdSuspension
#protected void removeRecIdSuspension()
#{
# ;
# systemSequence.removeRecIdSuspension(tablenum(SalesParmLine));
#}
ENDSOURCE
SOURCE #reselect
#void reSelect(SalesUpdate _salesUpdate,
# NoYes _creditRemaining)
#{
# SalesParmTable _salesParmTable;
# SalesParmSubTable _salesParmSubTable;
# SalesLine _salesLine;
# CustParameters custParameters = CustParameters::find();
# InventDim inventDim;
#
# container packedClass;
# ;
#
# //If running on the client, execute reSelect method on the server side to reduce the interaction between tiers
# if (!this.objectOnServer())
# {
# packedClass = SalesFormLetter::execReSelectOnServer(this.documentStatus(), this.parmId(), this.pack(), _salesUpdate, _creditRemaining);
# this.unpack(packedClass);
# return;
# }
#
#
# salesParmUpdate.SpecQty = _salesUpdate;
# salesParmUpdate.CreditRemaining = _creditRemaining;
#
# ttsbegin;
#
# if (!this.createFromLines())
# {
# this.recordInsertListInit();
# while select forceplaceholders _salesParmTable
# where _salesParmTable.ParmId == salesParmUpdate.ParmId
# join _salesParmSubTable
# where _salesParmSubTable.ParmId == _salesParmTable.ParmId &&
# _salesParmSubTable.TableRefId == _salesParmTable.TableRefId
# {
# SalesParmLine::deleteFromSalesParmSubTable(_salesParmSubTable);
#
# switch (true)
# {
# // split on site only find lines which match inventSiteId from salesParmTable,
# // join the inventDim because salesLine does only have the inventDimId
# case this.splitSite() && !this.splitDeliveryInformation():
# while select _salesLine
# index hint SalesLineIdx
# where _salesLine.SalesId == _salesParmSubTable.OrigSalesId
# && _salesLine.Blocked == NoYes::No
# exists join inventDim
# where inventDim.InventDimId == _salesLine.InventDimId
# && inventDim.InventSiteId == _salesParmTable.InventSiteId
# {
# this.createParmLine(_salesLine, _salesParmTable.TableRefId);
# }
# break;
#
#
# // split on deliveryInformation only no need to join inventDim
# case !this.splitSite() && this.splitDeliveryInformation():
# while select _salesLine
# index hint SalesLineIdx
# where _salesLine.SalesId == _salesParmSubTable.OrigSalesId
# && _salesLine.DeliveryName == _salesParmTable.DeliveryName
# && _salesLine.DeliveryAddress == _salesParmTable.DeliveryAddress
# && _salesLine.DlvMode == _salesParmTable.DlvMode
# && _salesLine.Blocked == NoYes::No
# {
# this.createParmLine(_salesLine, _salesParmTable.TableRefId);
# }
# break;
#
# // split on site and delivery find salesLines with same delivery addresses and site
# case this.splitSite() && this.splitDeliveryInformation():
# while select _salesLine
# index hint SalesLineIdx
# where _salesLine.SalesId == _salesParmSubTable.OrigSalesId
# && _salesLine.DeliveryName == _salesParmTable.DeliveryName
# && _salesLine.DeliveryAddress == _salesParmTable.DeliveryAddress
# && _salesLine.DlvMode == _salesParmTable.DlvMode
# && _salesLine.Blocked == NoYes::No
# exists join inventDim
# where inventDim.InventDimId == _salesLine.InventDimId
# && inventDim.InventSiteId == _salesParmTable.InventSiteId
#
# {
# this.createParmLine(_salesLine, _salesParmTable.TableRefId);
# }
# break;
#
# // no split at all
# default:
# while select _salesLine
# index hint SalesLineIdx
# where _salesLine.SalesId == _salesParmSubTable.OrigSalesId
# && _salesLine.Blocked == NoYes::No
# {
# this.createParmLine(_salesLine, _salesParmTable.TableRefId);
# }
# }
# }
# this.recordInsertListInsert();
# }
# else
# {
# SalesParmTable::deleteWithoutUpdate(salesParmUpdate.ParmId);
#
# if (this.fromJournalTransList())
# this.chooseLinesFromJournalTransList();
# else
# this.chooseLinesFromSalesLine(_salesUpdate);
# }
#
# this.updateAllSalesShippingStat();
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #resetParmListCommonCS
#public void resetParmListCommonCS()
#{
# ;
# salesTable = null;
# editLinesChanged = false;
# reArrangeNow = false;
# initAllowEmptyTable = false;
# allowEmptyTable = false;
# enableUpdateNow = false;
# lockSalesUpdate = false;
# createFromLines = false;
# createFromHistory = false;
# showQueryForm = false;
# multiForm = false;
# transDate = dateNull();
# giroType = 0;
# defaultGiroType = NoYes::No;
#}
ENDSOURCE
SOURCE #resetProformaUponPhysicalUpdatable
#///
#/// Turns off the sample packing slip.
#///
#///
#/// Used by override methods to select between the sample and final packing slip.
#///
#void resetProformaUponPhysicalUpdatable()
#{
#}
#
ENDSOURCE
SOURCE #run
#void run()
#{
# #OCCRetryCount
# QueryRun query;
# Counter infoLogCounter;
# LogText logText;
# boolean updateError;
# dataAreaId curExtPreProgress = curext();
# SalesFormLetterEndMultiThread salesFormLetterEndMultiThread;
# FormLetterMultiThread formLetterMultiThread;
# ;
#
# startDateTimeUpdate = DateTimeUtil::newDateTime(systemdateget(),timenow(),DateTimeUtil::getUserPreferredTimeZone());
#
# this.progressInit("@SYS25781", progressTotal, #AviFormLetter);
# progress.setText("@SYS26577");
#
# if (salesParmUpdate.LateSelection)
# {
# if (!SalesParmUpdate::exist(this.parmId()))
# {
# this.parmId(NumberSeq::newGetNum(CompanyInfo::numRefParmId()).num());
# this.createParmUpdateFromParmUpdateRecord(this.salesParmUpdate());
# }
#
# chooseLines = new QueryRun(salesParmUpdate.LateSelectionQuery);
# this.chooseLines();
#
# if (salesParmUpdate.numberOfLines() < 1)
# checkFailed("@SYS26185");
# }
#
#
# if (!salesTable.QuotationId && reArrangeNow &&
# !this.reArrange(false))
# {
# throw error("@SYS18447");
# }
#
# if (this.canMultiThread())
# {
# batchHeader = BatchHeader::construct(this.parmCurrentBatch().BatchJobId);
# salesFormLetterEndMultiThread = SalesFormLetterEndMultiThread::newFormLetter(this,
# salesParmUpdate.ParmId,
# salesParmUpdate.Proforma);
# batchHeader.addRuntimeTask(salesFormLetterEndMultiThread,this.parmCurrentBatch().RecId);
# }
#
# query = this.queryBuild();
#
# if (printout == Printout::After && ! this.proforma())
# {
# journalList = this.newJournalList();
# }
#
# setprefix("@SYS25781");
#
# while (query.next())
# {
# infoLogCounter = infolog.num();
#
# infolog.updateViewSet(this);
#
# if (printout == Printout::Current || this.proforma())
# {
# journalList = this.newJournalList();
# }
#
# salesParmTable = query.get(tablenum(SalesParmTable));
#
# if (salesParmTable.SalesId != salesTable.SalesId)
# {
# salesTable = salesParmTable.salesTable();
# }
#
# if (this.checkIfSalesOrderExist(salesTable))
# {
# try
# {
# if (batchHeader)
# {
# formLetterMultiThread = FormLetterMultiThread::newFormLetter(this);
# batchHeader.addRuntimeTask(formLetterMultiThread,this.parmCurrentBatch().RecId);
# batchHeader.addDependency(salesFormLetterEndMultiThread,formLetterMultiThread,BatchDependencyStatus::FinishedOrError);
# }
# else
# {
# this.createJournal();
# }
# }
#
# catch (Exception::Deadlock)
# {
# #if.never //#Speedtest
# if (speedExecute_Sales)
# speedExecute_Sales.timing(SpeedSalesTiming::DeadLockInvoice, salesParmLine.itemId);
# #endif
# this.removeRecIdSuspension();
# this.removeJournalFromList();
# retry;
# }
#
# catch (Exception::UpdateConflict)
# {
# this.removeRecIdSuspension();
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# this.removeJournalFromList();
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
#
# catch (Exception::Error)
# {
# this.removeRecIdSuspension();
# this.removeJournalFromList();
# updateError = true;
#
# ttsbegin;
#
# logText = Info::infoCon2Str(infolog.copy(infoLogCounter+1,infolog.num()));
#
# infolog.updateViewSet(this, false);
#
# this.setForUpdateSalesParmTable();
#
# salesParmTable.Log = logText;
# salesParmTable.updateParmJobStatusContainErrors();
#
# ttscommit;
# }
# }
# else
# {
# if (salesParmUpdate.SumBy == AccountOrder::None)
# info(strfmt("@SYS15067", salesParmTable.SalesId));
# }
#
# infolog.updateViewSet(this, false);
# }
#
# if (batchHeader)
# {
# batchHeader.save();
# }
# else
# {
# if (printout == Printout::After && ! salesParmUpdate.Proforma)
# this.printJournal();
#
# this.endUpdate();
# }
# progress = null;
#
# if (updateError)
# throw error("@SYS78886");
#}
#
ENDSOURCE
SOURCE #runShipCarrier
#///
#/// Invokes functionality that requires user interaction.
#///
#///
#/// This method is called after the run method.
#///
#public void runShipCarrier()
#{
# ;
#}
ENDSOURCE
SOURCE #salesParmLineMapKey
#protected str salesParmLineMapKey(SalesId _salesId, InventTransId _inventTransId)
#{
# return _salesId + '#' + _inventTransId;
#}
ENDSOURCE
SOURCE #salesParmTableMapKey
#protected str salesParmTableMapKey(SalesId _salesId,
# InventSiteId _inventSiteId,
# CustName _deliveryName,
# Addressing _deliveryAddress,
# CustDlvModeId _dlvMode,
# ShipCarrierId _carrierId = '',
# ShipCarrierAccount _carrierAccount = '',
# Addressing _tpAddress = ''
# )
#{
# return _salesId + '#' + _deliveryName + '#' + _deliveryAddress + '#' + _inventSiteId + '#' + _dlvMode
# + '#' + _carrierId + '#' + _carrierAccount + '#' + _tpAddress;
#}
ENDSOURCE
SOURCE #SalesParmUpdate
#SalesParmUpdate salesParmUpdate(SalesParmUpdate _salesParmUpdate = salesParmUpdate)
#{;
# salesParmUpdate = _salesParmUpdate;
# return salesParmUpdate;
#}
ENDSOURCE
SOURCE #salesTable
#SalesTable salesTable(SalesTable _salesTable = salesTable)
#{;
# salesTable = _salesTable;
# return salesTable;
#}
ENDSOURCE
SOURCE #setForUpdateSalesParmTable
#SalesParmTable setForUpdateSalesParmTable()
#{;
# salesParmTable = SalesParmTable::find(salesParmTable.ParmId, salesParmTable.TableRefId, true);
# return salesParmTable;
#}
#
ENDSOURCE
SOURCE #setLedgerVoucher
#void setLedgerVoucher(LedgerVoucher _ledgerVoucher)
#{;
# ledgerVoucher = _ledgerVoucher;
# ledgerVoucherIsSet = true;
#}
#
ENDSOURCE
SOURCE #setNumAndVoucher
#void setNumAndVoucher(Num _number = number,
# Voucher _voucher = voucher)
#{;
# number = _number;
# voucher = _voucher;
#}
ENDSOURCE
SOURCE #setParmSalesUpdate
#SalesUpdate setParmSalesUpdate(SalesUpdate _salesUpdateValue = salesUpdateValue)
#{
# salesUpdateValue = _salesUpdateValue;
# return salesUpdateValue;
#}
ENDSOURCE
SOURCE #setSalesEditLinesDataSource
#void setSalesEditLinesDataSource(FormDataSource dataSource)
#{
# salesEditLinesDatasource = dataSource;
#}
ENDSOURCE
SOURCE #ShipCarrierAccount
#ShipCarrierAccount shipCarrierAccount(SalesLine _salesLine, SalesTable _salesTable = _salesLine.salesTable())
#{
# ;
#
# return this.splitDeliveryInformation() ? _salesLine.ShipCarrierAccount
# : _salesTable.ShipCarrierAccount;
#}
ENDSOURCE
SOURCE #shipCarrierId
#ShipCarrierId shipCarrierId(SalesLine _salesLine, SalesTable _salesTable = _salesLine.salesTable())
#{
# ;
#
# return this.splitDeliveryInformation() ? _salesLine.ShipCarrierId
# : _salesTable.ShipCarrierId;
#}
ENDSOURCE
SOURCE #site
#InventSiteId site(SalesLine _salesLine, SalesTable _salesTable)
#
#{;
#
# return this.splitSite() ? _salesLine.inventDim().InventSiteId
# : _salesTable.InventSiteId;
#
#}
#
ENDSOURCE
SOURCE #specQty
#SalesUpdate specQty(SalesUpdate _specQty)
#{;
# salesParmUpdate.SpecQty = _specQty;
# return salesParmUpdate.SpecQty;
#}
ENDSOURCE
SOURCE #splitDeliveryInformation
#NoYes splitDeliveryInformation(NoYes _splitDeliveryInformation = salesParmUpdate.SplitDeliveryInformation)
#{;
# salesParmUpdate.SplitDeliveryInformation = _splitDeliveryInformation;
# return salesParmUpdate.SplitDeliveryInformation;
#}
ENDSOURCE
SOURCE #splitSite
#TradeSplitSite splitSite(TradeSplitSite _splitSite = salesParmUpdate.SplitSite)
#{;
#
# salesParmUpdate.SplitSite = _splitSite;
# return salesParmUpdate.SplitSite;
#}
#
ENDSOURCE
SOURCE #sumBy
#AccountOrder sumBy(AccountOrder _sumBy = salesParmUpdate.SumBy)
#{;
# salesParmUpdate.SumBy = _sumBy;
# return salesParmUpdate.SumBy;
#}
ENDSOURCE
SOURCE #sumByInit
#protected AccountOrder sumByInit()
#{;
# return SalesParameters::find().SummaryUpdateBy;
#}
ENDSOURCE
SOURCE #suspendRecIds
#protected void suspendRecIds()
#{
# ;
# systemSequence = new systemSequence();
# systemSequence.suspendRecIds(tablenum(SalesParmLine));
#}
ENDSOURCE
SOURCE #tpAddress
#Addressing tpAddress(SalesLine _salesLine, SalesTable _salesTable = _salesLine.salesTable())
#{
# Addressing tpAddrInLine;
# ;
#
# tpAddrInLine = _salesLine.tpAddress();
#
# return (this.splitDeliveryInformation() && tpAddrInLine) ? tpAddrInLine : _salesTable.tpAddress();
#}
ENDSOURCE
SOURCE #trackBackorder
#boolean trackBackorder()
#{
# return false;
#}
ENDSOURCE
SOURCE #transactionLogTxt
#protected TransTxt transactionLogTxt()
#{;
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #transactionLogType
#protected TransactionLogType transactionLogType()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #unpack
#boolean unpack(container packedClass)
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #update
#void update(Common source,
# TransDate _transDate = this.transDate(),
# SalesUpdate _specQty = SalesUpdate::All,
# AccountOrder _accountOrder = AccountOrder::None,
# NoYes _proforma = salesParmUpdate.Proforma,
# NoYes _printFormLetter = printFormLetter,
# NoYes _usePrintManagement = false,
# NoYes _creditRemaining = this.creditRemaining(),
# container _packedTmpFrmVirtualList = connull())
#{;
# switch(source.TableId)
# {
# case tablenum(SalesTable):
# this.salesTable(source);
# this.initParmSalesTable(salesTable);
# break;
#
# case tablenum(WMSShipment):
# this.parmShipmentId(source.(fieldnum(WMSShipment, ShipmentId)));
# break;
# }
#
# if (!_transDate)
# _transDate = systemdateget();
#
# this.transDate (_transDate);
# this.specQty (_specQty);
# this.proforma (_proforma);
# this.printFormLetter (_printFormLetter);
# this.printCODLabel (NoYes::No);
# this.printFreightSlip (NoYes::No);
# this.printShippingLabel (NoYes::No);
# this.usePrintManagement (_usePrintManagement);
# this.creditRemaining (_creditRemaining);
#
# this.createParmUpdate(false);
#
# this.initParameters(salesParmUpdate,
# Printout::Current); // Printout
#
# this.giroType(salesTable.GiroType);
# this.initLinesQuery();
#
# if (_packedTmpFrmVirtualList)
# {
# this.selectFromJournal(_packedTmpFrmVirtualList);
# }
#
# this.run();
# // Don't call runShipCarrier here because it invokes a dialog that has to be handled seperately.
#
#}
#
ENDSOURCE
SOURCE #updateAllSalesShippingStat
#protected void updateAllSalesShippingStat()
#{
# SalesParmSubTable localSalesParmSubTable;
#
# if (this.useShippingStat())
# {
# while select localSalesParmSubTable
# where localSalesParmSubTable.ParmId == salesParmUpdate.ParmId
# {
# this.createSalesShippingStat(localSalesParmSubTable);
# }
# }
#}
ENDSOURCE
SOURCE #updateDate
#TransDate updateDate()
#{
# return salesParmTable.Transdate;
#}
#
ENDSOURCE
SOURCE #updateEstimate
#void updateEstimate()
#{
#}
ENDSOURCE
SOURCE #updateNonPostedParmLines
#protected void updateNonPostedParmLines(SalesParmLine _salesParmLine)
#{
# SalesParmLine localSalesParmLine;
# SalesParmLine updateSalesParmLine;
#
# while select localSalesParmLine
# where localSalesParmLine.ParmId == _salesParmLine.ParmId &&
# localSalesParmLine.SalesLineRecId == _salesParmLine.SalesLineRecId &&
# localSalesParmLine.TableRefId != _salesParmLine.TableRefId
#
# {
# if (!postedTableRefIds.in(localSalesParmLine.TableRefId))
# {
# updateSalesParmLine = SalesParmLine::findRecId(localSalesParmLine.RecId, true);
# updateSalesParmLine.RemainBefore -= updateNow;
# updateSalesParmLine.RemainBeforeInvent -= updateNowInvent;
# updateSalesParmLine.doUpdate();
# }
# }
#}
ENDSOURCE
SOURCE #updateParmTable
#void updateParmTable(SalesParmTable _salesParmTable,
# SalesTable _salesTable,
# InventSiteId _inventSiteId = _salesTable.InventSiteId,
# Name _salesName = _salesTable.SalesName,
# CustName _deliveryName = _salesTable.DeliveryName,
# Addressing _deliveryAddress = _salesTable.DeliveryAddress,
# CustDlvModeId _dlvMode = _salesTable.DlvMode)
#{;
# _salesParmTable.initFromSalesTable(_salesTable);
#
# _salesParmTable.InventSiteId = _inventSiteId;
# _salesParmTable.SalesName = _salesName;
# _salesParmTable.DeliveryName = _deliveryName;
# _salesParmTable.DeliveryAddress = _deliveryAddress;
# _salesParmTable.DlvMode = _dlvMode;
# _salesParmTable.CustBankAccountId = this.custBankAccountId(_salesTable);
#}
#
ENDSOURCE
SOURCE #updateParmTableWithErrors
#///
#/// Updates the current SalesParmTable table record with the provided LogText.
#///
#///
#/// The Info text to assign to the current SalesParmTable.
#///
#public void updateParmTableWithErrors(LogText _logText)
#{
# ;
#
# this.setForUpdateSalesParmTable();
#
# salesParmTable.Log = _logText;
# salesParmTable.updateParmJobStatusContainErrors();
#}
ENDSOURCE
SOURCE #updatePrinterSettingsCODLAbel
#protected void updatePrinterSettingsCODLabel(container _printerSettings)
#{
# printerSettingsCODLabel = _printerSettings;
#}
ENDSOURCE
SOURCE #updatePrinterSettingsFreightSlip
#protected void updatePrinterSettingsFreightSlip(container _printerSettings)
#{
# printerSettingsFreightSlip = _printerSettings;
#}
ENDSOURCE
SOURCE #updatePrinterSettingsShippingLabel
#protected void updatePrinterSettingsShippingLabel(container _printerSettings)
#{
# printerSettingsShippingLabel = _printerSettings;
#}
ENDSOURCE
SOURCE #updateQueryAndChooseLines
#///
#/// Executes methods updateQueryBuild() and chooseLines() on the server side to reduce the interaction between tiers.
#///
#///
#/// Parameter of the chooseLines() method
#///
#///
#/// Parameter of the chooseLines() method
#///
#///
#/// SalesEditLines form executes updateQueryBuild() and chooseLines() methods on SalesParmTable write event. To minimize calls between tiers, this action is moved to the server side via this proxy method.
#/// The method calls for the server static function updateQueryAndChooseLinesOnServer to execute given methods using server instance of the SalesFormLetter class.
#///
#void updateQueryAndChooseLines(SalesParmTable _salesParmTable = null, boolean _directDeliveryUpdate = false)
#{
# container packedClass;
# ;
#
# packedClass = SalesFormLetter::execUpdateQueryAndChooseLinesOnServer(this.documentStatus(), this.parmId(), this.pack(),
# _salesParmTable,
# _directDeliveryUpdate);
#
# this.unpack(packedClass);
#}
ENDSOURCE
SOURCE #updateQueryBuild
#void updateQueryBuild()
#{
# SalesTable localSalesTable;
# int noSelected;
# container salesRecordContainer;
# Map mapSalesRecord;
# MapEnumerator mapSalesRecordEnumerator;
# ;
# #query
#
# if (salesParmUpdate.LateSelection && salesParmUpdate.LateSelectionQuery != connull())
# {
# chooseLines = new SysQueryRun(salesParmUpdate.LateSelectionQuery);
# return;
# }
#
# this.initQueryBuild();
#
# if (! callerFormDataSource || this.createFromLines())
# {
# if (interCompanyMap)
# {
# mapSalesRecordEnumerator = interCompanyMap.getEnumerator();
#
# while (mapSalesRecordEnumerator.moveNext())
# {
# localSalesTable = mapSalesRecordEnumerator.currentValue();
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, SalesId)).value(queryValue(localSalesTable.SalesId));
# noSelected++;
# }
#
# this.callerFormDataSource(null);
#
# if (noSelected > 1)
# this.defaultGiroType(NoYes::Yes);
# else
# this.defaultGiroType(NoYes::No);
# }
# else
# {
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, SalesId));
#
# if (this.invoiceAccountInQuery())
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, InvoiceAccount));
#
# if (this.custAccountInQuery())
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, CustAccount));
#
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, SalesPoolId));
#
# if (salesTable)
# {
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).rangeField(fieldnum(SalesTable, SalesId)).value(queryValue(salesTable.SalesId));
#
# if (this.invoiceAccountInQuery())
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).rangeField(fieldnum(SalesTable, InvoiceAccount)).value(queryValue(salesTable.InvoiceAccount));
#
# if (this.custAccountInQuery())
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).rangeField(fieldnum(SalesTable, CustAccount)).value(queryValue(salesTable.CustAccount));
#
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).rangeField(fieldnum(SalesTable, SalesPoolId)).value(queryValue(salesTable.SalesPoolId));
# }
# }
# }
# else
# {
# setprefix("@SYS25781");
# salesRecordContainer = FormLetter::getFormRecord(callerFormDataSource);
# if (salesRecordContainer)
# {
# mapSalesRecord = Map::create(salesRecordContainer);
# mapSalesRecordEnumerator = mapSalesRecord.getEnumerator();
#
# while (mapSalesRecordEnumerator.moveNext())
# {
# localSalesTable = mapSalesRecordEnumerator.currentValue();
# if (!this.mayJournalBePosted(localSalesTable))
# {
# info(strfmt("@SYS62710",localSalesTable.SalesType,localSalesTable.SalesId));
# continue;
# }
#
# chooseLines.query().dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, SalesId)).value(queryValue(localSalesTable.SalesId));
# noSelected++;
# }
# }
# this.callerFormDataSource(null);
#
# if (noSelected > 1)
# this.defaultGiroType(NoYes::Yes);
# else
# this.defaultGiroType(NoYes::No);
# }
#
# chooseLines.query().dataSourceTable(tablenum(SalesLine)).addRange(fieldnum(SalesLine, Blocked)).value(queryValue(NoYes::No));
# chooseLines.query().dataSourceTable(tablenum(SalesLine)).addRange(fieldnum(SalesLine, ConfirmedDlv));
#
# chooseLines.query().dataSourceTable(tablenum(SalesLine)).addSortField(fieldnum(SalesLine, SalesId));
# chooseLines.query().dataSourceTable(tablenum(SalesLine)).addSortField(fieldnum(SalesLine, LineNum));
#
# if (localSalesTable.inventSiteActive())
# {
# chooseLines.query().dataSourceTable(tablenum(InventDim)).addRange(fieldnum(InventDim, InventSiteId));
# }
#
# chooseLines.query().interactive(showQueryForm);
#
# chooseLines.literals(#queryForcePlaceholders);
#}
#
ENDSOURCE
SOURCE #updateSalesShippingStat
#protected void updateSalesShippingStat(SalesParmTable _salesParmTable)
#{
#}
ENDSOURCE
SOURCE #updateSalesType
#protected void updateSalesType()
#{
#}
ENDSOURCE
SOURCE #updateSumSalesId
#protected void updateSumSalesId()
#{
# SalesTable _salesTable;
# ;
#
# if (SalesTable::exist(salesParmLine.OrigSalesId))
# {
# ttsbegin;
#
# _salesTable = salesParmLine.salesTable(true);
#
# _salesTable.updateBackStatus();
# _salesTable.write();
#
# ttscommit;
# }
#}
#
ENDSOURCE
SOURCE #useBillOfLading
#protected boolean useBillOfLading()
#{
# return false;
#}
ENDSOURCE
SOURCE #useShippingStat
#boolean useShippingStat()
#{
# return useShippingStat;
#}
ENDSOURCE
SOURCE #validate
#///
#/// Validates if it is OK to continue.
#///
#///
#/// true if the ok to continue; otherwise, false.
#///
#///
#/// The validate method is used for validating if it is ok to close the sales posting form, when posting sales orders.
#///
#boolean validate()
#{;
#
#// Validate header
# if (! this.checkSumBy())
# return false;
#
# if (! this.checkSumNum())
# return false;
#
# if (! this.checkSalesType())
# return false;
#
# if (! this.checkLateSelection())
# return false;
#
# if (! this.checkInterCompany())
# return false;
#
# if (! this.checkSalesLinesChanged())
# return false;
#
# if (validateAll)
# {
# if (! salesParmUpdate.Proforma && ! printFormLetter)
# {
# if (! this.checkifWMSorder() && Box::okCancel("@SYS28077",DialogButton::Cancel) == DialogButton::Cancel)
# return checkFailed("@SYS21533");
# }
#
# if (printFormLetter && new PrintJobSettings(printerSettingsFormletter, true).getTarget() == PrintMedium::Screen &&
# (! salesParmUpdate.Proforma) && (!usePrintManagement))
# {
# if (Box::yesNo(strfmt("@SYS105044", strlwr(enum2str(this.documentStatus()))), DialogButton::No) == DialogButton::No)
# return checkFailed("@SYS21533");
# }
# }
#
#// Validate lines
# if (! printFormLetter && salesParmUpdate.Proforma && !salesParmUpdate.LateSelection)
# {
# info("@SYS78888");
# return checkFailed("@SYS21533");
# }
#
# if (this.giro() && ! giroAllSame && !salesParmUpdate.LateSelection)
# {
# if (Box::okCancel("@SYS58570", DialogButton::Cancel) == DialogButton::Cancel)
# return false;
# }
#
# return super();
#}
#
ENDSOURCE
SOURCE #voidCreditCardPreauthorize
#///
#/// Void the credit card preauthorization for the sales order.
#///
#private void voidCreditCardPreauthorize()
#{
# CreditCardAuthTrans creditCardAuthTrans;
# ;
#
# if (salesTable.CreditCardCustRefId != 0 &&
# salesTable.payment().CreditCardPaymentType == CreditCardPaymentType::CreditCard &&
# Global::isConfigurationkeyEnabled(configurationkeynum(CreditCard)))
# {
# creditCardAuthTrans = CreditCardAuthTrans::findValidPreApproval(salesTable.SalesId);
# if (creditCardAuthTrans != null)
# {
# CreditCardProcess::doVoidAuth(creditCardAuthTrans);
# }
# }
#}
ENDSOURCE
SOURCE #WMSArrival_ds
#///
#/// Sets and returns the WMSArrival data source.
#///
#///
#/// A FormDataScource objet.
#///
#///
#/// A FormDataScource objet.
#///
#///
#/// Basically this a parm method used to set the WMSArrival data source when Sales packing slips are
#/// generated based on Arrival journal entries.
#///
#protected FormDataSource wmsArrival_ds(FormDataSource _wmsArrival_ds = wmsArrival_ds)
#{
# wmsArrival_ds = _wmsArrival_ds;
# return wmsArrival_ds;
#}
#
ENDSOURCE
SOURCE #WMSShipment_ds
#public FormDataSource wmsShipment_ds(FormDataSource _wmsShipment_ds = wmsShipment_ds)
#{
# wmsShipment_ds = _wmsShipment_ds;
# return wmsShipment_ds;
#}
ENDSOURCE
SOURCE #writebackorderLines
#protected void writeBackorderLines(SalesLine _salesLine)
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #writeJournalLine
#protected void writeJournalLine()
#{;
# lineDeliveryAddress = salesParmTable.DeliveryAddress ? salesParmTable.DeliveryAddress
# : salesLine.deliveryAddress();
# lineDeliveryName = salesParmTable.DeliveryName ? salesParmTable.DeliveryName
# : salesLine.deliveryName();
# lineDlvMode = salesParmTable.DlvMode ? salesParmTable.DlvMode
# : (salesLine.DlvMode ? salesLine.DlvMode : salesLine.salesTable().DlvMode);
#
# lineInventSiteId = salesParmTable.InventSiteId ? salesParmTable.InventSiteId : '';
#
# lineDeliveryStreet = salesLine.DeliveryStreet;
# lineDeliveryZipCode = salesLine.DeliveryZipCode;
# lineDeliveryCity = salesLine.DeliveryCity;
# lineDeliveryCounty = salesLine.DeliveryCounty;
# lineDeliveryState = salesLine.DeliveryState;
# lineDeliveryCountryRegionId = salesLine.DeliveryCountryRegionId;
#
# lineTPAddress = salesLine.tpAddress() ? salesLine.tpAddress() : salesTable.tpAddress();
# lineCarrierId = salesLine.ShipCarrierId ? salesLine.ShipCarrierId : salesTable.ShipCarrierId;
# lineCarrierAccount = salesLine.ShipCarrierAccount ? salesLine.ShipCarrierAccount : salesTable.ShipCarrierAccount;
#}
#
ENDSOURCE
SOURCE #callPrinterSettingsCODLabel
#///
#/// Allows the user to modify the printer settings for COD labels using the standard print job settings dialog.
#///
#///
#/// The SalesFormLetter class where the printer settings for COD labels is being modified.
#///
#///
#/// true if the settings were modified; otherwise, false.
#///
#///
#/// The callPrinterSettingsFormLetter method is static so it is possible to select AOS printers. Selecting AOS printers requires that the SysPrintForm is called from server.
#///
#server static boolean callPrinterSettingsCODLabel(SalesFormLetter _salesFormLetter)
#{
# PrintJobSettings printJobSettings;
# boolean ok = true;
# ;
#
# printJobSettings = new PrintJobSettings(_salesFormLetter.printerSettingsCODLabel());
# ok = printJobSettings.printerSettings(formstr(SysPrintForm));
# _salesFormLetter.updatePrinterSettingsCODLabel(printJobSettings.packPrintJobSettings());
#
# return ok;
#}
ENDSOURCE
SOURCE #callPrintersettingsFormletter
#///
#/// Allows the user to modify the printer settings using the standard print job settings dialog.
#///
#///
#/// The SalesFormLetter class where the printer settings is being modified.
#///
#///
#/// Indicates if it is the printer settings for original or copy that is beeing modified.
#///
#///
#/// true if the settings were modified; otherwise, false.
#///
#///
#/// The callPrinterSettingsFormLetter method is static so it is possible to select AOS printers. Selecting AOS printers requires that the SysPrintForm is called from server.
#///
#server static boolean callPrinterSettingsFormletter(SalesFormLetter _salesFormLetter, PrintSetupOriginalCopy _originalCopy = PrintSetupOriginalCopy::Original)
#{
# PrintJobSettings printJobSettings;
# boolean ok = true;
# ;
# printJobSettings = new PrintJobSettings(_salesFormLetter.printerSettingsFormletter(_originalCopy));
# ok = printJobSettings.printerSettings(formstr(SysPrintForm));
# _salesFormLetter.updatePrinterSettingsFormLetter(printJobSettings.packPrintJobSettings(),_originalCopy);
#
# return ok;
#}
ENDSOURCE
SOURCE #callPrinterSettingsFreightSlip
#///
#/// Allows the user to modify the printer settings for freight slip using the standard print job settings dialog.
#///
#///
#/// The SalesFormLetter class where the printer settings for freight slip is being modified.
#///
#///
#/// true if the settings were modified; otherwise, false.
#///
#///
#/// The callPrinterSettingsFormLetter method is static so it is possible to select AOS printers. Selecting AOS printers requires that the SysPrintForm is called from server.
#///
#server static boolean callPrinterSettingsFreightSlip(SalesFormLetter _salesFormLetter)
#{
# PrintJobSettings printJobSettings;
# boolean ok = true;
# ;
#
# printJobSettings = new PrintJobSettings(_salesFormLetter.printerSettingsFreightSlip());
# ok = printJobSettings.printerSettings(formstr(SysPrintForm));
# _salesFormLetter.updatePrinterSettingsFreightSlip(printJobSettings.packPrintJobSettings());
#
# return ok;
#}
ENDSOURCE
SOURCE #callPrinterSettingsShippingLabel
#///
#/// Allows the user to modify the printer settings for shipping labels using the standard print job settings dialog.
#///
#///
#/// The SalesFormLetter class where the printer settings for shipping labels is being modified.
#///
#///
#/// true if the settings were modified; otherwise, false.
#///
#///
#/// The callPrinterSettingsFormLetter method is static so it is possible to select AOS printers. Selecting AOS printers requires that the SysPrintForm is called from server.
#///
#server static boolean callPrinterSettingsShippingLabel(SalesFormLetter _salesFormLetter)
#{
# PrintJobSettings printJobSettings;
# boolean ok = true;
# ;
#
# printJobSettings = new PrintJobSettings(_salesFormLetter.printerSettingsShippingLabel());
# ok = printJobSettings.printerSettings(formstr(SysPrintForm));
# _salesFormLetter.updatePrinterSettingsShippingLabel(printJobSettings.packPrintJobSettings());
#
# return ok;
#}
ENDSOURCE
SOURCE #checkParmTable
#server static container checkParmTable(Num parmId,
# boolean custAccountInQuery,
# boolean invoiceAccountInQuery)
#{
# Counter numOfAccounts;
# Counter numOfCurrency;
# SalesParmTable salesParmT;
# ;
#
# numOfAccounts = 0;
# numOfCurrency = 0;
#
# if (custAccountInQuery)
# {
# while select salesParmT
# group by CustAccount
# where salesParmT.ParmId == parmId
# {
# numOfAccounts += 1;
# }
# }
#
# if (invoiceAccountInQuery)
# {
# while select salesParmT
# group by InvoiceAccount
# where salesParmT.ParmId == parmId
# {
# numOfAccounts += 1;
# }
# }
#
# while select salesParmT
# group by CurrencyCode
# where salesParmT.ParmId == parmId
# {
# numOfCurrency += 1;
# }
#
# return [numOfAccounts, numOfCurrency];
#}
#
ENDSOURCE
SOURCE #construct
#server static SalesFormLetter construct(DocumentStatus document,
# boolean getParmId = true)
#{
# switch(document)
# {
# case DocumentStatus::Confirmation : return new SalesFormLetter_Confirm (getParmId);
# case DocumentStatus::PickingList : return SalesFormLetter_PickingList::construct(getParmId);
# case DocumentStatus::PackingSlip : return new SalesFormLetter_PackingSlip (getParmId);
# case DocumentStatus::ProjectPackingSlip : return new SalesFormLetter_PackingSlipProject(getParmId);
# case DocumentStatus::Invoice : return new SalesFormLetter_Invoice (getParmId);
# case DocumentStatus::ProjectInvoice : return new SalesFormLetter_InvoiceProject (getParmId);
# case DocumentStatus::FreeTextInvoice : return new SalesFormLetter_FreeText (getParmId);
#
# default : throw error(strfmt("@SYS19306",funcname()));
# }
#
# throw error(strfmt("@SYS19306",funcname()));
#}
ENDSOURCE
SOURCE #constructFromCache
#server static SalesFormLetter constructFromCache(DocumentStatus documentStatus, ParmId parmId)
#{
# SysGlobalCache cache = classfactory.globalCache();
# ;
#
# if (cache.isSet(classstr(SalesFormLetter), parmId))
# {
# return cache.get(classstr(SalesFormLetter), parmId);
# }
# else
# {
# return SalesFormLetter::construct(documentStatus, false);
# }
#
# throw error(strfmt("@SYS19306",funcname()));
#}
ENDSOURCE
SOURCE #execDeleteGiroAndInitQueryOnServer
#protected server static container execDeleteGiroAndInitQueryOnServer(DocumentStatus documentStatus, ParmId parmId, container packedClass)
#{
# SalesFormLetter salesFormLetter = SalesFormLetter::constructFromCache(documentStatus, parmId);
# ;
#
# salesFormLetter.unpack(packedClass);
#
# salesFormLetter.deleteGiro();
# salesFormLetter.initLinesQuery();
#
# return salesFormLetter.pack();
#}
ENDSOURCE
SOURCE #execInitLinesQueryOnServer
#protected server static container execInitLinesQueryOnServer(DocumentStatus documentStatus, ParmId parmId,
# container packedClass,
# container packedChooseLines)
#{
# SalesFormLetter salesFormLetter = SalesFormLetter::constructFromCache(documentStatus, parmId);
# ;
#
# salesFormLetter.unpack(packedClass);
# if (packedChooseLines != connull())
# {
# salesFormLetter.chooseLinesQuery(new SysQueryRun(packedChooseLines));
# }
#
# salesFormLetter.initLinesQuery();
#
# return [salesFormLetter.pack(), salesFormLetter.chooseLinesQuery().pack()];
#}
ENDSOURCE
SOURCE #execReArrangeOnServer
#protected server static container execReArrangeOnServer(DocumentStatus documentStatus, ParmId parmId, container packedClass, boolean validate)
#{
# SalesFormLetter salesFormLetter = SalesFormLetter::constructFromCache(documentStatus, parmId);
# boolean result;
# ;
#
# salesFormLetter.unpack(packedClass);
#
# salesFormLetter.validateAll(false);
# result = salesFormLetter.reArrange(validate);
# salesFormLetter.validateAll(true);
#
# return [result, salesFormLetter.pack()];
#}
ENDSOURCE
SOURCE #execReSelectOnServer
#protected server static container execReSelectOnServer(DocumentStatus documentStatus, ParmId parmId, container packedClass,
# SalesUpdate _salesUpdate,
# NoYes _creditRemaining)
#{
# SalesFormLetter salesFormLetter = SalesFormLetter::constructFromCache(documentStatus, parmId);
# ;
#
# salesFormLetter.unpack(packedClass);
#
# salesFormLetter.reSelect(_salesUpdate, _creditRemaining);
#
# return salesFormLetter.pack();
#}
ENDSOURCE
SOURCE #execUpdateQueryAndChooseLinesOnServer
#protected server static container execUpdateQueryAndChooseLinesOnServer(DocumentStatus documentStatus,
# ParmId parmId,
# container packedClass,
# SalesParmTable _salesParmTable,
# boolean _directDeliveryUpdate)
#{
# SalesFormLetter salesFormLetter = SalesFormLetter::constructFromCache(documentStatus, parmId);
# ;
#
# salesFormLetter.unpack(packedClass);
#
# salesFormLetter.updateQueryBuild();
# salesFormLetter.chooseLines(_salesParmTable, _directDeliveryUpdate);
#
# return salesFormLetter.pack();
#}
ENDSOURCE
SOURCE #getPrinterSettingsFormletter
#static container getPrinterSettingsFormletter(DocumentStatus document, PrintSetupOriginalCopy _originalCopy = PrintSetupOriginalCopy::Original)
#{
# SalesFormLetter salesFormLetterPrint;
# ;
#
# salesFormLetterPrint = SalesFormLetter::construct(document);
# salesFormLetterPrint.getLast();
#
# return salesFormLetterPrint.printerSettingsFormletter(_originalCopy);
#}
ENDSOURCE
SOURCE #main
#static void main(Args args)
#{
# Common record;
# int parmEnum;
# WMSShipmentOption wmsShipmentOption;
# boolean parmSkipPrompt;
# Object callerForm;
# str callerFormName;
# str isProforma;
# FormDataSource recordDataSource;
#
# boolean formHasInterCompanyRefreshCacheMethod;
#
# container cachedArgs;
# ;
#
# if (! args)
# throw error("@SYS25407");
#
# record = args.record();
# parmEnum = args.parmEnum();
# callerForm = args.caller();
#
# parmSkipPrompt = false;
# switch(parmEnum)
# {
# case DocumentStatus::PackingSlip:
# if (args.parmObject() && SysDictClass::is(args.parmObject(), classnum(WMSShipmentOption)))
# {
# wmsShipmentOption = args.parmObject();
# parmSkipPrompt = (wmsShipmentOption.parmPackAllQuantitiesAndPrint() == NoYes::Yes);
# }
# break;
#
# default :
# break;
# }
#
# if (callerForm)
# callerFormName = args.caller().name();
# isProforma = args.parm();
# if (record)
# recordDataSource = args.record().dataSource();
#
# formHasInterCompanyRefreshCacheMethod = formHasMethod(callerForm,identifierstr(interCompanyRefreshCache));
#
# cachedArgs = [#CachedArgsList];
#
# SalesFormLetter::mainOnServer(cachedArgs, record, callerForm, recordDataSource);
#}
#
ENDSOURCE
SOURCE #mainOnServer
#protected server static void mainOnServer(container cachedArgs, Common record, Object callerForm, FormDataSource recordDataSource)
#{
# SalesFormLetter salesFormLetter;
#
# SalesTable salesTable;
# SalesLine salesLine;
# SalesParmTable salesParmTable;
# SalesParmTable salesParmTableNew;
# WMSShipment wmsShipment;
# Object callerFormDataSource;
#
# boolean recordExists;
# boolean doExecuteQuery;
#
# //Cached args
# int parmEnum;
# str callerFormName;
# str isProforma;
# boolean formHasInterCompanyRefreshCacheMethod;
# boolean parmSkipPrompt;
#
# ParmId parmId;
#
# dataAreaId curDataArea = curext();
#
# SysGlobalCache cache = classfactory.globalCache();
# ;
#
# if (cachedArgs == connull())
# throw error("@SYS25407");
#
# [#CachedArgsList] = cachedArgs;
#
# salesFormLetter = SalesFormLetter::construct(parmEnum);
# parmId = salesFormLetter.parmId();
#
# salesFormLetter.getLast();
# salesFormLetter.resetParmListCommonCS();
#
# salesFormLetter.parmId(parmId);
# salesFormLetter.transDate(systemdateget());
#
# if(CustParameters::find().SalesCycle)
# {
# salesFormLetter.parmSalesPurchCycleAction(SalesPurchCycle::salesPurchCycleAction(parmEnum));
# }
#
# if (record)
# {
# salesFormLetter.allowEmptyTable(salesFormLetter.initAllowEmptyTable(true));
# if (!salesFormLetter.checkCallerDataSource(record.TableId, recordDataSource))
# {
# return;
# }
#
# switch(record.TableId)
# {
# case tablenum(SalesTable) : salesTable = record;
# salesFormLetter.initParmSalesTable(salesTable);
# callerFormDataSource = recordDataSource;
# salesFormLetter.callerFormDataSource(callerFormDataSource);
# break;
#
# case tablenum(SalesLine) : salesLine = record;
# salesFormLetter.initParmSalesTable(salesLine.salesTable());
# callerFormDataSource = recordDataSource;
# salesFormLetter.callerFormDataSource(callerFormDataSource);
# salesFormLetter.createFromLines(true);
# break;
#
# case tablenum(WMSShipment) : wmsShipment = record;
# salesFormLetter.parmShipmentId(wmsShipment.ShipmentId);
# salesFormLetter.wmsShipment_ds(recordDataSource);
# break;
#
# case tablenum(SalesParmTable) : salesParmTable = record;
# callerFormDataSource = recordDataSource;
# salesParmTable.transferToUpdate(parmId);
# salesFormLetter.createFromHistory(true);
# break;
# case tablenum(WMSJournalTable): salesFormLetter.wmsArrival_ds(recordDataSource);
# break;
#
#
# }
#
# salesFormLetter.multiForm(true);
# }
#
#
# if (callerForm)
# {
# switch (callerFormName)
# {
# case formstr(SalesTable) :
# case formstr(SalesTableListPage) :
# if (isProforma)
# {
# salesFormLetter.proforma(true);
# salesFormLetter.enableUpdateNowField(false);
# }
# else
# {
# salesFormLetter.proforma(false);
# salesFormLetter.enableUpdateNowField(true);
# }
# break;
#
# case formstr(WMSShipment) :
# salesFormLetter.resetProformaUponPhysicalUpdatable();
# salesFormLetter.enableUpdateNowField(!salesFormLetter.proforma());
# salesFormLetter.printFormLetter(true);
# salesFormLetter.parmSkipPrompt(parmSkipPrompt);
# break;
#
# case formstr(SalesReleaseOrderPicking) :
# salesFormLetter.lockSalesUpdateField(true);
# salesFormLetter.setParmSalesUpdate(SalesUpdate::DeliverNow);
# break;
#
# case formstr(ReturnTable) :
# case formstr(WMSJournalTable) :
# salesFormLetter.lockSalesUpdateField(true);
# salesFormLetter.setParmSalesUpdate(SalesUpdate::All);
# break;
#
# default :
# salesFormLetter.enableUpdateNowField(true);
# salesFormLetter.lockSalesUpdateField(false);
# }
# }
# else
# {
# salesFormLetter.enableUpdateNowField(true);
# salesFormLetter.lockSalesUpdateField(false);
# }
#
# //Save object reference to global cache
# cache.set(classstr(SalesFormLetter), parmId, salesFormLetter);
#
# salesFormLetter.prePromptInit();
# if (salesFormLetter.prompt())
# {
# salesFormLetter.run();
# salesFormLetter.runShipCarrier();
#
# if (callerForm && formHasInterCompanyRefreshCacheMethod)
# {
# callerForm.interCompanyRefreshCache();
# }
#
# if (salesTable && callerFormDataSource)
# {
# recordExists = SalesTable::exist(salesTable.SalesId);
# doExecuteQuery = (salesFormLetter.numberOfRecords() > 1);
#
# SalesFormLetter::updateCallerDataSource(callerFormDataSource, false, recordExists, doExecuteQuery, null);
# }
#
# if (salesLine && callerFormDataSource)
# {
# recordExists = SalesLine::findRecId(salesLine.RecId).RecId;
# doExecuteQuery = (salesFormLetter.numberOfRecords() > 1);
#
# SalesFormLetter::updateCallerDataSource(callerFormDataSource, false, recordExists, doExecuteQuery, null);
# }
# if (salesParmTable && callerFormDataSource)
# {
# salesParmTableNew = SalesParmTable::find(parmId, salesParmTable.TableRefId);
# doExecuteQuery = (salesFormLetter.numberOfRecords() > 1);
#
# SalesFormLetter::updateCallerDataSource(callerFormDataSource, true, recordExists, doExecuteQuery, salesParmTableNew);
# }
# }
#
# //Delete saved object reference from the global cache
# if (cache.isSet(classstr(SalesFormLetter), parmId))
# cache.remove(classstr(SalesFormLetter), parmId);
#}
#
ENDSOURCE
SOURCE #newFromPurchFormLetter_Invoice
#static SalesFormLetter newFromPurchFormLetter_Invoice(PurchFormLetter_Invoice _purchFormLetter_Invoice,
# DocumentStatus _documentStatus)
#{
# SalesFormLetter salesFormLetter;
# ParmId parmId;
# ;
#
# salesFormLetter = SalesFormLetter::construct(_documentStatus);
# parmId = salesFormLetter.parmId();
#
# salesFormLetter.getLast();
# salesFormLetter.parmId(parmId);
# salesFormLetter.transDate(systemdateget());
# salesFormLetter.createFromLines(true);
# salesFormLetter.multiForm(true);
#
# salesFormLetter.fromJournalTransList_TableId(tablenum(VendInvoiceTrans));
# salesFormLetter.fromJournalTransList(_purchFormLetter_Invoice.journalTransList());
#
# return salesFormLetter;
#}
#
ENDSOURCE
SOURCE #newFromPurchFormLetter_PackingSlip
#static SalesFormLetter newFromPurchFormLetter_PackingSlip(PurchFormLetter_PackingSlip _purchFormLetter_PackingSlip,
# DocumentStatus _documentStatus)
#{
# SalesFormLetter salesFormLetter;
# ParmId parmId;
# ;
#
# salesFormLetter = SalesFormLetter::construct(_documentStatus);
# parmId = salesFormLetter.parmId();
#
# salesFormLetter.getLast();
# salesFormLetter.parmId(parmId);
# salesFormLetter.transDate(systemdateget());
# salesFormLetter.createFromLines(true);
# salesFormLetter.multiForm(true);
#
# salesFormLetter.fromJournalTransList_TableId(tablenum(VendPackingSlipTrans));
# salesFormLetter.fromJournalTransList(_purchFormLetter_PackingSlip.journalTransList());
#
# return salesFormLetter;
#}
#
ENDSOURCE
SOURCE #updateCallerDataSource
#// Updates the calling form datasource after running the RunBase.
#// Method set to client static to be run on the client to minimize the interaction between tiers.
#protected client static void updateCallerDataSource(Object callerFormDataSource,
# boolean isSalesParmTable,
# boolean recordExists,
# boolean doExecuteQuery,
# SalesParmTable salesParmTableNew)
#{
# ;
#
# if (isSalesParmTable)
# {
# if (salesParmTableNew)
# {
# if (doExecuteQuery)
# {
# callerFormDataSource.executeQuery();
# }
# else
# {
# callerFormDataSource.reSearch();
# callerFormDataSource.findRecord(salesParmTableNew);
# }
# }
# else
# {
# callerFormDataSource.reSearch();
# }
# }
# else
# {
# if (recordExists)
# {
# if (doExecuteQuery)
# {
# callerFormDataSource.executeQuery();
# }
# else
# {
# callerFormDataSource.reRead();
# callerFormDataSource.reFresh();
# callerFormDataSource.editSales();
# callerFormDataSource.reReadLines();
# callerFormDataSource.active();
# }
# }
# else
# {
# callerFormDataSource.reSearch();
# }
# }
#}
#
ENDSOURCE
ENDMETHODS
ENDCLASS
***Element: PRN
; Microsoft Dynamics AX Project : CGranProject unloaded
; --------------------------------------------------------------------------------
PROJECTVERSION 2
PROJECT #CGranProject
SHARED
PROPERTIES
Name #CGranProject
ENDPROPERTIES
PROJECTCLASS ProjectNode
GROUP #DataDictionary
PROPERTIES
Name #DataDictionary
ProjectGroupType #DataDictionary
GroupMask #
PreventEditProperties #No
ENDPROPERTIES
GROUP #BaseEnums
PROPERTIES
Name #BaseEnums
ProjectGroupType #BaseEnums
GroupMask #
PreventEditProperties #No
ENDPROPERTIES
BEGINNODE
FILETYPE 0
UTILTYPE 40
UTILOBJECTID 326
NODETYPE 209
NAME #SysDimension
ENDNODE
ENDGROUP
GROUP #Tables
PROPERTIES
Name #Tables
ProjectGroupType #Tables
GroupMask #
PreventEditProperties #No
ENDPROPERTIES
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 27
NODETYPE 204
NAME #BOMVersion
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 26
NODETYPE 204
NAME #BOMTable
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 18
NODETYPE 204
NAME #BOM
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 315
NODETYPE 204
NAME #PriceDiscTable
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 175
NODETYPE 204
NAME #InventTable
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 91
NODETYPE 204
NAME #Dimensions
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 176
NODETYPE 204
NAME #InventTableModule
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 659
NODETYPE 204
NAME #InventItemLocation
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 359
NODETYPE 204
NAME #SalesLine
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 50
NODETYPE 204
NAME #CustBankAccount
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 366
NODETYPE 204
NAME #SalesTable
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 799
NODETYPE 204
NAME #LanguageTable
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 2303
NODETYPE 204
NAME #DirPartyTable
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 77
NODETYPE 204
NAME #CustTable
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 44
UTILOBJECTID 791
NODETYPE 204
NAME #TaxVATNumTable
ENDNODE
ENDGROUP
GROUP #ExtendedDataTypes
PROPERTIES
Name #ExtendedDataTypes
ProjectGroupType #ExtendedDataTypes
GroupMask #
PreventEditProperties #No
ENDPROPERTIES
BEGINNODE
FILETYPE 0
UTILTYPE 41
UTILOBJECTID 132
NODETYPE 234
NAME #Dimension
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 41
UTILOBJECTID 30001
NODETYPE 234
NAME #CGranProgram
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 41
UTILOBJECTID 30002
NODETYPE 234
NAME #CGranDepartment
ENDNODE
ENDGROUP
ENDGROUP
GROUP #Forms
PROPERTIES
Name #Forms
ProjectGroupType #Forms
GroupMask #
PreventEditProperties #No
ENDPROPERTIES
BEGINNODE
FILETYPE 0
UTILTYPE 11
UTILOBJECTID 0
NODETYPE 201
NAME #InventTable
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 11
UTILOBJECTID 0
NODETYPE 201
NAME #CGranFilterNorma19
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 11
UTILOBJECTID 0
NODETYPE 201
NAME #SalesTable
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 11
UTILOBJECTID 0
NODETYPE 201
NAME #SalesCreateOrder
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 11
UTILOBJECTID 0
NODETYPE 201
NAME #CGranCreateItem
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 11
UTILOBJECTID 0
NODETYPE 201
NAME #CustTable
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 11
UTILOBJECTID 0
NODETYPE 201
NAME #CGranCreateCust
ENDNODE
ENDGROUP
GROUP #Classes
PROPERTIES
Name #Classes
ProjectGroupType #Classes
GroupMask #
PreventEditProperties #No
ENDPROPERTIES
BEGINNODE
FILETYPE 0
UTILTYPE 45
UTILOBJECTID 532
NODETYPE 329
NAME #SalesFormLetter_PackingSlip
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 45
UTILOBJECTID 531
NODETYPE 329
NAME #SalesFormLetter_Invoice
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 45
UTILOBJECTID 524
NODETYPE 329
NAME #SalesFormLetter
ENDNODE
ENDGROUP
ENDPROJECT
***Element: END