<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1683108690985799543</id><updated>2024-09-19T10:16:38.244-07:00</updated><category term="ax 2012"/><category term="microsoft"/><category term="SysEntryPointAttribute"/><category term="services"/><category term="ax"/><category term="ax 2009"/><category term="CUSTOM SERVICES"/><category term="DYNAMICS"/><category term="dynamics ax"/><category term="CREATION"/><category term="DIRPARTY"/><category term="dirPartyPostalAddressView"/><category term="INSERT"/><category term="UPDATION"/><category term="X++"/><category term="CREATE"/><category term="CUSTOMER"/><category term="CUSTTABLE"/><category term="DIALOG"/><category term="ECORESCATEGORY"/><category term="ECORESPRODUCT"/><category term="EXCEL"/><category term="INTEGRATION"/><category term="LogisticsAddressCity"/><category term="PROSPECT"/><category term="PurchTable"/><category term="QUOTATION"/><category term="SALES QUOTE"/><category term="SALESQUOTATIONTABLE"/><category term="ax 2009 table"/><category term="contactinfo"/><category term="dirPartyContactInfo"/><category term="excel import ax"/><category term="logs in ax"/><category term="ssrs"/><category term="table list job"/><category term="tax"/><category term="AGGREMENTS"/><category term="AX 2012 ITEM CATEGORY UPLOAD"/><category term="AX 2012 MAP X++ FOR EXISTING RECORDS MAP INSERT MAP CHECK MAP LOOKUP"/><category term="AX 2012 PRODUCT RECEIPT"/><category term="AX 2012 SALES TRADE AGGREMENTS UPLOAD FROM EXCEL X++ CODE"/><category term="AX Log Files"/><category term="AX current company"/><category term="AX slow"/><category term="AX table field list"/><category term="AX table field property"/><category term="Active company AX"/><category term="CALLER CLASS"/><category term="CHECK FOR RECORDS IN MAP AX 2012"/><category term="CONFIG"/><category term="Color your dynamics environments"/><category term="Connect to an external DB from AX"/><category term="Connection with the Application Object Server could not be established."/><category term="CustInvoiceJour"/><category term="CustInvoiceTrans"/><category term="EFDOCQRCODE"/><category term="GENERATE QR CODE"/><category term="GENERATE QR CODE FROM AX"/><category term="HCM worker"/><category term="HIEARARCHY"/><category term="How to change color for Dynamics Environment"/><category term="INTEGRATIONAX 2012"/><category term="INVENTTABLE"/><category term="INVENTTABLE AND ECORESPRODUCT RELATION JOIN QUERY LINK ECORESCATEGORY"/><category term="INVENTTABLE RELATION"/><category term="ITEM CATEGORY"/><category term="ITEM CATEGORY UPDATE"/><category term="ITEMID"/><category term="MAP"/><category term="MAP EXISTS"/><category term="MAP INSERT"/><category term="MAP LOOKUP"/><category term="PRICE DISCOUNT TABLE"/><category term="PRICEDISCADMTABLE"/><category term="PRODUCT RECEIPT"/><category term="PURCHASE CATEGORY"/><category term="PURCHASE ORDER"/><category term="PURCHFORMLETTER"/><category term="PURCHFORMLETTER_PACKINGSLIP"/><category term="RECID"/><category term="SALES"/><category term="SALES ORDER CRM"/><category term="SALES QUOTE CREATION AX 2012  X++ CUSTOM WEB SERVICE"/><category term="SALESLINE"/><category term="SALESTABLE"/><category term="SALESTRANS"/><category term="SERVICE"/><category term="SQL SCHEDULING"/><category term="Sales Order"/><category term="TRADE"/><category term="UPDATE"/><category term="VIKAS"/><category term="VendPurchOrderJour"/><category term="You are not a recognized User of Microsoft Dynamics AX. Contact your system administrator for the help"/><category term="all records does not get selected in ax."/><category term="ax  user rights"/><category term="ax 2009 email"/><category term="ax 2012 ssrs report"/><category term="ax color forms"/><category term="ax color forms in different environment"/><category term="ax connection error"/><category term="ax db connection"/><category term="ax error"/><category term="ax external database connection"/><category term="ax is slow"/><category term="ax logs"/><category term="ax multiple source connection"/><category term="ax performance"/><category term="ax permissions"/><category term="backup location"/><category term="boost ax performance"/><category term="change"/><category term="color ax"/><category term="color in AX  color of form in AX"/><category term="configration key"/><category term="dynamics ax 2009"/><category term="dynamics ax 2012"/><category term="email ax"/><category term="email outlook"/><category term="emailing in ax"/><category term="find ax company"/><category term="find table by property"/><category term="hcmpersonnel"/><category term="import data in ax"/><category term="import data in excel"/><category term="importing data"/><category term="increase ax performance"/><category term="labels in ax"/><category term="multiple records selection"/><category term="network path"/><category term="number sequence"/><category term="on different patth"/><category term="qr code"/><category term="remote registry"/><category term="report"/><category term="report server"/><category term="select  records in ax"/><category term="select all records in ax"/><category term="select multiple record"/><category term="select multiple records in ax"/><category term="sql backup"/><category term="sql schedule"/><category term="system"/><category term="table by configuration"/><category term="table property"/><category term="tables"/><category term="tables in AX 2009"/><category term="troubleshoot"/><category term="with date"/><category term="x++ code"/><title type='text'>Dynamics AX EP</title><subtitle type='html'>This blog is for all the Dynamics AX EP developers to share their opinion or views on the posts.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-5519677445199588069</id><published>2015-10-24T04:15:00.002-07:00</published><updated>2015-10-24T04:15:55.324-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="backup location"/><category scheme="http://www.blogger.com/atom/ns#" term="on different patth"/><category scheme="http://www.blogger.com/atom/ns#" term="sql backup"/><category scheme="http://www.blogger.com/atom/ns#" term="sql schedule"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SCHEDULING"/><category scheme="http://www.blogger.com/atom/ns#" term="with date"/><title type='text'>SQL CODE TO SCHEDULING SQL BACKUP SCHEDULING</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #0c343d; font-size: large;&quot;&gt;SQL CODE TO SCHEDULING SQL BACKUP SCHEDULING&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #0c343d; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;vikas mehta&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
DECLARE @FOLDERPATH VARCHAR(500)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
DECLARE @FOLDERPATHWITHNAME VARCHAR(500)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Declare @NAME Varchar(200)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Declare @DATE Varchar(200)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Declare @TIME Varchar(200)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Declare @TIME1 Varchar(200)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
--JUST NEED TO UPDATE BELOW PATH FOR DB BACKUP LOCATION&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Set @FOLDERPATH = &#39;\\path\&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
select @TIME1 = Convert(time, getdate())&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
select @DATE = (select convert(varchar,getDate(),112))&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
select @TIME = ((select Convert(Varchar, DATEPART(mm,
@TIME1))) + (Select CONVERT(Varchar, DATEPART(ss, @TIME1))))&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Select @NAME = ax + &#39;_&#39; + @DATE --+ @TIME&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Set @FOLDERPATHWITHNAME = @FOLDERPATH + @NAME + &#39;.bak&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
BACKUP DATABASE [ax] TO DISK = @FOLDERPATHWITHNAME WITH
NOFORMAT, NOINIT, NAME = @NAME, SKIP, NOREWIND, NOUNLOAD, STATS = 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
**********script*******************************&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
USE [msdb]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
/****** Object:&amp;nbsp; Job
[Ax Prod Backup Schedule]&amp;nbsp;&amp;nbsp;&amp;nbsp; Script Date:
6/12/2015 3:17:03 PM ******/&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
BEGIN TRANSACTION&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
DECLARE @ReturnCode INT&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
SELECT @ReturnCode = 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
/****** Object:&amp;nbsp;
JobCategory [[Uncategorized (Local)]]&amp;nbsp;&amp;nbsp;&amp;nbsp;
Script Date: 6/12/2015 3:17:03 PM ******/&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE
name=N&#39;[Uncategorized (Local)]&#39; AND category_class=1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
EXEC @ReturnCode = msdb.dbo.sp_add_category @class=N&#39;JOB&#39;,
@type=N&#39;LOCAL&#39;, @name=N&#39;[Uncategorized (Local)]&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO
QuitWithRollback&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
END&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
DECLARE @jobId BINARY(16)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
EXEC @ReturnCode =&amp;nbsp;
msdb.dbo.sp_add_job @job_name=N&#39;Ax Prod Backup Schedule&#39;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @enabled=1,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @notify_level_eventlog=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @notify_level_email=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @notify_level_netsend=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @notify_level_page=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @delete_level=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @description=N&#39;No
description available.&#39;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @category_name=N&#39;[Uncategorized
(Local)]&#39;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @owner_login_name=N&#39;vikasvikas\axaosadmin&#39;,
@job_id = @jobId OUTPUT&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO
QuitWithRollback&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
/****** Object:&amp;nbsp; Step
[Ax prod Step 1]&amp;nbsp;&amp;nbsp;&amp;nbsp; Script Date:
6/12/2015 3:17:04 PM ******/&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId,
@step_name=N&#39;Ax prod Step 1&#39;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @step_id=1,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @cmdexec_success_code=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @on_success_action=1,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @on_success_step_id=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @on_fail_action=2,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @on_fail_step_id=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @retry_attempts=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @retry_interval=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @os_run_priority=0,
@subsystem=N&#39;TSQL&#39;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @command=N&#39;DECLARE
@FOLDERPATH VARCHAR(500)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
DECLARE @FOLDERPATHWITHNAME VARCHAR(500)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Declare @NAME Varchar(200)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Declare @DATE Varchar(200)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Declare @TIME Varchar(200)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Declare @TIME1 Varchar(200)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
--JUST NEED TO UPDATE BELOW PATH FOR DB BACKUP LOCATION&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Set @FOLDERPATH = &#39;&#39;\\sql bkup\&#39;&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
select @TIME1 = Convert(time, getdate())&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
select @DATE = (select convert(varchar,getDate(),112))&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
select @TIME = ((select Convert(Varchar, DATEPART(mm,
@TIME1))) + (Select CONVERT(Varchar, DATEPART(ss, @TIME1))))&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Select @NAME = &#39;&#39;MicrosoftDynamicsAX&#39;&#39; + &#39;&#39;_&#39;&#39; + @DATE --+
@TIME&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Set @FOLDERPATHWITHNAME = @FOLDERPATH + @NAME + &#39;&#39;.bak&#39;&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
BACKUP DATABASE [MicrosoftDynamicsAX] TO DISK =
@FOLDERPATHWITHNAME WITH NOFORMAT, NOINIT, NAME = @NAME, SKIP, NOREWIND,
NOUNLOAD, STATS = 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&#39;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @database_name=N&#39;master&#39;,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @flags=0&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO
QuitWithRollback&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
EXEC @ReturnCode = msdb.dbo.sp_update_job @job_id = @jobId,
@start_step_id = 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO
QuitWithRollback&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
EXEC @ReturnCode = msdb.dbo.sp_add_jobschedule
@job_id=@jobId, @name=N&#39;AX 2012 Prod Job Schedule&#39;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @enabled=1,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @freq_type=4,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @freq_interval=1,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @freq_subday_type=1,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @freq_subday_interval=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @freq_relative_interval=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @freq_recurrence_factor=0,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @active_start_date=20150421,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @active_end_date=99991231,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @active_start_time=235900,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @active_end_time=235959,
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @schedule_uid=N&#39;cddf7f74-3c12-414c-ab66-c12b7bc4628f&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO
QuitWithRollback&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
EXEC @ReturnCode = msdb.dbo.sp_add_jobserver @job_id =
@jobId, @server_name = N&#39;(local)&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
IF (@@ERROR &amp;lt;&amp;gt; 0 OR @ReturnCode &amp;lt;&amp;gt; 0) GOTO QuitWithRollback&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
COMMIT TRANSACTION&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
GOTO EndSave&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
QuitWithRollback:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (@@TRANCOUNT
&amp;gt; 0) ROLLBACK TRANSACTION&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
EndSave:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/5519677445199588069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/sql-code-to-scheduling-sql-backup.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/5519677445199588069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/5519677445199588069'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/sql-code-to-scheduling-sql-backup.html' title='SQL CODE TO SCHEDULING SQL BACKUP SCHEDULING'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-2826985502650243176</id><published>2015-10-24T03:43:00.000-07:00</published><updated>2015-10-24T03:43:09.202-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AGGREMENTS"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="AX 2012 SALES TRADE AGGREMENTS UPLOAD FROM EXCEL X++ CODE"/><category scheme="http://www.blogger.com/atom/ns#" term="DIALOG"/><category scheme="http://www.blogger.com/atom/ns#" term="dynamics ax"/><category scheme="http://www.blogger.com/atom/ns#" term="EXCEL"/><category scheme="http://www.blogger.com/atom/ns#" term="PRICE DISCOUNT TABLE"/><category scheme="http://www.blogger.com/atom/ns#" term="PRICEDISCADMTABLE"/><category scheme="http://www.blogger.com/atom/ns#" term="SALES"/><category scheme="http://www.blogger.com/atom/ns#" term="TRADE"/><title type='text'>AX 2012 SALES TRADE AGGREMENTS UPLOAD FROM EXCEL X++ CODE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #783f04; font-size: large;&quot;&gt;AX 2012 SALES TRADE AGGREMENTS UPLOAD FROM EXCEL X++ CODE&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #783f04; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class VIK_SalesMaster_ExcelImport
extends RunBaseBatch&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DialogField&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dialogfile;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FilenameOpen&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;localmacro.CurrentList&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileName&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;endmacro&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;dialog&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected
Object dialog()&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DialogRunbase&amp;nbsp; _dialog = super();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_dialog.caption(&quot;Sales : Trade
Aggrement Upload&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dialogfile =
_dialog.addField(&quot;FilenameOpen&quot;,&quot;Enter file path : &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dialogfile.value(fileName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return _dialog;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;getFromDialog&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public boolean
getFromDialog()&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileName = dialogfile.value();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;run&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void
run()&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelApplication excel;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelWorkbooks workbooks;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelWorkbook workbook;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelWorksheets worksheets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelWorksheet worksheet;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelCells cells;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;COMVariantType type;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int row =1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int _noofprints;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CustName name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int i,j;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//sales price upload&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;str
queryPricingMaster,itemId,existingItemIdsList,tempValue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ResultSet resultSet;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;InventTable inventTable;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AifEntityKeyList&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; keys;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DD_HI_RRP_Staging&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RRPStaging;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PricePriceDiscJournalService&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PriceDiscSvc;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PricePriceDiscJournal&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PriceDiscJour;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PricePriceDiscJournal_PriceDiscAdmTrans
PriceDiscJourAdmTrans;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PricePriceDiscJournal_InventDim&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PriceDiscJourDim;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans&amp;nbsp;&amp;nbsp; _PriceDiscAdmTrans;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//vikas&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; priceDiscAdmTable;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PriceDiscAdmTrans;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PriceDiscAdmName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscJournalName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pricediscjournalName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NumberSeq journalNum;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//sales price upload//&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;str
_relation,_accountcode,_accountselection,_itemcode,_temrelation,_unit,_curcode;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;real _from,_amtincur;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;date _todate,_fromdate;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceType _pricetype;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;itemId tempItemId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AviFiles&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysOperationProgress progress1 = new
SysOperationProgress();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //excel&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define.filename(fileName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excel =
SysExcelApplication::construct();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; workbooks =
excel.workbooks();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; workbooks.open(filename);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch
(Exception::Error)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw
error(&quot;File cannot be opened&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;workbook = workbooks.item(1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;worksheets = workbook.worksheets();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;worksheet = worksheets.itemFromNum(1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cells = worksheet.cells();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type = cells.item(row+1,
1).value().variantType();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//progress1.setCaption(&quot;Updation of
pricing master is in progress…&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//progress1.setAnimation(AviUpdate);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ttsBegin;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Select firstOnly&amp;nbsp; PriceDiscAdmName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;priceDiscAdmTable.clear();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;priceDiscAdmTable.initFromPriceDiscAdmName(PriceDiscAdmName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;journalNum&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
NumberSeq::newGetNum(SalesParameters::numRefPriceDiscJournalNum());&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pricediscjournalName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;
journalNum.num();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;priceDiscAdmTable.JournalNum =
pricediscjournalName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;priceDiscAdmTable.insert();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;while (type != COMVariantType::VT_EMPTY)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;row++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tempItemId&amp;nbsp;
= cells.item(Row,5).value().bStr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Set PriceDiscJourAdmTrans&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while select forUpdate * from
inventTable where inventTable.ItemId == tempItemId&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//
progress1.setText(strfmt(&quot;Item ID&amp;nbsp;
%1&quot;, tempItemId));&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.clear();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.JournalNum&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = pricediscjournalName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.relation&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
real2int(cells.item(Row,1).value().double()) ;//relation&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.InventDimId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &quot;Allblank&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.DisregardLeadTime
= NoYes::Yes;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.AccountCode&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
real2int(cells.item(Row,2).value().double()) ; //account code&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.AccountRelation&amp;nbsp;&amp;nbsp; = cells.item(Row,3).value().bStr();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //account relation&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.ItemCode&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
real2int(cells.item(Row,4).value().double());&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.ItemRelation&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = cells.item(Row,5).value().bStr();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //item realtaion item id&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.QuantityAmountFrom=
cells.item(Row,6).value().double();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//from quantity&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.UnitId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
cells.item(Row,7).value().bStr();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//unit id&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.Amount&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
cells.item(Row,8).value().double();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//Amount in Curr&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.Currency&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
cells.item(Row,9).value().bStr();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//currency code&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.FromDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
cells.item(Row,10).value().date();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//from date&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.ToDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
cells.item(Row,11).value().date();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//todate&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceDiscAdmTrans.insert();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;itemId=inventTable.ItemId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type = cells.item(row+1, 1).value().variantType();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ttsCommit;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excel.quit();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;main&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static
void main(Args _args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VIK_SalesMaster_ExcelImport&amp;nbsp;&amp;nbsp;&amp;nbsp; VIK_SalesMaster_ExcelImport = new VIK_SalesMaster_ExcelImport();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(VIK_SalesMaster_ExcelImport.prompt())&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VIK_SalesMaster_ExcelImport.run();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/2826985502650243176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/ax-2012-sales-trade-aggrements-upload.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/2826985502650243176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/2826985502650243176'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/ax-2012-sales-trade-aggrements-upload.html' title='AX 2012 SALES TRADE AGGREMENTS UPLOAD FROM EXCEL X++ CODE'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-5451256991643550202</id><published>2015-10-24T03:38:00.000-07:00</published><updated>2015-10-24T03:38:27.487-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AX 2012 ITEM CATEGORY UPLOAD"/><category scheme="http://www.blogger.com/atom/ns#" term="DIALOG"/><category scheme="http://www.blogger.com/atom/ns#" term="ECORESCATEGORY"/><category scheme="http://www.blogger.com/atom/ns#" term="ECORESPRODUCT"/><category scheme="http://www.blogger.com/atom/ns#" term="EXCEL"/><category scheme="http://www.blogger.com/atom/ns#" term="excel import ax"/><category scheme="http://www.blogger.com/atom/ns#" term="ITEM CATEGORY"/><category scheme="http://www.blogger.com/atom/ns#" term="ITEM CATEGORY UPDATE"/><title type='text'>DYNAMICS AX 2012 : ITEM CATEGORY UPDATE FOR ITEMS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #0c343d; font-size: large;&quot;&gt;ITEM CATEGORY UPDATE FOR ITEMS&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; METHODS&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;classDeclaration&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Vik_ItemCategory_ExcelImport
exts RunBaseBatch&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DialogField&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dialogfile;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FilenameOpen&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;localmacro.CurrentList&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileName&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;macro&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;createcategory&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public void
createcategory(Itemid _itemno,EcoResCategoryCommodityCode
_CategoryName,EcoResCategoryHierarchyName _name)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//vikas&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResDistinctProduct&amp;nbsp; ecoResDistinctProduct;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResProduct&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecoResProduct;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResProductTranslation
ecoResProductTranslation;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResProductCategory&amp;nbsp;&amp;nbsp; ecoResProductCategory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResCategory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecoResCategory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResCategoryHierarchy
ecoResCategoryHierarchy;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResCategoryTranslation&amp;nbsp;&amp;nbsp; ecoResCategoryTranslation;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//vikas&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Create Producr Category (Hierarchy)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select ecoResDistinctProduct where
ecoResDistinctProduct.DisplayProductNumber == _itemno;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Select firstOnly ecoResCategoryHierarchy
where ecoResCategoryHierarchy.Name == _name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Select firstonly ecoResProductCategory
where ecoResProductCategory.Product == ecoResDistinctProduct.RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (!ecoResProductCategory)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ttsBegin;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResProductCategory.clear();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResProductCategory.initValue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResProductCategory.CategoryHierarchy&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ecoResCategoryHierarchy.RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select * from ecoResCategory where
ecoResCategory.Name == _CategoryName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResProductCategory.Category&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= ecoResCategory.RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//ecoResProductCategory.category =
ecoResCategoryTranslation.RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResProductCategory.Product&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
ecoResDistinctProduct.RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//ecoResProductCategory.VIK_EcoResProductType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = VIK_EcoResProductType::findByProductType(_productType).RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//ecoResProductCategory.VIK_EcoResSubCategory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = VIK_EcoResSubCategory::findBySubCategory(_subCategory).RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResProductCategory.insert();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ttsCommit;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;info(strFmt(&quot;category for item %1
is created&quot;,_itemno));&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;dialog&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected
Object dialog()&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DialogRunbase&amp;nbsp; _dialog = super();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_dialog.caption(&quot;Product
Upload&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dialogfile =
_dialog.addField(&quot;FilenameOpen&quot;,&quot;Enter file path : &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dialogfile.value(fileName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return _dialog;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;getFromDialog&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public boolean
getFromDialog()&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileName = dialogfile.value();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;run&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void
run()&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelApplication excel;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelWorkbooks workbooks;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelWorkbook workbook;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelWorksheets worksheets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelWorksheet worksheet;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysExcelCells cells;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;COMVariantType type;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int row =1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int _noofprints;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResCategoryCommodityCode _CatName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResCategoryHierarchyName _Hiername;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CustName name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int i,j;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//sales price upload&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;str
queryPricingMaster,itemId,existingItemIdsList,tempValue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ResultSet resultSet;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;InventTable inventTable;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//vikas&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResProduct&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecoResProduct;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResProductTranslation
ecoResProductTranslation;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResProductCategory&amp;nbsp;&amp;nbsp; ecoResProductCategory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResCategory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecoResCategory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResCategoryHierarchy checkEcoResCatH;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResCategory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; checkEcoResCat;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//checkEcoResCatH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
EcoResCategoryHierarchy::findByName(_Hiername);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//checkEcoResCat&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
EcoResCategory::findByName(_CatName,checkEcoResCatH.RecId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//vikas&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//vikas&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//sales price upload//&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;str
_relation,_accountcode,_accountselection,_itemcode,_temrelation,_unit,_curcode;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;real _from,_amtincur;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;date _todate,_fromdate;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PriceType _pricetype;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;itemId tempItemId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;str stritemid;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AviFiles&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SysOperationProgress progress1 = new
SysOperationProgress();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //excel&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define.filename(fileName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excel =
SysExcelApplication::construct();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; workbooks =
excel.workbooks();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; workbooks.open(fileName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch
(Exception::Error)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw
error(&quot;File cannot be opened&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;workbook = workbooks.item(1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;worksheets = workbook.worksheets();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;worksheet = worksheets.itemFromNum(1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cells = worksheet.cells();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type = cells.item(row+1,
1).value().variantType();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ttsBegin;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;while (type != COMVariantType::VT_EMPTY)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;row++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tempItemId&amp;nbsp;
= cells.item(Row,1).value().bStr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;// stritemid =
cells.item(Row,1).value().bStr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select inventTable where inventTable.ItemId
== tempItemId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(inventTable)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select ecoResProduct where
ecoResProduct.DisplayProductNumber == inventTable.ItemId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select ecoResProductCategory&amp;nbsp;&amp;nbsp;&amp;nbsp; where ecoResProductCategory.product ==
ecoResProduct.RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_CatName&amp;nbsp;
= cells.item(Row,2).value().bStr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_Hiername =
cells.item(Row,3).value().bStr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;checkEcoResCatH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
EcoResCategoryHierarchy::findByName(_Hiername);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;checkEcoResCat&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
EcoResCategory::findByName(_CatName,checkEcoResCatH.RecId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(!ecoResProductCategory &amp;amp;&amp;amp;
ecoResProduct &amp;amp;&amp;amp; checkEcoResCatH &amp;amp;&amp;amp; checkEcoResCat)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.createcategory(tempItemId,_CatName,_Hiername);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if (ecoResProductCategory &amp;amp;&amp;amp;
ecoResProduct &amp;amp;&amp;amp; checkEcoResCatH &amp;amp;&amp;amp; checkEcoResCat)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.updatecategory(tempItemId,_CatName,_Hiername);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type = cells.item(row+1,
1).value().variantType();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ttsCommit;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excel.quit();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;updatecategory&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public void
updatecategory(Itemid _itemno,EcoResCategoryCommodityCode
_CategoryName,EcoResCategoryHierarchyName _name)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//vikas&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResDistinctProduct&amp;nbsp; ecoResDistinctProduct;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResProduct&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecoResProduct;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResProductTranslation ecoResProductTranslation;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResProductCategory&amp;nbsp;&amp;nbsp; ecoResProductCategory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResCategory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecoResCategory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EcoResCategoryHierarchy
ecoResCategoryHierarchy;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResCategoryTranslation&amp;nbsp;&amp;nbsp; ecoResCategoryTranslation;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//vikas&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Create Producr Category (Hierarchy)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select ecoResDistinctProduct where
ecoResDistinctProduct.DisplayProductNumber == _itemno;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Select firstOnly ecoResCategoryHierarchy
where ecoResCategoryHierarchy.Name == _name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while select forupdate
ecoResProductCategory where ecoResProductCategory.Product ==
ecoResDistinctProduct.RecId&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(ecoResProductCategory)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ttsBegin;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//ecoResProductCategory.clear();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//ecoResProductCategory.initValue();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResProductCategory.CategoryHierarchy&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ecoResCategoryHierarchy.RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select * from ecoResCategory where
ecoResCategory.Name == _CategoryName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResProductCategory.Category&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ecoResCategory.RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//ecoResProductCategory.category =
ecoResCategoryTranslation.RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResProductCategory.Product&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
ecoResDistinctProduct.RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//ecoResProductCategory.VIK_EcoResProductType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = VIK_EcoResProductType::findByProductType(_productType).RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//ecoResProductCategory.VIK_EcoResSubCategory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = VIK_EcoResSubCategory::findBySubCategory(_subCategory).RecId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ecoResProductCategory.update();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ttsCommit;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;info(strFmt(&quot;category for item %1
is updated&quot;,_itemno));&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;main&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static
void main(Args _args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Vik_ItemCategory_ExcelImport&amp;nbsp;&amp;nbsp;&amp;nbsp; Vik_ItemCategory_ExcelImport = new Vik_ItemCategory_ExcelImport();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(curext() == &quot;AHD&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(Vik_ItemCategory_ExcelImport.prompt())&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Vik_ItemCategory_ExcelImport.run();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; METHODS&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; CLASS&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
***Element:&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/5451256991643550202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/dynamics-ax-2012-item-category-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/5451256991643550202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/5451256991643550202'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/dynamics-ax-2012-item-category-update.html' title='DYNAMICS AX 2012 : ITEM CATEGORY UPDATE FOR ITEMS'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-7545851649326218691</id><published>2015-10-24T01:19:00.001-07:00</published><updated>2015-10-24T01:19:53.506-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="AX 2012 MAP X++ FOR EXISTING RECORDS MAP INSERT MAP CHECK MAP LOOKUP"/><category scheme="http://www.blogger.com/atom/ns#" term="CHECK FOR RECORDS IN MAP AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="dynamics ax"/><category scheme="http://www.blogger.com/atom/ns#" term="MAP"/><category scheme="http://www.blogger.com/atom/ns#" term="MAP EXISTS"/><category scheme="http://www.blogger.com/atom/ns#" term="MAP INSERT"/><category scheme="http://www.blogger.com/atom/ns#" term="MAP LOOKUP"/><title type='text'>AX 2012 MAP X++ FOR EXISTING RECORDS MAP INSERT MAP CHECK MAP LOOKUP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #783f04; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;AX 2012 MAP X++ FOR EXISTING RECORDS&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #783f04; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
MAP for Exist in excel upload&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
public void run()&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelApplication&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excel;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelWorkbooks&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; workbooks;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelWorkbook&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; workbook;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelWorksheets&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; worksheets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelWorksheet&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; worksheet;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelCells&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cells;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelCell&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelStyles&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;styles;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelStyle&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; estyle;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelFont&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; font;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //vikas&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ProdTable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
prodTable,prodTableRef,prodtabledate;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; InventDim&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inventDim;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;total1,total2,total3,total4,total5,total6;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelWorksheetHelper
worksheetHelper;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SysExcelRange&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; range;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ItemId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; InventOnhand&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inventonHand;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; inventDim&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inventDimRef;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;InventDimParm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inventDimParm;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; WrkCtrCapRes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
WrkCtrCapRes1,WrkCtrCapRes2,WrkCtrCapRes3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; WrkCtrTable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
wrkCtrTable1,wrkCtrTable2,wrkCtrTable3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
x,y,z,j,k,l,fordays,mapi,mapint;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; WrkCtrIdBase&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; machine;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SchedFromDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
mindate,mindateLess,mapdatefind,fordate;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SchedToDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxdate1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strdate;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; str&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dateinstring;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; TransDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; transdate;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;map = new
Map(Types::String,Types::Integer);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapintkey = new
Map(Types::Integer,Types::String);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; InventTrans&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inventTransTable;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; days;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; str itemOrginStatus;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;excel = SysExcelApplication::construct();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; workbooks =
excel.workbooks();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; workbook =
workbooks.add();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; worksheets =
workbook.worksheets();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; worksheet =
worksheets.itemFromNum(1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cells =
worksheet.cells();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; styles =
workbook.styles();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; estyle&amp;nbsp; = styles.add(&quot;Header&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; font = estyle.font();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; font.bold(true);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell = cells.item(1, 1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell.font().bold(true);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell.value(&#39;MONTH
PRODUCTION PLANNING&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //ITEM&amp;nbsp;&amp;nbsp;&amp;nbsp; PLAN&amp;nbsp;&amp;nbsp;&amp;nbsp;
OPN STK&amp;nbsp;&amp;nbsp;&amp;nbsp; BAL TO BE PRODUCED&amp;nbsp;&amp;nbsp;&amp;nbsp; MTD&amp;nbsp;&amp;nbsp;&amp;nbsp;
Operation&amp;nbsp;&amp;nbsp;&amp;nbsp; M/C&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell = cells.item(3, 1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell.value(&#39;SIZE&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell = cells.item(3, 2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell.value(&#39;TYPE&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell = cells.item(3, 3);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell.value(&#39;PLAN&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell = cells.item(3, 4);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell.value(&#39;OPN STK&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell = cells.item(3, 5);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell.value(&#39;BAL TO BE
PRODUCED&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell = cells.item(3, 6);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell.value(&#39;MTD&amp;nbsp;&amp;nbsp;&amp;nbsp; Operation&#39;);//NO OF&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell = cells.item(3, 7);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cell.value(&#39;M/C&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; row = 3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; select maxof(SchedStart)
from prodtabledate where prodtabledate.InventRefId == &#39;P000179&#39;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; maxdate1 =
prodtabledate.schedstart;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; prodtabledate.clear();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; select minof(SchedStart)
from prodtabledate where prodtabledate.InventRefId == &#39;P000179&#39;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; mindate =
prodtabledate.schedstart;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; mindateLess = mindate
-1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;days = date2num(maxdate1) - date2num(mindate);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fordays = days+10;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;
for(j=10;j&amp;lt;fordays;j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
map.insert(mindateLess+1,j);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mindateLess =
mindateLess+1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //mapintkey&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;
for(mapi=10;mapi&amp;lt;fordays;mapi++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapintkey.insert(mapi,mindateLess+1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mindateLess =
mindateLess+1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //mapdate =
2015/9/23&amp;nbsp; ...9/28/2015&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;
for(k=10;k&amp;lt;fordays;k++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell = cells.item(3,
k);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if
(Mapintkey.exists(k))&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strdate = Mapintkey.lookup(k);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dateinstring =
Mapintkey.lookup(k);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // strdate =
date2str(transdate,321,DateDay::Digits2,DateSeparator::Slash,DateMonth::Digits1or2,dateSeparator::Slash,
DateYear::Digits4);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(Mapintkey.lookup(dateinstring));&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //map.insert(&#39;2&#39;, &#39;ew&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;
//info(strFmt(&quot;%1&quot;,map.lookup(2)));&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;while select prodTable join
InventDim&amp;nbsp;&amp;nbsp; where prodTable.ProdId ==
&#39;P000179&#39; &amp;amp;&amp;amp; prodTable.InventDimId == InventDim.inventDimId&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // itemId =
prodTable.ItemId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row= row+1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell =
cells.item(row, 1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(InventDim.InventSizeId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell =
cells.item(row, 2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(InventDim.InventColorId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while select prodTableRef
join inventDimRef where prodTableRef.InventRefId == prodTable.ProdId&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //row = row+1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell =
cells.item(row, 3); //plan&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(prodTableRef.qtysched);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemId =
prodTable.ItemId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;InventDimParm.initFromInventDim(inventDimRef);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inventonHand =
inventonHand::newParameters(itemId,inventDimRef,InventDimParm);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell =
cells.item(row, 4); //&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(inventonHand.availPhysical());&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemId =
prodTable.ItemId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell =
cells.item(row, 5); //plan&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(prodTableRef.qtysched - inventonHand.availPhysical());&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //cell =
cells.item(row, 6); //plan&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//cell.value(prodTableRef.qtysched - inventonHand.availPhysical());&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell =
cells.item(row, 7); //pool&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(prodTableRef.ProdPoolId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while select
WrkCtrCapRes1 order by WrkCtrId,transdate where WrkCtrCapRes1.RefId ==
prodTableRef.ProdId &amp;amp;&amp;amp; WrkCtrCapRes1.RefType == 1 //&amp;amp;&amp;amp;
WrkCtrCapRes1.WrkCtrId == &quot;BREHM-1&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; x = 8;y =10;//z=2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
wrkCtrTable1.clear();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select
wrkCtrTable1 where wrkCtrTable1.Name == WrkCtrCapRes1.WrkCtrId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; machine =
WrkCtrCapRes1.WrkCtrId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell =
cells.item(row,8 ); //machine&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(machine);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell =
cells.item(row, 9); //actual&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(&#39;Actual&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = row
+1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell =
cells.item(row, 9); //plan&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(&#39;Plan&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if
(Map.exists(WrkCtrCapRes1.TransDate))&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapint =
Map.lookup(WrkCtrCapRes1.TransDate);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cell =
cells.item(row,mapint);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
cell.value(WrkCtrCapRes1.WrkCtrHours()*wrkCtrTable1.capacity);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;
worksheet.columns().autoFit();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; excel.visible(true);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/7545851649326218691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/ax-2012-map-x-for-existing-records-map.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/7545851649326218691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/7545851649326218691'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/ax-2012-map-x-for-existing-records-map.html' title='AX 2012 MAP X++ FOR EXISTING RECORDS MAP INSERT MAP CHECK MAP LOOKUP'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-4896186421159788635</id><published>2015-10-24T01:16:00.001-07:00</published><updated>2015-10-24T01:16:53.384-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="ECORESCATEGORY"/><category scheme="http://www.blogger.com/atom/ns#" term="ECORESPRODUCT"/><category scheme="http://www.blogger.com/atom/ns#" term="HIEARARCHY"/><category scheme="http://www.blogger.com/atom/ns#" term="INVENTTABLE"/><category scheme="http://www.blogger.com/atom/ns#" term="INVENTTABLE AND ECORESPRODUCT RELATION JOIN QUERY LINK ECORESCATEGORY"/><category scheme="http://www.blogger.com/atom/ns#" term="INVENTTABLE RELATION"/><category scheme="http://www.blogger.com/atom/ns#" term="ITEMID"/><category scheme="http://www.blogger.com/atom/ns#" term="RECID"/><category scheme="http://www.blogger.com/atom/ns#" term="ssrs"/><title type='text'>INVENTTABLE AND ECORESPRODUCT RELATION JOIN QUERY LINK ECORESCATEGORY</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #990000; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;INVENTTABLE AND ECORESPRODUCT RELATION&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #990000; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;JOIN QUERY LINK ECORESCATEGORY&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #990000; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
InventTable and ECORESPRODUCT&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
select ecorescategorygroc where ecorescategorygroc.Name ==
catgnames;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while select * from
inventTable join product where inventTable.Product == product.RecId&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
join&amp;nbsp;&amp;nbsp;&amp;nbsp; productCat&amp;nbsp; where productCat.Product&amp;nbsp; == product.RecId&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
join&amp;nbsp;&amp;nbsp;&amp;nbsp; category&amp;nbsp;&amp;nbsp;&amp;nbsp; where&amp;nbsp;&amp;nbsp;
category.RecId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ==
productCat.Category &amp;amp;&amp;amp; category.Name ==
catgnames//category.ParentCategory == ecorescategorygroc.RecId// &amp;amp;&amp;amp;
category.Name == catgnames&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;join catHierarchy&amp;nbsp;&amp;nbsp; where&amp;nbsp;&amp;nbsp;
catHierarchy.RecId&amp;nbsp; == category.CategoryHierarchy//&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;amp;&amp;amp; inventTable.itemid
like&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/4896186421159788635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/inventtable-and-ecoresproduct-relation.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/4896186421159788635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/4896186421159788635'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/inventtable-and-ecoresproduct-relation.html' title='INVENTTABLE AND ECORESPRODUCT RELATION JOIN QUERY LINK ECORESCATEGORY'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-6042194350463030334</id><published>2015-10-24T01:14:00.001-07:00</published><updated>2015-10-24T01:14:36.149-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="AX 2012 PRODUCT RECEIPT"/><category scheme="http://www.blogger.com/atom/ns#" term="CALLER CLASS"/><category scheme="http://www.blogger.com/atom/ns#" term="PRODUCT RECEIPT"/><category scheme="http://www.blogger.com/atom/ns#" term="PURCHASE CATEGORY"/><category scheme="http://www.blogger.com/atom/ns#" term="PURCHFORMLETTER"/><category scheme="http://www.blogger.com/atom/ns#" term="PURCHFORMLETTER_PACKINGSLIP"/><category scheme="http://www.blogger.com/atom/ns#" term="PurchTable"/><category scheme="http://www.blogger.com/atom/ns#" term="VIKAS"/><title type='text'>PURCHASE ORDER CATEGORY PRODUCT RECEIPT CALLER CLASS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Purchase category&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt; text-indent: -0.25in; vertical-align: middle;&quot;&gt;
&lt;!--[if !supportLists]--&gt;1.&lt;span style=&quot;font-size: 7pt; font-stretch: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;PO invoice and product
receipt&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
Changes have been done in the forms clicked ok methods of post and
close ok &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
Blow is code for product receipt &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
// po category start&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; VendPackingSlipJour&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vendPackingSlipJour;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Vik_PurchaseOrderCategory&amp;nbsp;&amp;nbsp; poCategory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
daydiff,prodreceiptcount;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; PurchTable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; purchTableLocal;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(curext() == &#39;SDS&#39;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(
classidget(purchFormLetter) == classnum(PurchFormLetter_PackingSlip))
//&amp;amp;&amp;amp; (purchTable.Vik_PurchaseCategory != Vik_PurchaseCategory::None))&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select
purchTableLocal where purchTableLocal.PurchId ==
purchFormLetter.purchTable().PurchId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select
poCategory where poCategory.Vik_PurchaseCategory == purchTableLocal.Vik_PurchaseCategory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select
count(RecId) from vendPackingSlipJour where vendPackingSlipJour.PurchId ==
purchTableLocal.PurchId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prodreceiptcount
= int642int(vendPackingSlipJour.RecId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(prodreceiptcount
&amp;gt; poCategory.DeliveryTimes)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw
error(strFmt(&quot; The Product receipt for Purchase Order %1 has exceeded for
the category %2&quot;,purchTableLocal.PurchId,purchTableLocal.Vik_PurchaseCategory));&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;//&amp;nbsp;&amp;nbsp; po category end&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
Below is code for Invoice&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
void clicked()&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // po category start&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Vik_PurchaseOrderCategory&amp;nbsp;&amp;nbsp; poCategory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
daydiff,prodreceiptcount;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; PurchTable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; purchTableLocal;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(curext() == &#39;SDS&#39;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select
purchTableLocal where purchTableLocal.PurchId ==
purchFormLetter.purchTable().PurchId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(
classidget(purchFormLetter) == classnum(PurchFormLetter_Invoice) &amp;amp;&amp;amp;
(purchTable.Vik_PurchaseCategory != Vik_PurchaseCategory::None))&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select
poCategory where poCategory.Vik_PurchaseCategory == purchTableLocal.Vik_PurchaseCategory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; daydiff = purchTableLocal.createdDateTime -
DateTimeUtil::getSystemDateTime();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; daydiff =
DateTimeutil::getDifference(DateTimeUtil::getSystemDateTime(),
purchtablelocal.createddatetime) / 86400;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(daydiff &amp;gt;
poCategory.ExpireDays)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw
error(strFmt(&quot; The Purchase Order %1 has exceeded the expire days for the
category %2&quot;,purchTableLocal.PurchId,purchTableLocal.Vik_PurchaseCategory));&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;//&amp;nbsp;&amp;nbsp; po category end&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // &amp;lt;GEERU&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if
(SysCountryRegionCode::isLegalEntityInCountryRegion([ #isoRU ]) &amp;amp;&amp;amp; !
purchFormLetter.checkBeforePost())&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // &amp;lt;/GEERU&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; super();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 27pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/6042194350463030334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/purchase-order-category-product-receipt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/6042194350463030334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/6042194350463030334'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/10/purchase-order-category-product-receipt.html' title='PURCHASE ORDER CATEGORY PRODUCT RECEIPT CALLER CLASS'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-7900948198043913926</id><published>2015-06-09T02:15:00.001-07:00</published><updated>2015-06-09T02:15:16.457-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2009"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="CustInvoiceJour"/><category scheme="http://www.blogger.com/atom/ns#" term="CustInvoiceTrans"/><category scheme="http://www.blogger.com/atom/ns#" term="CUSTOM SERVICES"/><category scheme="http://www.blogger.com/atom/ns#" term="DYNAMICS"/><category scheme="http://www.blogger.com/atom/ns#" term="INTEGRATIONAX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="SALES ORDER CRM"/><category scheme="http://www.blogger.com/atom/ns#" term="services"/><category scheme="http://www.blogger.com/atom/ns#" term="SysEntryPointAttribute"/><title type='text'>SALES ORDER INTEGRATION WITH CRM : AX 2012</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #3d85c6; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;SALES ORDER INTEGRATION WITH CRM : AX 2012&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
SEND CONFIRMED SALES ORDER TO CRM&lt;br /&gt;
&lt;br /&gt;
public void run()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; compSalesInvoicetoCRMUat.compSalesInvoiceReference.SalesInvoiceClient &amp;nbsp; &amp;nbsp;service;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; compSalesInvoicetoCRMUat.compSalesInvoiceReference.ISalesInvoice &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesinvoice;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CustInvoiceJour &amp;nbsp; &amp;nbsp; custInvoiceJour,custInvoiceJourupd;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CustInvoiceTrans &amp;nbsp; &amp;nbsp;custInvoiceTrans;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventDim &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventDim;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventTrans &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventTrans;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventTable,inventTablechar;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ConfigChoice &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;configChoice;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; success;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; qty;&lt;br /&gt;
&amp;nbsp; // &amp;nbsp;int x=1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Exception &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ex;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; compProductMasterDefault prodMasterDef;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; select * from prodMasterDef;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; changeCompany(prodMasterDef.DealerCompany)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while select custInvoiceJour&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join custInvoiceTrans where &amp;nbsp; custInvoiceJour.SalesId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; == custInvoiceTrans.SalesId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; custInvoiceJour.comp_IsInvoiceSent == NoYes::No&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; custInvoiceJour.InvoiceId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; == custInvoiceTrans.InvoiceId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join inventTable &amp;nbsp; &amp;nbsp;where inventTable.ItemId == custInvoiceTrans.ItemId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp;try&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type &amp;nbsp; &amp;nbsp;= CLRInterop::getType(&#39;compSalesInvoicetoCRMUat.compSalesInvoiceReference.SalesInvoiceClient&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; service = AifUtil::createServiceClient(type);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventDim.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select inventTrans where custInvoiceTrans.InvoiceId == inventTrans.InvoiceId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select inventDim &amp;nbsp; where inventTrans.InventDimId == inventDim.inventDimId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; success = service.Synchronize_Invoice(custInvoiceJour.SalesId,custInvoiceJour.InvoiceId,custInvoiceJour.InvoiceAccount,custInvoiceTrans.ItemId,custInvoiceTrans.SalesPrice,inventDim.inventSerialId,real2int(custInvoiceTrans.Qty),custInvoiceJour.InvoiceAmount,custInvoiceJour.SumTax,custInvoiceJour.invoicedate);&lt;br /&gt;
info(strFmt(&quot;%1-%2-%3-%4-%5-%6-%7-%8-%9-%10&quot;,custInvoiceJour.SalesId,custInvoiceJour.InvoiceId,custInvoiceJour.InvoiceAccount,custInvoiceTrans.ItemId,custInvoiceTrans.SalesPrice,inventDim.inventSerialId,real2int(custInvoiceTrans.Qty),custInvoiceJour.InvoiceAmount,custInvoiceJour.SumTax,custInvoiceJour.invoicedate));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(success != &quot;Success&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error(strFmt(&quot;Error %1 for SO %2&quot;,success,custInvoiceJour.SalesId));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate custInvoiceJourupd where custInvoiceJourupd.InvoiceId == custInvoiceJour.InvoiceId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custInvoiceJourupd.comp_IsInvoiceSent = NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custInvoiceJourupd.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(strFmt(&quot;Sales Invoice %1 is created in CRM&quot;,custInvoiceJour.SalesId));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; }//try&lt;br /&gt;
&amp;nbsp; catch(Exception::CLRError)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ex = CLRInterop::getLastException();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(CLRInterop::getAnyTypeForObject(ex.ToString()));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;comp_RetailExceptionActivityLog::logEvent(strFmt(&#39;Sales Invoice ID:&#39;,custInvoiceJour.SalesId),infolog.export());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;}//while&lt;br /&gt;
&amp;nbsp; &amp;nbsp;// comp_RetailExceptionActivityLog::logEvent(&#39;Product Import&#39;,infolog.export());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/7900948198043913926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/sales-order-integration-with-crm-ax-2012.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/7900948198043913926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/7900948198043913926'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/sales-order-integration-with-crm-ax-2012.html' title='SALES ORDER INTEGRATION WITH CRM : AX 2012'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-6548539224085431892</id><published>2015-06-09T02:11:00.001-07:00</published><updated>2015-06-09T02:11:20.602-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="INTEGRATION"/><category scheme="http://www.blogger.com/atom/ns#" term="PURCHASE ORDER"/><category scheme="http://www.blogger.com/atom/ns#" term="PurchTable"/><category scheme="http://www.blogger.com/atom/ns#" term="SALES QUOTE CREATION AX 2012  X++ CUSTOM WEB SERVICE"/><category scheme="http://www.blogger.com/atom/ns#" term="VendPurchOrderJour"/><title type='text'>PURCHASE ORDER INTEGRATION AX 2012  X++ CUSTOM WEB SERVICE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;PURCHASE ORDER&amp;nbsp;INTEGRATION&amp;nbsp;AX 2012&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;X++ CUSTOM WEB SERVICE&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
public void sendPOtoCRM()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; compPurchaseOrdertoCRMUat.PurchaseOrderReference.PurchaseOrderClient &amp;nbsp; &amp;nbsp;service2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PurchTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;purchTable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PurchLine &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; purchLine,purchLineupd;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; VendPurchOrderJour &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;vendPurchOrderJour,vendPurchOrderJourupd;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventDim &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventDim;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ConfigChoice &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;configChoice;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventTable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _success;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TaxTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;taxtable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; qty;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; component,sfilepath,sfilename,sfileext,sfullname;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conTax,conChar,concharges,confiledetails;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i,j,k,f;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Exception &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ex;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; taxinfo,taxcomp,taxvalue,charname,charvalue,markupAmount;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conchargesinfo,contaxinfo,concharinfo,strfiledetails;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TmpTaxWorkTrans &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpTax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PurchTotals &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; purchTotals;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PurchLine_IN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;purchLine_In;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SalesTaxFormTypes_IN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;salesTaxFormTypes_IN;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Transtxt &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;transTxt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MarkupAmount &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;markupAmounttest;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MarkupTrans &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; markupTrans;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DocuRef &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; docuRef;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DocuValue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; docuValue;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; VendPackingSlipTrans &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tempVPST;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; compProductMasterDefault &amp;nbsp; &amp;nbsp; prodMasterDef;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //changes for multiple PO lines&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TaxTmpWorkTransForm &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; taxTmpWorkTransForm;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TaxPurch &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;taxPurch;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; select * from prodMasterDef;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;while select purchLine&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join purchTable &amp;nbsp;where &amp;nbsp;purchTable.PurchId == purchLine.PurchId &amp;amp;&amp;amp; purchLine.comp_IsPurchlineSend == NoYes::No&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// join vendPurchOrderJour where vendPurchOrderJour.PurchId == purchTable.PurchId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type &amp;nbsp; &amp;nbsp;= CLRInterop::getType(&#39;compPurchaseOrdertoCRMUat.PurchaseOrderReference.PurchaseOrderClient&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; service2 = AifUtil::createServiceClient(type);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //purchTable &amp;nbsp;= PurchTable::find(_purchTable.PurchId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; purchTotals = purchTotals::newPurchTable(purchTable);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select reverse vendPurchOrderJour where vendPurchOrderJour.PurchId == purchTable.PurchId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;nbsp; select purchLine where purchLine.PurchId == purchTable.PurchId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select purchLine_In where purchLine_In.PurchLine == purchLine.recid;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select salesTaxFormTypes_IN where salesTaxFormTypes_IN.RecId == purchLine_In.SalesTaxFormTypes_IN;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select inventDim where inventDim.inventDimId == purchLine.InventDimId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; purchTotals.calc();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpTax.setTmpData(purchTotals.tax().tmpTaxWorkTrans());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Showing taxes with tax value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;conTax = conNull();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while &amp;nbsp; select tmpTax where tmpTax.sourcerecid ==purchline.recid &amp;amp;&amp;amp; tmpTax.sourcetableid == purchline.tableid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select taxtable where taxtable.taxcode == tmpTax.TaxCode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; component &amp;nbsp; = TaxComponentTable_IN::find(taxtable.TaxComponentTable_IN).Name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; taxcomp &amp;nbsp; &amp;nbsp; = component;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; taxvalue &amp;nbsp; &amp;nbsp;= num2str(abs(tmpTax.TaxAmount/(purchline.PurchQty)),0,2,1,2); //changes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conTax &amp;nbsp; &amp;nbsp; &amp;nbsp;= conins(conTax,i,taxcomp+&#39;:&#39;+taxvalue);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contaxinfo = con2StrUnlimited(conTax,&#39;|&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i=0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// send characteristics value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conchar = connull();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while select configChoice &amp;nbsp;where configChoice.ConfigId == InventDim.configId &amp;amp;&amp;amp; configChoice.ItemId == purchLine.itemid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventTable.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select inventTable where inventTable.ItemId == configChoice.chosenitemid;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; j++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; charname &amp;nbsp; &amp;nbsp;= inventTable.comp_CharacteristicName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; charvalue &amp;nbsp; = inventTable.comp_CharacteristicValue;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conchar &amp;nbsp; &amp;nbsp; = conIns(conchar,j,charname+&#39;:&#39;+charvalue);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;concharinfo = con2StrUnlimited(conchar,&#39;|&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;j =0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; concharges = conNull();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while select * from MarkupTrans &amp;nbsp;where MarkupTrans.TransTableId == purchline.TableId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; MarkupTrans.TransRecId == purchline.RecId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; k++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; transTxt &amp;nbsp; &amp;nbsp; = MarkUpTrans.Txt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(transTxt == &quot;Cost of FOC Product&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; markupAmount = &amp;nbsp;num2str((MarkUpTrans.Value*purchline.PurchQty),0,2,1,2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; markupAmount = &amp;nbsp;num2str((abs(MarkUpTrans.Value)),0,2,1,2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //markupAmount = &amp;nbsp;num2str((MarkUpTrans.Value*purchline.PurchQty),0,2,1,2); &amp;nbsp;changes sameer&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; concharges = conins(concharges,k,transTxt+&#39;:&#39;+markupAmount);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;conchargesinfo = con2StrUnlimited(concharges,&#39;|&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;k=0;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; confiledetails = conNull();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while select docuRef where &amp;nbsp;docuRef.refrecid == purchTable.RecId &amp;amp;&amp;amp; docuRef.RefCompanyId == purchTable.dataAreaId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; docuRef.RefTableId == purchTable.TableId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; f++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select docuValue where docuValue.RecId == docuRef.ValueRecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sfilename = docuValue.FileName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sfilepath = docuRef.path();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sfileext &amp;nbsp;= docuValue.FileType;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sfullname = sfilepath + sfilename + &quot;.&quot; +sfileext;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; confiledetails = conins(confiledetails,f,sfullname+&#39;:&#39;+enum2Value(docuRef.comp_FileOrderType)+&#39;:&#39;+enum2value(docuRef.comp_FileType));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// info(strFmt(&quot;%1\%2 %3 %4 %5&quot;,docuRef.path(),docuValue.FileName,docuRef.comp_FileOrderType,docuRef.comp_FileType));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;strfiledetails = con2StrUnlimited(confiledetails,&#39;|&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f=0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_success = service2.Synchronize_PurchaseOrder(PurchTable.purchid,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VendPurchOrderJour.PurchOrderDate,enum2str(PurchTable.DocumentState),inventdim.InventSiteId,inventdim.InventLocationId,purchLine.ItemId,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;concharinfo,real2int(purchLine.PurchQty),purchLine.PurchPrice,purchTable.CurrencyCode,purchTable.payment,purchTable.DlvTerm,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;purchTable.comp_IncoTerms,purchTable.comp_DoAmount,purchTable.comp_DoDate,conchargesinfo,conTaxinfo,purchTable.comp_ManualExcise,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; str2int(purchTable.comp_ExciseDutyRefund),VendPurchOrderJour.Amount,purchTable.comp_FocInformation,purchTable.comp_FinancerUnderHyp,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; purchLine.TaxGroup,purchTable.OrderAccount,strfiledetails,SalesTaxFormTypes_IN.FormType,enum2str(purchTable.comp_SalesTypeExciseDuty),enum2str(purchLine.comp_WarrantyCode));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;info(strFmt(&quot;%1-%2-%3-%4-%5-%6-%7-%8-%9-%10-%11-%12-%13-%14-%15-%16-%17-%18-%19-%20-%21-%22-%23-%24-%25-%26-%27-%28-%29&quot;,PurchTable.purchid,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VendPurchOrderJour.PurchOrderDate,enum2str(PurchTable.DocumentState),inventdim.InventSiteId,inventdim.InventLocationId,purchLine.ItemId,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;concharinfo,real2int(purchLine.PurchQty),purchLine.PurchPrice,purchTable.CurrencyCode,purchTable.payment,purchTable.DlvTerm,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;purchTable.comp_IncoTerms,purchTable.comp_DoAmount,purchTable.comp_DoDate,conchargesinfo,conTaxinfo,purchTable.comp_ManualExcise,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; str2int(purchTable.comp_ExciseDutyRefund),VendPurchOrderJour.Amount,purchTable.comp_FocInformation,purchTable.comp_FinancerUnderHyp,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; purchLine.TaxGroup,purchTable.OrderAccount,strfiledetails,SalesTaxFormTypes_IN.FormType,enum2str(purchTable.comp_SalesTypeExciseDuty),enum2str(purchLine.comp_WarrantyCode)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_success != &quot;Success&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error(strFmt(&quot;%1 for PO %2&quot;,_success,purchTable.PurchId));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate purchLineupd where purchLineupd.PurchId == purchTable.PurchId &amp;amp;&amp;amp; purchLineupd.ItemId == purchLine.ItemId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; purchLineupd.comp_IsPurchlineSend = NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; purchLineupd.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(strFmt(&quot; %1 is created in CRM&quot;,purchTable.PurchId));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }//try&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch(Exception::CLRError)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ex = CLRInterop::getLastException();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(CLRInterop::getAnyTypeForObject(ex.ToString()));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; comp_RetailExceptionActivityLog::logEvent(strFmt(&quot;Purch Order Creation %1:&quot;,PurchTable.purchid),infolog.export());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }//while&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //comp_RetailExceptionActivityLog::logEvent(&#39;Purch Order Creation:&#39;,infolog.export());&lt;br /&gt;
&amp;nbsp; // &amp;nbsp;comp_RetailExceptionActivityLog::logEvent(strFmt(&quot;Purch Order Creation %1:&quot;,PurchTable.purchid),infolog.export());&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/6548539224085431892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/purchase-order-integration-ax-2012-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/6548539224085431892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/6548539224085431892'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/purchase-order-integration-ax-2012-x.html' title='PURCHASE ORDER INTEGRATION AX 2012  X++ CUSTOM WEB SERVICE'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-3033487286877884186</id><published>2015-06-09T01:49:00.003-07:00</published><updated>2015-06-09T01:50:15.277-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2009"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="CUSTOM SERVICES"/><category scheme="http://www.blogger.com/atom/ns#" term="CUSTOMER"/><category scheme="http://www.blogger.com/atom/ns#" term="CUSTTABLE"/><category scheme="http://www.blogger.com/atom/ns#" term="DIRPARTY"/><category scheme="http://www.blogger.com/atom/ns#" term="dirPartyContactInfo"/><category scheme="http://www.blogger.com/atom/ns#" term="dirPartyPostalAddressView"/><category scheme="http://www.blogger.com/atom/ns#" term="DYNAMICS"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="services"/><category scheme="http://www.blogger.com/atom/ns#" term="SysEntryPointAttribute"/><category scheme="http://www.blogger.com/atom/ns#" term="UPDATE"/><category scheme="http://www.blogger.com/atom/ns#" term="UPDATION"/><title type='text'>CUSTOMER UPDATION AX 2012  X++ CUSTOM WEB SERVICE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;CUSTOMER UPDATION AX 2012&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;X++ CUSTOM WEB SERVICE&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
Customer Integration Update&lt;/div&gt;
&lt;div&gt;
[AifCollectionTypeAttribute(&#39;return&#39;, Types::String), SysEntryPointAttribute(true)]&lt;/div&gt;
&lt;div&gt;
public str UpdateCustomer(custAccount _custaccount,Name _name,CustGroupId _customerGroup,CustDlvTermId _delvTerms,CustPaymTermId _paymTerms,CustDlvModeId _delvMode,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CurrencyCode _currency,comp_AccountGroup _accountGroup, comp_CurrentFleetSize comp_CurrentFleetSize, comp_Dealer _dealer,comp_CurrentFleetSize _currentFleetSize,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; comp_CustomerBusinessModel _customerBusinessModel,comp_CustomerSegment _customerSegment,comp_CustomerProfile _customerProfile,comp_DeliveringPlant _deliveringPlant ,comp_deliveryPriority _deliveryPriority,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; comp_DistributionChannel _distributionChannel,comp_ExciseIndicator _exciseIndicator,comp_ExciseRegistrationNumber _exciseRegistrationNumber,comp_Industry _industry,comp_Jtx1 _jtx1,comp_Jtx2 _jtx2,comp_Jtx3 _jtx3,comp_Jtx4 _jtx4,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; comp_Ownership _ownership, comp_PrimaryContact primarycontact,comp_SapCustomerCode _sapcustomercode,comp_SortKey _sortkey, &amp;nbsp;TaxGroup _salesTaxGroup, &amp;nbsp;VATNum _taxExemptionNo,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsElectronicAddressLocator _phone, &amp;nbsp;LogisticsElectronicAddressLocator _extension,LogisticsElectronicAddressLocator _fax, LogisticsElectronicAddressLocator _emailAddress ,TaxRegistrationNumber_IN _eccNumber,LogisticsAddressCountryRegionId &amp;nbsp; &amp;nbsp; _countryRegion,LogisticsAddressZipCodeId &amp;nbsp;_postal,LogisticsAddressStreet &amp;nbsp;_street,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressBuildingCompliment _buildingComponent, LogisticsAddressStreet _street3,LogisticsAddressCity &amp;nbsp;_city ,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressStateId _state , LogisticsAddressDistrictName &amp;nbsp;_district,LogisticsAddressCountryRegionId &amp;nbsp;_countryRegion1,LogisticsAddressZipCodeId &amp;nbsp;_postal1, &amp;nbsp; LogisticsAddressStreet _street1,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressBuildingCompliment _buildingComponent1,LogisticsAddressStreet _street31,LogisticsAddressCity &amp;nbsp;_city1,LogisticsAddressStateId _state1,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressDistrictName &amp;nbsp;_district1, &amp;nbsp; TaxRegistrationNumber_IN _iecNumber,TaxRegistrationNumber_IN _salesTaxRegNumber,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumber_IN _tanNumber,PANNumber_IN _panNumber )&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; CustTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; DirParty &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dirParty;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; DirPartyRecId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; partyRecId;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; DirPartyPostalAddressView &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView,dirPartyPostalAddressView;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; DirPartyContactInfoView &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView,dirPartyContactInfo,dirPartyContactInfoEmail,dirPartyContactInfoFax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; DirPartyLocation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dirpartylocation;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; TaxInformation_IN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN,TaxInformation_IN_exist,TaxInformation_IN_records,TaxInformation_IN_update;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN &amp;nbsp; &amp;nbsp; &amp;nbsp;TaxInformationCustTable_IN,TIC_exist,TIC_count,tic_update;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC,TaxRegistrationNumbers_IN_ecc,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan,TaxRegistrationNumbers_IN_salestax,TRN_exist,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRN_IN_IEC_upd,TRN_IN_ecc_upd,TRN_IN_tan_upd,TRN_IN_salestaxupd;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; int64 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _taxRecordcount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; CustAccount &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custAccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; namealias;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; DirPartyTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyTable;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery,roles_invoice;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log,log_1,log_2,log_3,log_4,log_5,log_6,log_7;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; compProductMasterDefault &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compMasterDefault;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; CustPaymTermId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;paymTermsstr;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; select * from compMasterDefault;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; _delvMode = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; paymTermsstr = _paymTerms;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; ttsBegin;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;if(_customerGroup != &#39;del&#39;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; changeCompany(compMasterDefault.DealerCompany)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if((CustTable::exist(_custaccount) &amp;amp;&amp;amp;_custaccount != &quot;&quot;) &amp;amp;&amp;amp; _name !=&quot;&quot; &amp;amp;&amp;amp; CustGroup::exist(_customerGroup) &amp;amp;&amp;amp; (DlvTerm::exist(_delvTerms) || _delvTerms == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; (PaymTerm::exist(_paymTerms) || _paymTerms == &quot;&quot;) &amp;amp;&amp;amp; (DlvMode::exist(_delvMode) || _delvMode == &quot;&quot;) )&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate custtable where custtable.AccountNum ==_custaccount;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(custtable)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.PaymTermId &amp;nbsp; &amp;nbsp;= _paymTerms;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.DlvTerm &amp;nbsp; &amp;nbsp; &amp;nbsp; = _delvTerms;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.DlvMode &amp;nbsp; &amp;nbsp; &amp;nbsp; = _delvMode;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.TaxGroup &amp;nbsp; &amp;nbsp; &amp;nbsp;= _salesTaxGroup;//salestaxgroup&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.VATNum &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _taxExemptionNo;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.comp_ExciseRegistrationNumber = _exciseRegistrationNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; namealias = _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select postaladdressView where postaladdressView.Party == custtable.Party &amp;amp;&amp;amp; postaladdressView.IsPrimary == NoYes::Yes ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty = DirParty::constructFromPartyRecId(postaladdressView.Party);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.CountryRegionId &amp;nbsp; = _countryRegion;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _state;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _city;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _postal;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.BuildingCompliment= _buildingComponent;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street3;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp;= _district;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp;= _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.Party &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = custtable.Party;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_invoice = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Invoice).RecId];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty.createOrUpdatePostalAddress(postaladdressView,roles_invoice);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //second address&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select dirPartyPostalAddressView where dirPartyPostalAddressView.Party == custtable.Party &amp;amp;&amp;amp; dirPartyPostalAddressView.IsPrimary == NoYes::no ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty = DirParty::constructFromPartyRecId(dirPartyPostalAddressView.Party);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _countryRegion1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _postal1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _buildingComponent1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street31;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;//extra&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::No;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Delivery).RecId];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,roles_delivery);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate dirPartyTable where dirPartyTable.RecId == custtable.Party;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyTable.NameAlias &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyTable.Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyTable.update();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Phone)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select &amp;nbsp;contactView where contactView.Party == custtable.Party &amp;amp;&amp;amp; contactView.Type == LogisticsElectronicAddressMethodType::Phone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty = dirParty::constructFromPartyRecId(contactView.Party);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.LocationName = &quot;Phone&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Locator = _Phone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.locatorextension = _Extension;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Type = LogisticsElectronicAddressMethodType::Phone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Party = custtable.Party;//dirParty.getPartyRecId();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.IsPrimary = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(contactView);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_emailAddress)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; contactView.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select contactView where contactView.Party == custtable.Party &amp;amp;&amp;amp; contactView.Type == LogisticsElectronicAddressMethodType::Email;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty = DirParty::constructFromPartyRecId(contactView.Party);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.LocationName &amp;nbsp; &amp;nbsp;= &quot;Email Address&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _emailAddress;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LogisticsElectronicAddressMethodType::Email;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Party &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = custtable.Party;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(contactView);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_Fax)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; dirPartyContactInfoFax.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select dirPartyContactInfoFax where dirPartyContactInfoFax.Party == custtable.Party &amp;amp;&amp;amp; dirPartyContactInfoFax.Type == LogisticsElectronicAddressMethodType::Fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty = DirParty::constructFromPartyRecId(contactView.Party);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoFax.LocationName = &quot;Fax no update&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = LogisticsElectronicAddressMethodType::Fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.LocationName = _fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Party &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= custtable.Party;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(dirPartyContactInfofax);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_panNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {//dealer&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //select TaxInformationCustTable_IN where TaxInformationCustTable_IN.PANNumber == _panNumber &amp;amp;&amp;amp; TaxInformationCustTable_IN.CustTable == _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxInformationCustTable_IN where TaxInformationCustTable_IN.CustTable == _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxInformationCustTable_IN)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.CustTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.PanStatus &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= PANStatus_IN::Received;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.PANNumber &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _panNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.NatureOfAssessee = NatureOfAssessee_IN::Company;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.validateWrite();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forupdate tic_update where tic_update.CustTable == _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tic_update.PANNumber = _panNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tic_update.update();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }//pan nuber&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if(_countryRegion == &quot;IND&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select DirPartyLocation where DirPartyLocation.Party == custtable.Party &amp;amp;&amp;amp; DirPartyLocation.IsPrimary == NoYes::Yes ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxRegistrationNumbers_IN_IEC where TaxRegistrationNumbers_IN_IEC.RegistrationNumber == _IECNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxRegistrationNumbers_IN_ecc where TaxRegistrationNumbers_IN_ecc.RegistrationNumber == _eccNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxRegistrationNumbers_IN_tan where TaxRegistrationNumbers_IN_tan.RegistrationNumber == _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxRegistrationNumbers_IN_salestax where TaxRegistrationNumbers_IN_salestax.RegistrationNumber == _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxInformation_IN_exist where &amp;nbsp;TaxInformation_IN_exist.RegistrationLocation == DirPartyLocation.Location&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; TaxInformation_IN_exist.ManECCRegistrationNumberTable == TaxRegistrationNumbers_IN_ecc.RecId&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; TaxInformation_IN_exist.SalesTaxRegistrationNumber == &amp;nbsp;TaxRegistrationNumbers_IN_salestax.RecId&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; TaxInformation_IN_exist.TIN == TaxRegistrationNumbers_IN_tan.RecId&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; TaxInformation_IN_exist.IECRegistrationNumberTable == TaxRegistrationNumbers_IN_IEC.RecId ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxInformation_IN_exist)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//changes for ta info TaxInformation_IN_exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select forUpdate TaxInformation_IN_exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where TaxInformation_IN_exist.RegistrationLocation == DirPartyLocation.Location&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; TaxInformation_IN_exist.IsPrimary == NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(TaxInformation_IN_exist)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN_exist.IsPrimary = NoYes::No;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN_exist.update();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select count(RecId) from TaxInformation_IN_records where TaxInformation_IN_records.RegistrationLocation == DirPartyLocation.Location ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_taxRecordcount = TaxInformation_IN_records.RecId;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //select TaxRegistrationNumbers_IN_IEC where TaxRegistrationNumbers_IN_IEC.RegistrationNumber == _IECNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_IEC)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RegistrationNumber = _IECNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::Customs;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_eccNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_ecc)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RegistrationNumber = _eccNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::Excise;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_tanNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_tan)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RegistrationNumber = _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::VAT;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //_salesTaxRegistrationNumber&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_salestax)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RegistrationNumber = _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::SalesTax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber || _eccNumber || _tanNumber || _salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;nbsp;select forupdate TaxInformation_IN&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.Name = strFmt(&quot;%1 %2&quot;,_name,_taxRecordcount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.IsPrimary = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_tanNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_tan where TaxRegistrationNumbers_IN_tan.RegistrationNumber == _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.TIN = TaxRegistrationNumbers_IN_tan.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_eccNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_ecc where TaxRegistrationNumbers_IN_ecc.RegistrationNumber == _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.ECCNumber = TaxRegistrationNumbers_IN_ecc.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_IEC where TaxRegistrationNumbers_IN_IEC.RegistrationNumber == _IECNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.IECRegistrationNumberTable = TaxRegistrationNumbers_IN_IEC.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_salestax where TaxRegistrationNumbers_IN_salestax.RegistrationNumber == _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.SalesTaxRegistrationNumber = TaxRegistrationNumbers_IN_salestax.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.RegistrationLocation = DirPartyLocation.Location;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}//if all four tax &amp;nbsp;if(_IECNumber || _e&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}//if tax information exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }//if INR&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;custtable.update();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;ttsCommit;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;Success : Customer %1 updated successfully&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }//if custtable&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;}//if all exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; else &amp;nbsp; //if all does not exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!CustTable::exist(_custaccount))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_1 = &amp;nbsp;strFmt(&quot;The customer %1 already exist or cannot be blank&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_name == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_2 = &amp;nbsp;strFmt(&quot;The customer name cannot be blank for Customer %1&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!CustGroup::exist(_customerGroup) || _customerGroup == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = &amp;nbsp;strFmt(&quot;The Customer group %1 does not exist or cannot be blank in AX for Customer %2&quot;,_customerGroup,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!DlvTerm::exist(_delvTerms) &amp;amp;&amp;amp; _delvTerms != &quot;&quot; )&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4 = &amp;nbsp;strFmt(&quot;The Delivery Terms %1 does not exist or cannot be blank in AX for Customer %2&quot;,_delvTerms,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!PaymTerm::exist(_paymTerms) &amp;amp;&amp;amp; _paymTerms != &quot;&quot; )&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5 = &amp;nbsp;strFmt(&quot;The Payment Terms %1 does not exist or cannot be blank in AX for Customer %2&quot;,_paymTerms,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if((!DlvMode::exist(_delvMode) &amp;amp;&amp;amp; _delvMode != &quot;&quot;))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_6 = &amp;nbsp;strFmt(&quot;The Delivery Mode %1 does not exist or cannot be blank in AX for Customer %2&quot;,_delvMode,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log = strFmt(&quot;%1\n%2\n%3\n%4\n%5\n%6&quot;,log_1,log_2,log_3,log_4,log_5,log_6);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; } //if customer exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; } //change company if&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; changeCompany(compMasterDefault.delCompany)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if((CustTable::exist(_custaccount) &amp;amp;&amp;amp;_custaccount != &quot;&quot;) &amp;amp;&amp;amp; _name !=&quot;&quot; &amp;amp;&amp;amp; CustGroup::exist(_customerGroup) &amp;amp;&amp;amp; (DlvTerm::exist(_delvTerms) || _delvTerms == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; (PaymTerm::exist(_paymTerms) || _paymTerms == &quot;&quot;) &amp;amp;&amp;amp; (DlvMode::exist(_delvMode) || _delvMode == &quot;&quot;))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate custtable where custtable.AccountNum ==_custaccount;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(custtable)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.PaymTermId &amp;nbsp; &amp;nbsp;= _paymTerms;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.PaymTermId &amp;nbsp; &amp;nbsp;= paymTermsstr;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.DlvTerm &amp;nbsp; &amp;nbsp; &amp;nbsp; = _delvTerms;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.DlvMode &amp;nbsp; &amp;nbsp; &amp;nbsp; = _delvMode;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.TaxGroup &amp;nbsp; &amp;nbsp; &amp;nbsp;= _salesTaxGroup;//salestaxgroup&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.VATNum &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _taxExemptionNo;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.comp_ExciseRegistrationNumber = _exciseRegistrationNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; namealias = _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select postaladdressView where postaladdressView.Party == custtable.Party &amp;amp;&amp;amp; postaladdressView.IsPrimary == NoYes::Yes ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty = DirParty::constructFromPartyRecId(postaladdressView.Party);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.CountryRegionId &amp;nbsp; =_countryRegion;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =_state;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=_city;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =_postal;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=_street;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.BuildingCompliment= _buildingComponent;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street3;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp;= _district;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp;= _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.Party &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = custtable.Party;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_invoice = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Invoice).RecId];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty.createOrUpdatePostalAddress(postaladdressView,roles_invoice);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //second address&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select dirPartyPostalAddressView where dirPartyPostalAddressView.Party == custtable.Party &amp;amp;&amp;amp; dirPartyPostalAddressView.IsPrimary == NoYes::no ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty = DirParty::constructFromPartyRecId(dirPartyPostalAddressView.Party);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _countryRegion1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _postal1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _buildingComponent1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street31;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state1;//&quot;Delhi&quot;;// _state1;//&#39;SP&#39;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;//extra&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::No;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Delivery).RecId];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,roles_delivery);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate dirPartyTable where dirPartyTable.RecId == custtable.Party;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyTable.NameAlias &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyTable.Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyTable.update();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Phone)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select &amp;nbsp;contactView where contactView.Party == custtable.Party &amp;amp;&amp;amp; contactView.Type == LogisticsElectronicAddressMethodType::Phone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty = dirParty::constructFromPartyRecId(contactView.Party);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.LocationName = &quot;Phone&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Locator = _phone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.locatorextension = _extension;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Type = LogisticsElectronicAddressMethodType::Phone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Party = custtable.Party;//dirParty.getPartyRecId();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.IsPrimary = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(contactView);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_emailAddress)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; contactView.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select contactView where contactView.Party == custtable.Party &amp;amp;&amp;amp; contactView.Type == LogisticsElectronicAddressMethodType::Email;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty = DirParty::constructFromPartyRecId(contactView.Party);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.LocationName = &quot;Email Address&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Locator = _emailAddress;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Type = LogisticsElectronicAddressMethodType::Email;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Party = custtable.Party;//dirParty.getPartyRecId();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.IsPrimary = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(contactView);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_Fax)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; dirPartyContactInfoFax.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select dirPartyContactInfoFax where dirPartyContactInfoFax.Party == custtable.Party &amp;amp;&amp;amp; dirPartyContactInfoFax.Type == LogisticsElectronicAddressMethodType::Fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty = DirParty::constructFromPartyRecId(contactView.Party);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoFax.LocationName = &quot;Fax number&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LogisticsElectronicAddressMethodType::Fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Party = custtable.Party;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(dirPartyContactInfofax);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_panNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {//del&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxInformationCustTable_IN where TaxInformationCustTable_IN.CustTable == _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxInformationCustTable_IN)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.CustTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.PanStatus &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= PANStatus_IN::Received;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.PANNumber &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _panNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.NatureOfAssessee = NatureOfAssessee_IN::Company;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.validateWrite();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forupdate tic_update where tic_update.CustTable == _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tic_update.PANNumber = _panNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tic_update.update();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }//pan nuber&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if(_countryRegion == &quot;IND&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select DirPartyLocation where DirPartyLocation.Party == custtable.Party &amp;amp;&amp;amp; DirPartyLocation.IsPrimary == NoYes::Yes ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxRegistrationNumbers_IN_IEC where TaxRegistrationNumbers_IN_IEC.RegistrationNumber == _IECNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxRegistrationNumbers_IN_ecc where TaxRegistrationNumbers_IN_ecc.RegistrationNumber == _eccNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxRegistrationNumbers_IN_tan where TaxRegistrationNumbers_IN_tan.RegistrationNumber == _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxRegistrationNumbers_IN_salestax where TaxRegistrationNumbers_IN_salestax.RegistrationNumber == _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select TaxInformation_IN_exist where &amp;nbsp;TaxInformation_IN_exist.RegistrationLocation == DirPartyLocation.Location&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; TaxInformation_IN_exist.ManECCRegistrationNumberTable == TaxRegistrationNumbers_IN_ecc.RecId&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; TaxInformation_IN_exist.SalesTaxRegistrationNumber == &amp;nbsp;TaxRegistrationNumbers_IN_salestax.RecId&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; TaxInformation_IN_exist.TIN == TaxRegistrationNumbers_IN_tan.RecId&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; TaxInformation_IN_exist.IECRegistrationNumberTable == TaxRegistrationNumbers_IN_IEC.RecId ;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxInformation_IN_exist)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//changes for ta info TaxInformation_IN_exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select forUpdate TaxInformation_IN_exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where TaxInformation_IN_exist.RegistrationLocation == DirPartyLocation.Location&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; TaxInformation_IN_exist.IsPrimary == NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(TaxInformation_IN_exist)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN_exist.IsPrimary = NoYes::No;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN_exist.update();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select count(RecId) from TaxInformation_IN_records where TaxInformation_IN_records.RegistrationLocation == DirPartyLocation.Location ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_taxRecordcount = TaxInformation_IN_records.RecId;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; select TIC_count&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //select TaxRegistrationNumbers_IN_IEC where TaxRegistrationNumbers_IN_IEC.RegistrationNumber == _IECNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_IEC)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RegistrationNumber = _IECNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::Customs;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_eccNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_ecc)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RegistrationNumber = _eccNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::Excise;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_tanNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_tan)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RegistrationNumber = _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::VAT;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //_salesTaxRegistrationNumber&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_salestax)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RegistrationNumber = _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::SalesTax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber || _eccNumber || _tanNumber || _salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;nbsp;select forupdate TaxInformation_IN&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.Name = strFmt(&quot;%1 %2&quot;,_name,_taxRecordcount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.IsPrimary = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_tanNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_tan where TaxRegistrationNumbers_IN_tan.RegistrationNumber == _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.TIN = TaxRegistrationNumbers_IN_tan.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_eccNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_ecc where TaxRegistrationNumbers_IN_ecc.RegistrationNumber == _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.ECCNumber = TaxRegistrationNumbers_IN_ecc.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_IEC where TaxRegistrationNumbers_IN_IEC.RegistrationNumber == _IECNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.IECRegistrationNumberTable = TaxRegistrationNumbers_IN_IEC.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_salestax where TaxRegistrationNumbers_IN_salestax.RegistrationNumber == _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.SalesTaxRegistrationNumber = TaxRegistrationNumbers_IN_salestax.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.RegistrationLocation = DirPartyLocation.Location;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}//if all four tax &amp;nbsp;if(_IECNumber || _e&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}//if tax information exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }//if INR&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;custtable.update();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;ttsCommit;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;Success : Customer %1 updated successfully&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }//if custtable&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;}//if all exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; else &amp;nbsp; //if all does not exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!CustTable::exist(_custaccount))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_1 = &amp;nbsp;strFmt(&quot;The customer %1 already exist or cannot be blank&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_name == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_2 = &amp;nbsp;strFmt(&quot;The customer name cannot be blank for Customer %1&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!CustGroup::exist(_customerGroup) || _customerGroup == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = &amp;nbsp;strFmt(&quot;The Customer group %1 does not exist or cannot be blank in AX for Customer %2&quot;,_customerGroup,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!DlvTerm::exist(_delvTerms) &amp;amp;&amp;amp; _delvTerms != &quot;&quot; )&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4 = &amp;nbsp;strFmt(&quot;The Delivery Terms %1 does not exist or cannot be blank in AX for Customer %2&quot;,_delvTerms,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!PaymTerm::exist(_paymTerms) &amp;amp;&amp;amp; _paymTerms != &quot;&quot; )&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5 = &amp;nbsp;strFmt(&quot;The Payment Terms %1 does not exist or cannot be blank in AX for Customer %2&quot;,_paymTerms,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if((!DlvMode::exist(_delvMode) &amp;amp;&amp;amp; _delvMode != &quot;&quot;))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_6 = &amp;nbsp;strFmt(&quot;The Delivery Mode %1 does not exist or cannot be blank in AX for Customer %2&quot;,_delvMode,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log = strFmt(&quot;%1\n%2\n%3\n%4\n%5\n%6&quot;,log_1,log_2,log_3,log_4,log_5,log_6);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; } //if customer exist&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; return log;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/3033487286877884186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/customer-creation-ax-2012-x-custom-web_9.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/3033487286877884186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/3033487286877884186'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/customer-creation-ax-2012-x-custom-web_9.html' title='CUSTOMER UPDATION AX 2012  X++ CUSTOM WEB SERVICE'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-5819368265156468517</id><published>2015-06-09T01:49:00.002-07:00</published><updated>2015-06-09T01:49:52.644-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2009"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="CUSTOM SERVICES"/><category scheme="http://www.blogger.com/atom/ns#" term="CUSTOMER"/><category scheme="http://www.blogger.com/atom/ns#" term="CUSTTABLE"/><category scheme="http://www.blogger.com/atom/ns#" term="DIRPARTY"/><category scheme="http://www.blogger.com/atom/ns#" term="dirPartyContactInfo"/><category scheme="http://www.blogger.com/atom/ns#" term="dirPartyPostalAddressView"/><category scheme="http://www.blogger.com/atom/ns#" term="DYNAMICS"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="services"/><category scheme="http://www.blogger.com/atom/ns#" term="SysEntryPointAttribute"/><title type='text'>CUSTOMER CREATION AX 2012  X++ CUSTOM WEB SERVICE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;CUSTOMER CREATION AX 2012&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;X++ CUSTOM WEB SERVICE&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Customer Integration Create&lt;/div&gt;
&lt;div&gt;
[AifCollectionTypeAttribute(&#39;return&#39;, Types::String), SysEntryPointAttribute(true)]&lt;/div&gt;
&lt;div&gt;
public str CreateCustomer(custAccount _custaccount,Name _name,CustGroupId _customerGroup,CustDlvTermId _delvTerms,CustPaymTermId _paymTerms,CustDlvModeId _delvMode,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CurrencyCode _Currency,comp_AccountGroup _accountGroup, comp_CurrentFleetSize comp_CurrentFleetSize, comp_Dealer _Dealer,comp_CurrentFleetSize _currentFleetSize,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; comp_CustomerBusinessModel _customerBusinessModel,comp_CustomerSegment _customerSegment,comp_CustomerProfile _customerProfile,comp_DeliveringPlant _deliveringPlant ,comp_deliveryPriority _deliveryPriority,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; comp_DistributionChannel _distributionChannel,comp_ExciseIndicator _exciseIndicator,comp_ExciseRegistrationNumber _exciseRegistrationNumber,comp_Industry _industry,comp_Jtx1 _jtx1,comp_Jtx2 _jtx2,comp_Jtx3 _jtx3,comp_Jtx4 _jtx4,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; comp_Ownership _ownership, comp_PrimaryContact _primarycontact,comp_SapCustomerCode _sapcustomercode,comp_SortKey _sortkey, &amp;nbsp;TaxGroup _salesTaxGroup, &amp;nbsp;VATNum _taxExemptionNo,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsElectronicAddressLocator _phone, &amp;nbsp;LogisticsElectronicAddressLocator _extension,LogisticsElectronicAddressLocator _fax, LogisticsElectronicAddressLocator _emailAddress ,TaxRegistrationNumber_IN _eccNumber,LogisticsAddressCountryRegionId &amp;nbsp; &amp;nbsp; _countryRegion,LogisticsAddressZipCodeId &amp;nbsp;_postal,LogisticsAddressStreet &amp;nbsp;_street,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressBuildingCompliment _buildingComponent, LogisticsAddressStreet _street3,LogisticsAddressCity &amp;nbsp;_city ,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressStateId _state , LogisticsAddressDistrictName &amp;nbsp;_district,LogisticsAddressCountryRegionId &amp;nbsp;_countryRegion1,LogisticsAddressZipCodeId &amp;nbsp;_postal1, &amp;nbsp; LogisticsAddressStreet _street1,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressBuildingCompliment _buildingComponent1,LogisticsAddressStreet _street31,LogisticsAddressCity &amp;nbsp;_city1,LogisticsAddressStateId _state1,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressDistrictName &amp;nbsp;_district1, &amp;nbsp; TaxRegistrationNumber_IN _iecNumber,TaxRegistrationNumber_IN _salesTaxRegNumber,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumber_IN _tanNumber,PANNumber_IN _panNumber )&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; CustTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; DirParty &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dirParty;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; DirPartyPostalAddressView &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; DirPartyContactInfoView &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo,dirPartyContactInfoEmail,dirPartyContactInfoFax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; DirPartyLocation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dirpartylocation;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; TaxInformation_IN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN &amp;nbsp; &amp;nbsp; &amp;nbsp;TaxInformationCustTable_IN;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC,TaxRegistrationNumbers_IN_ecc,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan,TaxRegistrationNumbers_IN_salestax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; CustAccount &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custAccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery,roles_invoice;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log,log_1,log_2,log_3,log_4,log_5,log_6,log_7;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; compProductMasterDefault &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compMasterDefault;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; CustPaymTermId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;paymTermsstr;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; select * from compMasterDefault;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; _delvMode = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; paymTermsstr = _paymTerms;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; if(_customerGroup != &#39;del&#39;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; changeCompany(compMasterDefault.DealerCompany)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; if((!CustTable::exist(_custaccount) &amp;amp;&amp;amp;_custaccount != &quot;&quot;) &amp;amp;&amp;amp; _name !=&quot;&quot; &amp;amp;&amp;amp; CustGroup::exist(_customerGroup) &amp;amp;&amp;amp; (DlvTerm::exist(_delvTerms) || _delvTerms == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; (PaymTerm::exist(_paymTerms) || _paymTerms == &quot;&quot;) &amp;amp;&amp;amp; (DlvMode::exist(_delvMode) || _delvMode == &quot;&quot;))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.initValue();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.AccountNum &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _custaccount;//numberSeq.num();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.CustGroup &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _customerGroup;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.InvoiceAccount &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.PaymTermId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _paymTerms;//&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_AccountGroup &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _accountGroup;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_CurrentFleetSize &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _currentFleetSize;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_CustomerBusinessModel &amp;nbsp; &amp;nbsp; = _customerBusinessModel;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_CustomerSegment &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _customerSegment;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_CustomerProfile &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _customerprofile;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //custTable.comp_Dealer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _comp_dealer;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_DeliveringPlant &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _deliveringPlant;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_DeliveryPriority &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _deliveryPriority;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_DistributionChannel &amp;nbsp; &amp;nbsp; &amp;nbsp; = _distributionChannel;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_ExciseIndicator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _exciseIndicator;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_ExciseRegistrationNumber &amp;nbsp;= _exciseRegistrationNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_Industry &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _industry;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_JTX1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _jtx1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_JTX2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _jtx2;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_JTX3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _jtx3;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_JTX4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _jtx4;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_Ownership &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _ownership;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_PrimaryContact &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _primaryContact;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_SapCustomerCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _sapcustomercode;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_SortKey &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _sortkey;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_currency == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.Currency = &quot;INR&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.Currency &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _currency;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;custTable.PaymTermId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _paymTerms;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.DlvTerm &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _delvTerms;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.DlvMode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _delvMode;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.TaxGroup &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _salesTaxGroup;//salestaxgroup&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.VATNum &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _taxExemptionNo;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_ExciseRegistrationNumber &amp;nbsp;= _exciseRegistrationNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.insert(DirPartyType::Organization, _name);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty = DirParty::constructFromCommon(custTable);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _countryRegion;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _postal;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _buildingComponent;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street3;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_invoice = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Invoice).RecId];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,roles_invoice);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //second address&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _countryRegion1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _postal1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _buildingComponent1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street31;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::No;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Delivery).RecId];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,roles_delivery);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Fill address&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Phone || _Extension)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Phone)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;&#39;Phone No&#39;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp;_phone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;LogisticsElectronicAddressMethodType::Phone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp;NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Extension)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo.LocatorExtension &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;_Extension;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dirParty.createOrUpdateContactInfo(dirPartyContactInfo);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Fax&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Fax)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LogisticsElectronicAddressMethodType::Fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;Fax&quot;;//fax&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Email&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_EmailAddress)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LogisticsElectronicAddressMethodType::Email;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;Email&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _emailAddress;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Fill Contacts&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(dirPartyContactInfofax);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(dirPartyContactInfoemail);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_panNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.CustTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.PanStatus &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= PANStatus_IN::Received;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.PANNumber &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _panNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.NatureOfAssessee = NatureOfAssessee_IN::Company;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.validateWrite();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; if(_countryRegion == &quot;IND&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select DirPartyLocation where DirPartyLocation.Party == custTable.Party &amp;amp;&amp;amp; DirPartyLocation.IsPrimary == NoYes::Yes ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_IEC where TaxRegistrationNumbers_IN_IEC.RegistrationNumber == _IECNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //numeric with 11 chars&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_IEC)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RegistrationNumber = _iecNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::Customs;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_eccNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //ECC The registration number for %1 tax type must be alphanumeric with 5 alpha, 4 numeric, 3 alpha and 3 numeric&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_ecc where TaxRegistrationNumbers_IN_ecc.RegistrationNumber == _eccNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_ecc)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RegistrationNumber = _eccNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::Excise;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_tanNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //11 numeric&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_tan where TaxRegistrationNumbers_IN_tan.RegistrationNumber == _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_tan)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RegistrationNumber = _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::VAT;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RegistrationType &amp;nbsp;= TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //_salesTaxRegistrationNumber max with 15 chars&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {//&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_salestax where TaxRegistrationNumbers_IN_salestax.RegistrationNumber == _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_salestax)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RegistrationNumber = _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::SalesTax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber || _eccNumber || _tanNumber || _salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.Name = _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.IsPrimary = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_tanNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_tan where TaxRegistrationNumbers_IN_tan.RegistrationNumber == _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.TIN = TaxRegistrationNumbers_IN_tan.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_eccNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_ecc where TaxRegistrationNumbers_IN_ecc.RegistrationNumber == _eccNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.ManECCRegistrationNumberTable = TaxRegistrationNumbers_IN_ecc.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_IEC where TaxRegistrationNumbers_IN_IEC.RegistrationNumber == _iecNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.IECRegistrationNumberTable = TaxRegistrationNumbers_IN_IEC.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_salestax where TaxRegistrationNumbers_IN_salestax.RegistrationNumber == _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.SalesTaxRegistrationNumber = TaxRegistrationNumbers_IN_salestax.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.RegistrationLocation = DirPartyLocation.Location;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}//if all four tax&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}//if INR&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;Success : Customer %1 created Successfully&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;} //customer exists&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; else //else part of customer not existing&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(CustTable::exist(_custaccount))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_1 = &amp;nbsp;strFmt(&quot;The customer %1 already exist or cannot be blank&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_name == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_2 = &amp;nbsp;strFmt(&quot;The customer name cannot be blank for Customer %1&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!CustGroup::exist(_customerGroup) || _customerGroup == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = &amp;nbsp;strFmt(&quot;The Customer group %1 does not exist or cannot be blank in AX for Customer %2&quot;,_customerGroup,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!DlvTerm::exist(_delvTerms) &amp;amp;&amp;amp; _delvTerms != &quot;&quot; )&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4 = &amp;nbsp;strFmt(&quot;The Delivery Terms %1 does not exist or cannot be blank in AX for Customer %2&quot;,_delvTerms,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!PaymTerm::exist(_paymTerms) &amp;amp;&amp;amp; _paymTerms != &quot;&quot; )&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5 = &amp;nbsp;strFmt(&quot;The Payment Terms %1 does not exist or cannot be blank in AX for Customer %2&quot;,_paymTerms,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if((!DlvMode::exist(_delvMode) &amp;amp;&amp;amp; _delvMode != &quot;&quot;))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_6 = &amp;nbsp;strFmt(&quot;The Delivery Mode %1 does not exist or cannot be blank in AX for Customer %2&quot;,_delvMode,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log = strFmt(&quot;%1\n%2\n%3\n%4\n%5\n%6&quot;,log_1,log_2,log_3,log_4,log_5,log_6);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; changeCompany(compMasterDefault.delCompany)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if((!CustTable::exist(_custaccount) &amp;amp;&amp;amp;_custaccount != &quot;&quot;) &amp;amp;&amp;amp; _name !=&quot;&quot; &amp;amp;&amp;amp; CustGroup::exist(_customerGroup) &amp;amp;&amp;amp; (DlvTerm::exist(_delvTerms) || _delvTerms == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; (PaymTerm::exist(_paymTerms) || _paymTerms == &quot;&quot;) &amp;amp;&amp;amp; (DlvMode::exist(_delvMode) || _delvMode == &quot;&quot;))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.initValue();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.AccountNum &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _custaccount;//numberSeq.num();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.CustGroup &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _customerGroup;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.InvoiceAccount &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_AccountGroup &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _accountGroup;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_CurrentFleetSize &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _currentFleetSize;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_CustomerBusinessModel &amp;nbsp; &amp;nbsp; = _customerBusinessModel;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_CustomerSegment &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _customerSegment;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_CustomerProfile &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _customerprofile;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.PaymTermId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= paymTermsstr;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //custTable.comp_Dealer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _comp_dealer;paymTermsstr&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_DeliveringPlant &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _deliveringPlant;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_DeliveryPriority &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _deliveryPriority;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_DistributionChannel &amp;nbsp; &amp;nbsp; &amp;nbsp; = _distributionChannel;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_ExciseIndicator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _exciseIndicator;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_ExciseRegistrationNumber &amp;nbsp;= _exciseRegistrationNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_Industry &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _industry;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_JTX1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _jtx1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_JTX2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _jtx2;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_JTX3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _jtx3;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_JTX4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _jtx4;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_Ownership &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _ownership;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_PrimaryContact &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _primaryContact;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_SapCustomerCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _sapcustomercode;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_SortKey &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _sortkey;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Currency == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.Currency = &quot;INR&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.Currency &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _currency;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.PaymTermId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _paymTerms;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.DlvTerm &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _delvTerms;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.DlvMode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _delvMode;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custtable.TaxGroup &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _salesTaxGroup;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.VATNum &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _taxExemptionNo;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.comp_ExciseRegistrationNumber &amp;nbsp;= _exciseRegistrationNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custTable.insert(DirPartyType::Organization, _name);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty = DirParty::constructFromCommon(custTable);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _countryRegion;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _postal;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _buildingComponent;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street3;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_invoice = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Invoice).RecId];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,roles_invoice);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //second address&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _countryRegion1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _postal1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _buildingComponent1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street31;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::No;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Delivery).RecId];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,roles_delivery);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Fill address&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Phone || _Extension)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Phone)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;&#39;Phone No&#39;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp;_phone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;LogisticsElectronicAddressMethodType::Phone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp;NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Extension)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfo.LocatorExtension &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;_extension;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dirParty.createOrUpdateContactInfo(dirPartyContactInfo);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Fax&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Fax)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LogisticsElectronicAddressMethodType::Fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;Fax&quot;;//_fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _fax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Email&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_EmailAddress)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LogisticsElectronicAddressMethodType::Email;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;Email&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _emailAddress;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Fill Contacts&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(dirPartyContactInfofax);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(dirPartyContactInfoemail);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_panNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.CustTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _custaccount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.PanStatus &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= PANStatus_IN::Received;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.PANNumber &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _panNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.NatureOfAssessee = NatureOfAssessee_IN::Company;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.validateWrite();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformationCustTable_IN.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;if(_countryRegion == &quot;IND&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select DirPartyLocation where DirPartyLocation.Party == custTable.Party &amp;amp;&amp;amp; DirPartyLocation.IsPrimary == NoYes::Yes ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_IEC where TaxRegistrationNumbers_IN_IEC.RegistrationNumber == _iecNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_IEC)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RegistrationNumber = _iecNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::Customs;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_eccNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_ecc where TaxRegistrationNumbers_IN_ecc.RegistrationNumber == _eccNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_ecc)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RegistrationNumber = _eccNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::Excise;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_tanNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_tan where TaxRegistrationNumbers_IN_tan.RegistrationNumber == _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_tan)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RegistrationNumber = _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::VAT;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //_salesTaxRegistrationNumber&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_salestax where TaxRegistrationNumbers_IN_salestax.RegistrationNumber == _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxRegistrationNumbers_IN_salestax)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RegistrationNumber = _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.IsGlobal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RefCompanyId &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.TaxType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TaxType_IN::SalesTax;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.RegistrationType &amp;nbsp; = TaxRegistrationType_IN::Customers;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber || _eccNumber || _tanNumber || _salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.Name = _custaccount + _name ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.IsPrimary = NoYes::Yes;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_tanNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_tan.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_tan where TaxRegistrationNumbers_IN_tan.RegistrationNumber == _tanNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.TIN = TaxRegistrationNumbers_IN_tan.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_eccNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_ecc.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_ecc where TaxRegistrationNumbers_IN_ecc.RegistrationNumber == _eccNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.ManECCRegistrationNumberTable = TaxRegistrationNumbers_IN_ecc.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_IECNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_IEC.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_IEC where TaxRegistrationNumbers_IN_IEC.RegistrationNumber == _iecNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.IECRegistrationNumberTable = TaxRegistrationNumbers_IN_IEC.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_salesTaxRegNumber)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxRegistrationNumbers_IN_salestax.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select TaxRegistrationNumbers_IN_salestax where TaxRegistrationNumbers_IN_salestax.RegistrationNumber == _salesTaxRegNumber;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.SalesTaxRegistrationNumber = TaxRegistrationNumbers_IN_salestax.recid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.RegistrationLocation = DirPartyLocation.Location;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TaxInformation_IN.insert();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}//if all four tax&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}//if INR&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log = strFmt(&quot;Success : Customer %1 Created Successfully &quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;} //customer exists&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(CustTable::exist(_custaccount))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_1 = &amp;nbsp;strFmt(&quot;The customer %1 already exist or cannot be blank&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_name == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_2 = &amp;nbsp;strFmt(&quot;The customer name cannot be blank for Customer %1&quot;,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!CustGroup::exist(_customerGroup) || _customerGroup == &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = &amp;nbsp;strFmt(&quot;The Customer group %1 does not exist or cannot be blank in AX for Customer %2&quot;,_customerGroup,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!DlvTerm::exist(_delvTerms) &amp;amp;&amp;amp; _delvTerms != &quot;&quot; )&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4 = &amp;nbsp;strFmt(&quot;The Delivery Terms %1 does not exist or cannot be blank in AX for Customer %2&quot;,_delvTerms,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!PaymTerm::exist(_paymTerms) &amp;amp;&amp;amp; _paymTerms != &quot;&quot; )&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5 = &amp;nbsp;strFmt(&quot;The Payment Terms %1 does not exist or cannot be blank in AX for Customer %2&quot;,_paymTerms,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if((!DlvMode::exist(_delvMode) &amp;amp;&amp;amp; _delvMode != &quot;&quot;))&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_6 = &amp;nbsp;strFmt(&quot;The Delivery Mode %1 does not exist or cannot be blank in AX for Customer %2&quot;,_delvMode,_custaccount);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log = strFmt(&quot;%1\n%2\n%3\n%4\n%5\n%6&quot;,log_1,log_2,log_3,log_4,log_5,log_6);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
return log;&lt;/div&gt;
&lt;div&gt;
}//class&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/5819368265156468517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/customer-creation-ax-2012-x-custom-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/5819368265156468517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/5819368265156468517'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/customer-creation-ax-2012-x-custom-web.html' title='CUSTOMER CREATION AX 2012  X++ CUSTOM WEB SERVICE'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-5238632803093555782</id><published>2015-06-09T01:45:00.000-07:00</published><updated>2015-06-09T01:45:06.046-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2009"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="contactinfo"/><category scheme="http://www.blogger.com/atom/ns#" term="CREATION"/><category scheme="http://www.blogger.com/atom/ns#" term="CUSTOM SERVICES"/><category scheme="http://www.blogger.com/atom/ns#" term="DIRPARTY"/><category scheme="http://www.blogger.com/atom/ns#" term="dirPartyPostalAddressView"/><category scheme="http://www.blogger.com/atom/ns#" term="DYNAMICS"/><category scheme="http://www.blogger.com/atom/ns#" term="LogisticsAddressCity"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="PROSPECT"/><category scheme="http://www.blogger.com/atom/ns#" term="services"/><category scheme="http://www.blogger.com/atom/ns#" term="SysEntryPointAttribute"/><category scheme="http://www.blogger.com/atom/ns#" term="UPDATION"/><title type='text'>PROSPECT INTEGRATION UPDATION AX 2012  X++ CUSTOM WEB SERVICE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;PROSPECT INTEGRATION UPDATION AX 2012&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;X++ CUSTOM WEB SERVICE&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
Prospect Integration Update&lt;br /&gt;
[AifCollectionTypeAttribute(&#39;return&#39;, Types::String), SysEntryPointAttribute(true)]&lt;br /&gt;
public str UpdateProspect(smmBusRelAccount _prospectId,DirPartyName _name,CurrencyCode _currency,smmDlvTermId _term,smmDlvModeId _mode,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressCountryRegionId _country1,LogisticsAddressZipCodeId _zipCode1,LogisticsAddressStreet &amp;nbsp;_street1,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressBuildingCompliment &amp;nbsp;_building,LogisticsAddressPostBox &amp;nbsp;_street3,LogisticsAddressCity _city,LogisticsAddressStateId &amp;nbsp;_state,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressDistrictName _district,LogisticsElectronicAddressLocator _phone,LogisticsElectronicAddressLocator _extension,LogisticsElectronicAddressLocator _email,LogisticsElectronicAddressLocator _fax,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressCountryRegionId _country2,LogisticsAddressZipCodeId _zipCode2,LogisticsAddressStreet &amp;nbsp;_street2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressBuildingCompliment &amp;nbsp;_building2,LogisticsAddressPostBox &amp;nbsp;_street32,LogisticsAddressCity _city2,LogisticsAddressStateId &amp;nbsp;_state2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressDistrictName _district2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CustGroupId _groupId,TaxGroup _salesTax)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirPartyTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _DirPartyTable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; smmBusRelTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;prospect;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirPartyContactInfoView &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery,roles_invoice;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirParty &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dirParty;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirPartyPostalAddressView &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView,dirPartyPostalAddressView;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_1,log_2,log_3,log_4,log_5,log_6;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if(_groupId != &#39;del&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; changeCompany(&#39;DEL&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if( smmBusRelTable::exist(_prospectId) &amp;amp;&amp;amp; _name !=&quot;&quot; &amp;amp;&amp;amp; CustGroup::exist(_groupId) &amp;amp;&amp;amp; (DlvTerm::exist(_term) || _term == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; (DlvMode::exist(_mode) || _mode == &quot;&quot;) )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate prospect where prospect.BusRelAccount == _prospectId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(prospect)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.DlvTerm &amp;nbsp; &amp;nbsp; &amp;nbsp; = _term;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.DlvMode &amp;nbsp; &amp;nbsp; &amp;nbsp; = _mode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.TaxGroup &amp;nbsp; &amp;nbsp; &amp;nbsp;= _salesTax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.CustGroup &amp;nbsp; &amp;nbsp; = _groupId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Currency == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.Currency = &quot;INR&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.Currency &amp;nbsp;= _Currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate _DirPartyTable where _DirPartyTable.RecId == prospect.Party;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _DirPartyTable.NameAlias &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _DirPartyTable.Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _DirPartyTable.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select postaladdressView where postaladdressView.Party == prospect.Party &amp;amp;&amp;amp; postaladdressView.IsPrimary == NoYes::Yes ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty = DirParty::constructFromPartyRecId(_DirPartyTable.RecId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _country1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _zipCode1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _building;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Delivery).RecId];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty.createOrUpdatePostalAddress(postaladdressView,roles_delivery);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select postaladdressView where postaladdressView.Party == prospect.Party &amp;amp;&amp;amp; postaladdressView.IsPrimary == NoYes::No ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;_name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _country2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _zipCode2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _building2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street32;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::No;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_invoice = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Invoice).RecId];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(postaladdressView,roles_invoice);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Phone)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;contactView.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select contactView where contactView.Party == prospect.Party &amp;amp;&amp;amp; contactView.Type == LogisticsElectronicAddressMethodType::Phone;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty = dirParty::constructFromPartyRecId(contactView.Party);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;_name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Locator = _Phone;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.LocatorExtension = _Extension;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Type = LogisticsElectronicAddressMethodType::Phone;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Party = _DirPartyTable.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.IsPrimary = NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(contactView);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_email)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select contactView where contactView.Party == prospect.Party &amp;amp;&amp;amp; contactView.Type == LogisticsElectronicAddressMethodType::Email;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty = dirParty::constructFromPartyRecId(contactView.Party);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;_name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Locator = _email;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Type = LogisticsElectronicAddressMethodType::Email;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Party = _DirPartyTable.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.IsPrimary = NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(contactView);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_fax)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select contactView where contactView.Party == prospect.Party &amp;amp;&amp;amp; contactView.Type == LogisticsElectronicAddressMethodType::Fax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty = dirParty::constructFromPartyRecId(contactView.Party);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;_name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Locator = _fax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Type = LogisticsElectronicAddressMethodType::Fax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Party = _DirPartyTable.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.IsPrimary = NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(contactView);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; log = &amp;nbsp;&#39;Prospect Updated Successfully&#39;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!smmBusRelTable::exist(_prospectId))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_1 = (&#39;Prospect Id does not exist&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_name == &#39;&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_2 = (&#39;Name cannot be blank&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!CustGroup::exist(_groupId))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = (&#39;Customer GroupId does not exist&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!DlvTerm::exist(_term) || _term == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4= (&#39;Terms of Delivery does not exist&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!DlvMode::exist(_mode) || _mode == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5= (&#39;Mode of Delivery does not exist&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;%1\n%2\n%3\n%4\n%5&quot;,log_1,log_2,log_3,log_4,log_5);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; changeCompany(&#39;HYUT&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if( smmBusRelTable::exist(_prospectId) &amp;amp;&amp;amp; _name !=&quot;&quot; &amp;amp;&amp;amp; CustGroup::exist(_groupId) &amp;amp;&amp;amp; (DlvTerm::exist(_term) || _term == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; (DlvMode::exist(_mode) || _mode == &quot;&quot;) )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate prospect where prospect.BusRelAccount == _prospectId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(prospect)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.DlvTerm &amp;nbsp; &amp;nbsp; &amp;nbsp; = _term;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.DlvMode &amp;nbsp; &amp;nbsp; &amp;nbsp; = _mode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.TaxGroup &amp;nbsp; &amp;nbsp; &amp;nbsp;= _salesTax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.CustGroup &amp;nbsp; &amp;nbsp; = _groupId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Currency == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.Currency = &quot;INR&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.Currency &amp;nbsp;= _Currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate _DirPartyTable where _DirPartyTable.RecId == prospect.Party;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _DirPartyTable.NameAlias &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _DirPartyTable.Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _DirPartyTable.update();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select postaladdressView where postaladdressView.Party == prospect.Party &amp;amp;&amp;amp; postaladdressView.IsPrimary == NoYes::Yes ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty = DirParty::constructFromPartyRecId(_DirPartyTable.RecId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _country1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _zipCode1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _building;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Delivery).RecId];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirParty.createOrUpdatePostalAddress(postaladdressView,roles_delivery);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select postaladdressView where postaladdressView.Party == prospect.Party &amp;amp;&amp;amp; postaladdressView.IsPrimary == NoYes::No ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _country2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _zipCode2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _building2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street32;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; postaladdressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::No;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_invoice = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Invoice).RecId];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(postaladdressView,roles_invoice);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Phone)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select contactView where contactView.Party == prospect.Party &amp;amp;&amp;amp; contactView.Type == LogisticsElectronicAddressMethodType::Phone;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty = dirParty::constructFromPartyRecId(_DirPartyTable.RecId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Locator = _Phone;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.locatorextension = _Extension;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Type = LogisticsElectronicAddressMethodType::Phone;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Party = dirParty.getPartyRecId();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.IsPrimary = NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(contactView);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_email)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select contactView where contactView.Party == prospect.Party &amp;amp;&amp;amp; contactView.Type == LogisticsElectronicAddressMethodType::Email;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Locator = _email;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Type = LogisticsElectronicAddressMethodType::Email;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Party = _DirPartyTable.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.IsPrimary = NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(contactView);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_fax)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select contactView where contactView.Party == prospect.Party &amp;amp;&amp;amp; contactView.Type == LogisticsElectronicAddressMethodType::Fax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Locator = _fax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Type = LogisticsElectronicAddressMethodType::Fax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.Party = _DirPartyTable.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactView.IsPrimary = NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(contactView);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; log = &amp;nbsp;&#39;Prospect Updated Successfully&#39;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(!smmBusRelTable::exist(_prospectId))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_1 = (&#39;Prospect Id does not exist&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(_name == &#39;&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_2 = (&#39;Name cannot be blank&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(!CustGroup::exist(_groupId))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_3 = (&#39;Customer GroupId does not exist&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(!DlvTerm::exist(_term) || _term == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4= (&#39;Terms of Delivery does not exist&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(!DlvMode::exist(_mode) || _mode == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5= (&#39;Mode of Delivery does not exist&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;%1\n%2\n%3\n%4\n%5&quot;,log_1,log_2,log_3,log_4,log_5);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;return log ;&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/5238632803093555782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/prospect-integration-updation-ax-2012-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/5238632803093555782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/5238632803093555782'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/prospect-integration-updation-ax-2012-x.html' title='PROSPECT INTEGRATION UPDATION AX 2012  X++ CUSTOM WEB SERVICE'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-7101553515512800061</id><published>2015-06-09T01:41:00.000-07:00</published><updated>2015-06-09T01:54:30.526-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2009"/><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="contactinfo"/><category scheme="http://www.blogger.com/atom/ns#" term="CREATION"/><category scheme="http://www.blogger.com/atom/ns#" term="CUSTOM SERVICES"/><category scheme="http://www.blogger.com/atom/ns#" term="DIRPARTY"/><category scheme="http://www.blogger.com/atom/ns#" term="dirPartyPostalAddressView"/><category scheme="http://www.blogger.com/atom/ns#" term="DYNAMICS"/><category scheme="http://www.blogger.com/atom/ns#" term="LogisticsAddressCity"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="PROSPECT"/><category scheme="http://www.blogger.com/atom/ns#" term="services"/><category scheme="http://www.blogger.com/atom/ns#" term="SysEntryPointAttribute"/><category scheme="http://www.blogger.com/atom/ns#" term="UPDATION"/><title type='text'>PROSPECT INTEGRATION CREATION AX 2012  X++ CUSTOM WEB SERVICE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;PROSPECT INTEGRATION CREATION AX 2012&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;X++ CUSTOM WEB SERVICE&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
Prospect Integration create&lt;br /&gt;
[AifCollectionTypeAttribute(&#39;return&#39;, Types::String), SysEntryPointAttribute(true)]&lt;br /&gt;
public str CreateProspect(smmBusRelAccount _prospectId,DirPartyName _name,CurrencyCode _currency,smmDlvTermId _term,smmDlvModeId _mode,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressCountryRegionId _country1,LogisticsAddressZipCodeId _zipCode1,LogisticsAddressStreet &amp;nbsp;_street1,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressBuildingCompliment &amp;nbsp;_building,LogisticsAddressPostBox &amp;nbsp;_street3,LogisticsAddressCity _city,LogisticsAddressStateId &amp;nbsp;_state,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressDistrictName _district,LogisticsElectronicAddressLocator _phone,LogisticsElectronicAddressLocator _extension,LogisticsElectronicAddressLocator _email,LogisticsElectronicAddressLocator _fax,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressCountryRegionId _country2,LogisticsAddressZipCodeId _zipCode2,LogisticsAddressStreet &amp;nbsp;_street2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressBuildingCompliment &amp;nbsp;_building2,LogisticsAddressPostBox &amp;nbsp;_street32,LogisticsAddressCity _city2,LogisticsAddressStateId &amp;nbsp;_state2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsAddressDistrictName _district2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CustGroupId _groupId,TaxGroup _salesTax)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirPartyTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; partyRecord;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirPersonName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; person;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirPerson &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pers;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; smmBusRelTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;prospect;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirPartyContactInfoView &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo,dirPartyContactInfoEmail,dirPartyContactInfoFax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery,roles_invoice;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirParty &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dirParty;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirPartyPostalAddressView &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_1,log_2,log_3,log_4,log_5,log_6;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if(_groupId != &#39;del&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; changeCompany(&#39;DEL&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if(!smmBusRelTable::exist(_prospectId) &amp;amp;&amp;amp; _prospectId != &#39;&#39;&amp;amp;&amp;amp; _name !=&quot;&quot; &amp;amp;&amp;amp; CustGroup::exist(_groupId) &amp;amp;&amp;amp; (DlvTerm::exist(_term) || _term == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; (DlvMode::exist(_mode) || _mode == &quot;&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Creating record &amp;nbsp;in&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Creating record &amp;nbsp;in Prospect master&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;errorlog = &#39;done&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.BusRelAccount = _prospectId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.CustGroup = _groupId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.BusRelTypeId = &#39;Prospect&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Currency == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.Currency = &quot;INR&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;prospect.Currency &amp;nbsp;= _Currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.DlvMode &amp;nbsp;= _mode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.DlvTerm &amp;nbsp;= _term;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.TaxGroup = _salesTax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; partyRecord &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= DirPartyTable::createNew(DirPartyType::Organization, _name);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; partyRecord.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.Party = partyRecord.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.insert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty = DirParty::constructFromCommon(prospect);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;creating Address&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _country1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _zipCode1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _building;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Delivery).RecId];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,roles_delivery);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //second address&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _country2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _zipCode2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _building2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street32;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::No;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_invoice = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Invoice).RecId];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,roles_invoice);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Update address&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_phone || _extension)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Phone)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;_name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp;_Phone;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;LogisticsElectronicAddressMethodType::Phone;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp;NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Extension)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.LocatorExtension &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;_Extension;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dirParty.createOrUpdateContactInfo(contactinfo);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Fax&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Fax)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = LogisticsElectronicAddressMethodType::Fax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _Fax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(dirPartyContactInfofax);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Email&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_email)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LogisticsElectronicAddressMethodType::Email;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _email;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=_name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(dirPartyContactInfoemail);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Updating contacts&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = &#39;Prospect created successfully&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(smmBusRelTable::exist(_prospectId))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_1 = &#39;Prospect &amp;nbsp;already exist&#39; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_prospectId == &#39;&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_2 = &#39;Prospect Id cannot be blank&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_name == &#39;&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = &#39;Name cannot be blank&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!CustGroup::exist(_groupId))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4 = &#39;Customer Group is not valid&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if((!DlvTerm::exist(_term) &amp;amp;&amp;amp; _term != &quot;&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5 = &#39;Term of delivery is not valid&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if((!DlvMode::exist(_mode) &amp;amp;&amp;amp; _mode != &quot;&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_6 = &#39;Mode of delivery is invalid&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;%1\n%2\n%3\n%4\n%5\n%6&quot;,log_1,log_2,log_3,log_4,log_5,log_6);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;changeCompany(&#39;HYUT&#39;)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if(!smmBusRelTable::exist(_prospectId) &amp;amp;&amp;amp; _prospectId != &#39;&#39;&amp;amp;&amp;amp; _name !=&quot;&quot; &amp;amp;&amp;amp; CustGroup::exist(_groupId) &amp;amp;&amp;amp; (DlvTerm::exist(_term) || _term == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; (DlvMode::exist(_mode) || _mode == &quot;&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Creating record &amp;nbsp;in&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Creating record &amp;nbsp;in Prospect master&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;errorlog = &#39;done&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.BusRelAccount = _prospectId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.CustGroup = _groupId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.BusRelTypeId = &#39;Prospect&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Currency == &quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.Currency = &quot;INR&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;prospect.Currency &amp;nbsp;= _Currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.DlvMode &amp;nbsp;= _mode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.DlvTerm &amp;nbsp;= _term;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.TaxGroup = _salesTax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; partyRecord &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= DirPartyTable::createNew(DirPartyType::Organization, _name);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; partyRecord.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.Party = partyRecord.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prospect.insert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty = DirParty::constructFromCommon(prospect);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;creating Address&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _country1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _zipCode1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _building;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_delivery = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Delivery).RecId];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,roles_delivery);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //second address&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.CountryRegionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _country2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.ZipCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _zipCode2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.Street &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _street2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.BuildingCompliment &amp;nbsp; &amp;nbsp; = _building2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.PostBox &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _street32;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.City &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _city2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.State &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= _state2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.DistrictName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _district2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyPostalAddressView.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::No;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; roles_invoice = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Invoice).RecId];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView,roles_invoice);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Update address&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_phone || _extension)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Phone)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;&#39;Phone No&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp;_Phone;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;LogisticsElectronicAddressMethodType::Phone;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp;NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Extension)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.LocatorExtension &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &amp;nbsp;_Extension;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dirParty.createOrUpdateContactInfo(contactinfo);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Fax&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_Fax)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = LogisticsElectronicAddressMethodType::Fax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _Fax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfofax.LocationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &#39;Fax&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp;NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(dirPartyContactInfofax);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Email&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_email)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LogisticsElectronicAddressMethodType::Email;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.Locator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = _email;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyContactInfoemail.LocationName &amp;nbsp; &amp;nbsp;= &#39;E Mail&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contactinfo.IsPrimary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp;NoYes::Yes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirParty.createOrUpdateContactInfo(dirPartyContactInfoemail);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Updating contacts&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = &#39;Prospect created successfully&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(smmBusRelTable::exist(_prospectId))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_1 = &#39;Prospect &amp;nbsp;already exist&#39; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_prospectId == &#39;&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_2 = &#39;Prospect Id cannot be blank&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(_name == &#39;&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = &#39;Name cannot be blank&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!CustGroup::exist(_groupId))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4 = &#39;Customer Group is not valid&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!(DlvTerm::exist(_term) &amp;amp;&amp;amp; _term == &quot;&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5 = &#39;Term of delivery is not valid&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!(DlvMode::exist(_mode) &amp;amp;&amp;amp; _mode == &quot;&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_6 = &#39;Mode of delivery is invalid&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;%1\n%2\n%3\n%4\n%5\n%6&quot;,log_1,log_2,log_3,log_4,log_5,log_6);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;return log ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/7101553515512800061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/prospect-integration-creation-ax-2012-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/7101553515512800061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/7101553515512800061'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/prospect-integration-creation-ax-2012-x.html' title='PROSPECT INTEGRATION CREATION AX 2012  X++ CUSTOM WEB SERVICE'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-2842172480387327039</id><published>2015-06-09T01:37:00.001-07:00</published><updated>2015-06-09T01:37:20.103-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="CREATE"/><category scheme="http://www.blogger.com/atom/ns#" term="CREATION"/><category scheme="http://www.blogger.com/atom/ns#" term="dynamics ax"/><category scheme="http://www.blogger.com/atom/ns#" term="INSERT"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="QUOTATION"/><category scheme="http://www.blogger.com/atom/ns#" term="SALES QUOTE"/><category scheme="http://www.blogger.com/atom/ns#" term="SALESQUOTATIONTABLE"/><category scheme="http://www.blogger.com/atom/ns#" term="services"/><category scheme="http://www.blogger.com/atom/ns#" term="SysEntryPointAttribute"/><category scheme="http://www.blogger.com/atom/ns#" term="tax"/><title type='text'>SALES QUOTE UPDATION  AX 2012  X++ CUSTOM WEB SERVICE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;SALES QUOTE UPDATION AX 2012&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;X++ CUSTOM WEB SERVICE&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
Sales Quote update&lt;br /&gt;
[AifCollectionTypeAttribute(&#39;return&#39;, Types::Container), SysEntryPointAttribute(true)]&lt;br /&gt;
public str updateQuote(QuotationIdBase _quoteId,CustCurrencyCode _currency, InventSiteName _site,ItemIdSmall _item,SalesQty _qty,comp_OrderType _orderType,comp_OrderCat _orderCategory,FormType_IN _saleTypeSalesTax,comp_SaleTypeExciseDuty &amp;nbsp; _saleTypeExcise,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String50 _domestic,String50 _export,String50 _e1Sale,string50 _price,TaxGroup _taxGroup,MarkupValue _freight)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_1,log_2,log_3,log_4,log_5,log_6,log_7,log_8,log_9;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Inventsite &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;site;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventLocation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ware;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SalesQuotationTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation,quotationIdchk;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SalesQuotationLine &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line,line_2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventDim &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventItemOrderSetupType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;setupType &amp;nbsp; = InventItemOrderSetupType::Invent;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventTable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CustTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cust;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventDimCombination &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;comb;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; NoYes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; noyes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TmpTaxWorkTrans &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpTax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SalesQuotationTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SalesQuotationTotals_Sales &amp;nbsp; &amp;nbsp; &amp;nbsp;salesQuotationTotals;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TaxTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;taxtable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; component;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; con;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; compProductMasterDefault &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prodMasterDef;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MarkupTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; markTab;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MarkupTrans &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; select * from prodMasterDef;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if(_orderCategory == &#39;Dealer-Customer&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; changeCompany(prodMasterDef.DealerCompany)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; { &amp;nbsp;// Validating from masters&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select * from quotationIdchk where quotationIdchk.QuotationId == _quoteId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if(quotationIdchk.RecId &amp;amp;&amp;amp; InventSite::exist(_site) &amp;amp;&amp;amp; InventTable::exist(_item) &amp;amp;&amp;amp; SalesTaxFormTypes_IN::exist(_saleTypeSalesTax)&amp;amp;&amp;amp; &amp;nbsp;TaxGroupHeading::exist(_taxGroup))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //updating header&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forupdate quotation where quotation.QuotationId == &amp;nbsp;_quoteId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(quotation.RecId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.QuotationStatus &amp;nbsp;= SalesQuotationStatus::Created;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.CurrencyCode = _currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.ShippingDateRequested = systemDateGet();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_OrderType = _orderType;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_OrderCat &amp;nbsp;= _orderCategory;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_SaleTypeExciseDuty = _saleTypeExcise;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_E1Sale = str2enum(noyes,_e1Sale);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_Domestic = str2enum(NoYes,_domestic);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_Export = str2enum(NoYes,_export);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //updating line&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate line where line.QuotationId == quotation.QuotationId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;amp;&amp;amp; line.ItemId == _item;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(line.RecId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//line.ItemId = _item;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initFromSalesQuotationLine(line);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.SalesPrice = str2num(_price) - _freight;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.TaxGroup = _taxGroup;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.SalesQty = _qty;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.CurrencyCode = _currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.ShippingDateRequested = systemDateGet();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.SalesTaxFormTypes_IN = SalesTaxFormTypes_IN::findbyFormType(_saleTypeSalesTax).RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.ExciseTariffCodes_IN = Inventtable::find(line.ItemId).ExciseTariffCodes_IN;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.modifiedField(fieldnum(SalesQuotationLine,SalesPrice));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.update();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; markTab = MarkupTable::find((MarkupModuleType::Cust),&#39;6&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forupdate trans where Trans.TransTableId == line.TableId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; Trans.TransRecId == line.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.ModuleType &amp;nbsp;= &amp;nbsp;MarkupModuleType::Cust;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.CurrencyCode = line.CurrencyCode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.MarkupCode &amp;nbsp; &amp;nbsp;= markTab.MarkupCode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.Txt &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= markTab.Txt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.MarkupCategory = MarkupCategory::Pcs;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.Value = _Freight;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Trans.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTable &amp;nbsp;= SalesQuotationTable::find(_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTotals = SalesQuotationTotals_Sales::construct(salesQuotationTable);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Calculate Tax&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTotals.calc();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Load tmpTaxWorkTrans&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpTax.setTmpData(salesQuotationTotals.tax().tmpTaxWorkTrans());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Showing taxes with tax value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select tmpTax&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select taxtable where taxtable.taxcode == tmpTax.TaxCode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; component = TaxComponentTable_IN::find(taxtable.TaxComponentTable_IN).Name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_7 &amp;nbsp;= component;&lt;br /&gt;
// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_8 = num2str(abs(tmpTax.TaxAmount),0,2,1,1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_8 = &amp;nbsp;num2str(abs((tmpTax.TaxAmount)/_qty),0,2,0,0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;con = conins(Con,i,log_7+&#39;:&#39;+log_8);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i =0 ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = con2StrUnlimited(con,&#39;|&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //strFmt(&#39;Warehouse %1 is not valid for Sales Quote : %2&#39;,ware,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!InventTable::exist(_item))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = strFmt(&#39;Item %1 is not valid for %2 company %3&#39;,_item,_quoteId,curext());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!SalesTaxFormTypes_IN::exist(_saleTypeSalesTax))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4 = strFmt(&#39;SalesTax FormType %1 is not valid for %2&#39;,_saleTypeSalesTax,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxGroupHeading::exist(_taxGroup))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5 = strFmt(&#39;Tax Group is %1 not valid for %2&#39;,_taxGroup,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!quotationIdchk.RecId )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_9 = strFmt(&#39;Quote %1 does not exist&#39;,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;%1\n%2\n%3\n%4&quot;,log_3,log_4,log_5,log_9);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;changeCompany(prodMasterDef.delCompany)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// validating masters&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select * from quotationIdchk where quotationIdchk.QuotationId == _quoteId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if( quotationIdchk.RecId &amp;amp;&amp;amp; InventTable::exist(_item) &amp;amp;&amp;amp; SalesTaxFormTypes_IN::exist(_saleTypeSalesTax)&amp;amp;&amp;amp; &amp;nbsp;TaxGroupHeading::exist(_taxGroup))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //creating header&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate quotation where quotation.QuotationId == _quoteId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(quotation.RecId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.QuotationStatus &amp;nbsp;= SalesQuotationStatus::Created;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.CurrencyCode = _currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.ShippingDateRequested = systemDateGet();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.LanguageId = SystemParameters::getSystemLanguageId();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_OrderType = _orderType;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_OrderCat &amp;nbsp;= _orderCategory;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_SaleTypeExciseDuty = _saleTypeExcise;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_E1Sale = str2enum(noyes,_e1Sale);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_Domestic = str2enum(NoYes,_domestic);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_Export = str2enum(NoYes,_export);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //updating lines&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate line where line.QuotationId == quotation.QuotationId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;&amp;amp;&amp;amp; line.ItemId == _item;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(line.RecId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//line.ItemId = _item;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.initFromSalesQuotationLine(line);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.SalesPrice = str2num(_price) - _freight;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.TaxGroup = _taxGroup;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.SalesQty = _qty;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.CurrencyCode = _currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.ShippingDateRequested = systemDateGet();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.SalesTaxFormTypes_IN = SalesTaxFormTypes_IN::findbyFormType(_saleTypeSalesTax).RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line.ExciseTariffCodes_IN = Inventtable::find(line.ItemId).ExciseTariffCodes_IN;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.modifiedField(fieldnum(SalesQuotationLine,SalesPrice));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.update();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;markTab = MarkupTable::find((MarkupModuleType::Cust),&#39;6&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forupdate trans where Trans.TransTableId == line.TableId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; Trans.TransRecId == line.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.ModuleType &amp;nbsp;= &amp;nbsp;MarkupModuleType::Cust;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.CurrencyCode = line.CurrencyCode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.MarkupCode &amp;nbsp; &amp;nbsp;= markTab.MarkupCode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.Txt &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= markTab.Txt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.MarkupCategory = MarkupCategory::Pcs;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trans.Value = _Freight;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Trans.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTable &amp;nbsp;= SalesQuotationTable::find(_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTotals = SalesQuotationTotals_Sales::construct(salesQuotationTable);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Calculate Tax&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTotals.calc();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Load tmpTaxWorkTrans&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpTax.setTmpData(salesQuotationTotals.tax().tmpTaxWorkTrans());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Showing taxes with tax value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select tmpTax&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select taxtable where taxtable.taxcode == tmpTax.TaxCode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; component = TaxComponentTable_IN::find(taxtable.TaxComponentTable_IN).Name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_7 &amp;nbsp;= component;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_8 = num2str(abs((tmpTax.TaxAmount)/_qty),0,2,0,0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;con = conins(Con,i,log_7+&#39;:&#39;+log_8);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i =0 ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = con2StrUnlimited(con,&#39;|&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!InventTable::exist(_item))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = strFmt(&#39;Item %1 is not valid for %2 for company %3&#39;,_item,_quoteId,curext());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!SalesTaxFormTypes_IN::exist(_saleTypeSalesTax))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4 = strFmt(&#39;SalesTax FormType %1 is not valid for %2&#39;,_saleTypeSalesTax,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxGroupHeading::exist(_taxGroup))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5 = strFmt(&#39;Tax Group is %1 not valid for %2&#39;,_taxGroup,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(!quotationIdchk.RecId )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_9 = strFmt(&#39;Quote %1 does not exist for company %2&#39;,_quoteId,curext());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;%1\n%2\n%3\n%4&quot;,log_3,log_4,log_5,log_9);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;info(strFmt(&quot;Sales Quote Update: %1 - %2 &quot;,_quoteId,log));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;comp_RetailExceptionActivityLog::logEvent(&#39;Sales Quote Update&#39;,infolog.export());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;return log ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/2842172480387327039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/sales-quote-updation-ax-2012-x-custom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/2842172480387327039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/2842172480387327039'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/sales-quote-updation-ax-2012-x-custom.html' title='SALES QUOTE UPDATION  AX 2012  X++ CUSTOM WEB SERVICE'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-405164000784273090</id><published>2015-06-09T00:56:00.000-07:00</published><updated>2015-06-09T03:31:43.528-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="CREATE"/><category scheme="http://www.blogger.com/atom/ns#" term="CREATION"/><category scheme="http://www.blogger.com/atom/ns#" term="dynamics ax"/><category scheme="http://www.blogger.com/atom/ns#" term="INSERT"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="QUOTATION"/><category scheme="http://www.blogger.com/atom/ns#" term="SALES QUOTE"/><category scheme="http://www.blogger.com/atom/ns#" term="SALESQUOTATIONTABLE"/><category scheme="http://www.blogger.com/atom/ns#" term="services"/><category scheme="http://www.blogger.com/atom/ns#" term="SysEntryPointAttribute"/><category scheme="http://www.blogger.com/atom/ns#" term="tax"/><title type='text'>SALES QUOTE CREATION AX 2012  X++ CUSTOM WEB SERVICE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;SALES QUOTE CREATION AX 2012&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #ea9999; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;X++ CUSTOM WEB SERVICE&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
[AifCollectionTypeAttribute(&#39;return&#39;, Types::String), SysEntryPointAttribute(true)]&lt;br /&gt;
public str CreateQuote(QuotationIdBase _quoteId,smmBusRelAccount _prospectId,CustAccount _customerId,LogisticsAddressing _billToAddress,LogisticsAddressing _shipToAddress,CustCurrencyCode _currency,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; InventSiteName _site,InventLocationName _warehouse,ItemIdSmall _item,SalesQty _qty,comp_OrderType _orderType,comp_OrderCat _orderCategory,FormType_IN _saleTypeSalesTax,comp_SaleTypeExciseDuty &amp;nbsp; _saleTypeExcise,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String50 _domestic,String50 _export,String50 _e1Sale,string50 _price,TaxGroup _taxGroup,MarkupValue _freight)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_1,log_2,log_3,log_4,log_5,log_6,log_7,log_8,log_9;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Inventsite &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;site;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventLocation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ware;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SalesQuotationTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation,quotationIdchk;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SalesQuotationLine &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line,line_2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventDim &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventItemOrderSetupType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;setupType &amp;nbsp; = InventItemOrderSetupType::Invent;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventTable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CustTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cust;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InventDimCombination &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;comb;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; NoYes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; noyes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TmpTaxWorkTrans &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpTax;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SalesQuotationTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SalesQuotationTotals_Sales &amp;nbsp; &amp;nbsp; &amp;nbsp;salesQuotationTotals;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TaxTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;taxtable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; component;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; con;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i,k ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // changes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; compProductMasterDefault &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prodMasterDefault;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MarkupTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; markTab;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MarkupTrans &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; select * from prodMasterDefault;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if(_orderCategory == &#39;Dealer-Customer&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; changeCompany(prodMasterDefault.DealerCompany)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; { &amp;nbsp;// Validating from masters&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select * from quotationIdchk where quotationIdchk.QuotationId == _quoteId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if(!quotationIdchk.RecId &amp;amp;&amp;amp;InventSite::exist(_site) &amp;amp;&amp;amp; InventLocation::exist(_warehouse) &amp;amp;&amp;amp; InventTable::exist(_item) &amp;amp;&amp;amp; SalesTaxFormTypes_IN::exist(_saleTypeSalesTax) &amp;nbsp;&amp;amp;&amp;amp; &amp;nbsp;TaxGroupHeading::exist(_taxGroup))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //creating header&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.initValue();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.CustAccount = _customerId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.QuotationName = _customerId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.InvoiceAccount = _customerId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.initFromCustTable(true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.QuotationId = _quoteId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.BusRelAccount = _prospectId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.QuotationStatus &amp;nbsp;= SalesQuotationStatus::Created;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.CurrencyCode = _currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.InventSiteId = _site;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.InventLocationId = _warehouse;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.ShippingDateRequested = systemDateGet();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.LanguageId = SystemParameters::getSystemLanguageId();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_OrderType = _orderType;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_OrderCat &amp;nbsp;= _orderCategory;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_SaleTypeExciseDuty = _saleTypeExcise;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_E1Sale = str2enum(noyes,_e1Sale);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_Domestic = str2enum(NoYes,_domestic);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_Export = str2enum(NoYes,_export);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.insert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //creating line&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initValue();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initFromSalesQuotationTable(quotation);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initFromCustTable();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventTable = InventTable::find(_item);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initFromInventTable(inventTable);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.ItemId = _item;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //creating Inventory Dimensions&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim.InventSiteId = _site;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim.InventLocationId &amp;nbsp;=_warehouse;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// dim.configId = InventTable::find(line.ItemId).StandardConfigId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim.configId = prodMasterDefault.DefaultConfig;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim = InventDim::findOrCreate(dim);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim.write();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.SalesQty = _qty;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.CurrencyCode = _currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.ShippingDateRequested = systemDateGet();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.InventDimId = dim.inventDimId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.SalesTaxFormTypes_IN = SalesTaxFormTypes_IN::findbyFormType(_saleTypeSalesTax).RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initFromSalesQuotationLine_IN(line);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; comb = InventDimCombination::findByInventDim(line.ItemId,dim);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.RetailVariantId = comb.RetailVariantId &amp;nbsp;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.ExciseTariffCodes_IN = Inventtable::find(_item).ExciseTariffCodes_IN;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.createLine(true,true,false,false,false,false,&#39;&#39;,false);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; markTab = MarkupTable::find((MarkupModuleType::Cust),&#39;6&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.initFromSalesQuotationLine(line);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.initFromMarkupTable(marktab);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.MarkupCategory = MarkupCategory::Pcs;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.Value = _Freight;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.LineNum = k;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.insert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; k++;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //updating line Price&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forUpdate line_2 where line_2.QuotationId == line.QuotationId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; line_2.ItemId == line.ItemId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; line_2.LineNum == line.LineNum;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(line_2.RecId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line_2.SalesPrice = str2num(_price) - _freight;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line_2.TaxGroup = _taxGroup;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line_2.modifiedField(fieldnum(SalesQuotationLine,SalesPrice));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line_2.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTable &amp;nbsp;= SalesQuotationTable::find(_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTotals = SalesQuotationTotals_Sales::construct(salesQuotationTable);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Calculate Tax&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTotals.calc();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Load tmpTaxWorkTrans&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpTax.setTmpData(salesQuotationTotals.tax().tmpTaxWorkTrans());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Showing taxes with tax value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select tmpTax&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select taxtable where taxtable.taxcode == tmpTax.TaxCode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; component = TaxComponentTable_IN::find(taxtable.TaxComponentTable_IN).Name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_7 &amp;nbsp;= component;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_8 = num2str(abs((tmpTax.TaxAmount)/_qty),0,2,0,0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;con = conins(Con,i,log_7+&#39;:&#39;+log_8);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i =0 ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = con2StrUnlimited(con,&#39;|&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //info(strFmt(&#39;%1&#39;,log));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //InventSite::exist(_site) &amp;amp;&amp;amp; InventLocation::exist(_warehouse)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!InventSite::exist(_site))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_1 = strFmt(&#39;Site %1 is not valid for Sales Quote - %2 for company %3&#39;,_site,_quoteId,curext());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!InventLocation::exist(_warehouse))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_2 = strFmt(&#39;Warehouse %1 is not valid for Sales Quote - %2&#39;,_warehouse,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!InventTable::exist(_item))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = strFmt(&#39;Item %1 is not valid for Sales Quote - %2&#39;,_item,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!SalesTaxFormTypes_IN::exist(_saleTypeSalesTax))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4 = strfmt(&#39;SalesTax FormType %1 is not valid for Sales Quote - %2&#39;,_saleTypeSalesTax,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxGroupHeading::exist(_taxGroup))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5 = strFmt(&#39;Tax Group is not valid for Sales Quote - %2&#39;,_taxGroup,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(quotationIdchk.RecId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_9 = strFmt(&#39;Sales Quote %1 already Exist&#39;,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;%1\n%2\n%3\n%4\n%5\n%6&quot;,log_1,log_2,log_3,log_4,log_5,log_9);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;changeCompany(prodMasterDefault.delCompany)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select * from quotationIdchk where quotationIdchk.QuotationId == _quoteId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// validating masters&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// if(site.RecId &amp;amp;&amp;amp; ware.RecId &amp;amp;&amp;amp; InventTable::exist(_item) &amp;amp;&amp;amp; SalesTaxFormTypes_IN::exist(_saleTypeSalesTax))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if(!quotationIdchk.RecId &amp;amp;&amp;amp;InventSite::exist(_site) &amp;amp;&amp;amp; InventLocation::exist(_warehouse) &amp;amp;&amp;amp; InventTable::exist(_item) &amp;amp;&amp;amp; SalesTaxFormTypes_IN::exist(_saleTypeSalesTax) &amp;nbsp;&amp;amp;&amp;amp; &amp;nbsp;TaxGroupHeading::exist(_taxGroup))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //creating header&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.initValue();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.CustAccount = _customerId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.QuotationName = _customerId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.InvoiceAccount = _customerId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.initFromCustTable(true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.QuotationId = _quoteId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.BusRelAccount = _prospectId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.QuotationStatus &amp;nbsp;= SalesQuotationStatus::Created;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.CurrencyCode = _currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.InventSiteId = _site;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.InventLocationId = _warehouse;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.ShippingDateRequested = systemDateGet();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.LanguageId = SystemParameters::getSystemLanguageId();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_OrderType = _orderType;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_OrderCat &amp;nbsp;= _orderCategory;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_SaleTypeExciseDuty = _saleTypeExcise;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_E1Sale = str2enum(noyes,_e1Sale);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_Domestic = str2enum(NoYes,_domestic);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.comp_Export = str2enum(NoYes,_export);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quotation.insert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //creating lines&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initValue();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initFromSalesQuotationTable(quotation);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initFromCustTable();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inventTable = InventTable::find(_item);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initFromInventTable(inventTable);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.ItemId = _item;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //creating inventory dimension&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim.InventSiteId = _site;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim.InventLocationId &amp;nbsp;=_warehouse;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //dim.configId = InventTable::find(line.ItemId).StandardConfigId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim.configId = prodMasterDefault.DefaultConfigdel;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim = InventDim::findOrCreate(dim);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dim.write();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.SalesQty = _qty;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.CurrencyCode = _currency;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.ShippingDateRequested = systemDateGet();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.InventDimId = dim.inventDimId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.SalesTaxFormTypes_IN = SalesTaxFormTypes_IN::findbyFormType(_saleTypeSalesTax).RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.initFromSalesQuotationLine_IN(line);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; comb = InventDimCombination::findByInventDim(line.ItemId,dim);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.RetailVariantId = comb.RetailVariantId &amp;nbsp;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.ExciseTariffCodes_IN = Inventtable::find(_item).ExciseTariffCodes_IN;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line.createLine(true,true,false,false,false,false,&#39;&#39;,false);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; markTab = MarkupTable::find((MarkupModuleType::Cust),&#39;6&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.initFromSalesQuotationLine(line);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.initFromMarkupTable(marktab);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.MarkupCategory = MarkupCategory::Pcs;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.Value = _Freight;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.LineNum = k;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trans.insert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; K++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //updating price&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select forUpdate line_2 where line_2.QuotationId == line.QuotationId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; line_2.ItemId == line.ItemId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; line_2.LineNum == line.LineNum;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(line_2.RecId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line_2.SalesPrice = str2num(_price)- _freight;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line_2.TaxGroup = _taxGroup;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line_2.modifiedField(fieldnum(SalesQuotationLine,SalesPrice));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line_2.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTable &amp;nbsp;= SalesQuotationTable::find(_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTotals = SalesQuotationTotals_Sales::construct(salesQuotationTable);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Calculate Tax&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; salesQuotationTotals.calc();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Load tmpTaxWorkTrans&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpTax.setTmpData(salesQuotationTotals.tax().tmpTaxWorkTrans());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Showing taxes with tax value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select tmpTax&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select taxtable where taxtable.taxcode == tmpTax.TaxCode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; component = TaxComponentTable_IN::find(taxtable.TaxComponentTable_IN).Name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_7 &amp;nbsp;= component;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_8 = num2str(abs((tmpTax.TaxAmount)/_qty),0,2,0,0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;con = conins(Con,i,log_7+&#39;:&#39;+log_8);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = con2StrUnlimited(con,&#39;|&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i =0 ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //log = con2Str(con,&#39;&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!InventSite::exist(_site))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_1 = strFmt(&#39;Site %1 is not valid for Sales Quote - %2 for company %3&#39;,_site,_quoteId,curext());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!InventLocation::exist(_warehouse))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_2 = strFmt(&#39;Warehouse %1 is not valid for Sales Quote - %2&#39;,_warehouse,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!InventTable::exist(_item))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_3 = strFmt(&#39;Item %1 is not valid for Sales Quote - %2&#39;,_item,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!SalesTaxFormTypes_IN::exist(_saleTypeSalesTax))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_4 = strfmt(&#39;SalesTax FormType %1 is not valid for Sales Quote - %2&#39;,_saleTypeSalesTax,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!TaxGroupHeading::exist(_taxGroup))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_5 = strFmt(&#39;Tax Group is not valid for Sales Quote - %2&#39;,_taxGroup,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(quotationIdchk.RecId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_9 = strFmt(&#39;Sales Quote %1 already Exist&#39;,_quoteId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log = strFmt(&quot;%1\n%2\n%3\n%4\n%5\n%6&quot;,log_1,log_2,log_3,log_4,log_5,log_9);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;// &amp;nbsp;info(strFmt(&quot; Sales Quote&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;info(strFmt(&quot;Sales Quote for %1 is created - %2&quot;,_quoteId,log));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;comp_RetailExceptionActivityLog::logEvent(&#39;Sales Quote&#39;,infolog.export());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;return log ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/405164000784273090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/sales-quote-creation-ax-2012-x-custom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/405164000784273090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/405164000784273090'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/sales-quote-creation-ax-2012-x-custom.html' title='SALES QUOTE CREATION AX 2012  X++ CUSTOM WEB SERVICE'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-9210656698477847565</id><published>2015-06-09T00:47:00.001-07:00</published><updated>2015-06-09T00:49:04.537-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="CONFIG"/><category scheme="http://www.blogger.com/atom/ns#" term="INSERT"/><category scheme="http://www.blogger.com/atom/ns#" term="INTEGRATION"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="Sales Order"/><category scheme="http://www.blogger.com/atom/ns#" term="SALESLINE"/><category scheme="http://www.blogger.com/atom/ns#" term="SALESTABLE"/><category scheme="http://www.blogger.com/atom/ns#" term="SALESTRANS"/><category scheme="http://www.blogger.com/atom/ns#" term="SERVICE"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>Sales Order Creation Service : AX 2012 X++ code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;color: #cc0000; font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Sales Order Creation Service : AX 2012 X++ code&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 1230px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 44982; mso-width-source: userset; width: 923pt;&quot; width=&quot;1230&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td class=&quot;xl63&quot; height=&quot;20&quot; style=&quot;height: 15.0pt; width: 923pt;&quot; width=&quot;1230&quot;&gt;Sales
  Order Creation in AX with Config&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;[AifCollectionTypeAttribute(&#39;return&#39;,
  Types::String), SysEntryPointAttribute(true)]&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;public str CreateSalesOrder(SalesIdBase
  _salesId,CustAccount _customerId,InventSiteId _site,TaxGroup _taxGroup,&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comp_SoldToParty
  _soldToParty,comp_ShipTOParty _shipToParty,SalesPrice _price,CurrencyCode
  _currency,CustPaymTermId _paymTerm,SalesDlvTermId _delTerm,&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comp_IncoTerm2
  _incoTerm,CustPurchaseOrder _custReq,CustRef _ref,SalesInventLocationId
  _warehouse,SalesFixedExchRate _exchRate,comp_FOCSpacesOffered _FOCspaces,&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  SalesShippingDateRequested _deliveryDate,Addressing _billTo,Addressing
  _shipTo,ItemId _item,Str1260 _charname,Str1260 _charvalue,SalesOrderedQty
  _qty,comp_OrderType _orderType,comp_OrderCat _orderCategory,FormType_IN
  _saleTypeSalesTax,comp_SaleTypeExciseDuty&amp;nbsp;&amp;nbsp;
  _saleTypeExcise,&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String50
  _domestic,String50 _export,String50 _e1Sale,string30 _FOCInformation,string30
  _financer,MarkupValue _FOCSpares,MarkupValue _salesDed,&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MarkUpvalue
  _depotTransportCost,MarkUpValue _transportCust,MarkupValue
  _forward,MarkupValue _freight,MarkupValue _addnlCost,MarkUpValue
  _miscCharges,&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MarkupValue
  _extSalesComm,MarkUpvalue _speTax,MarkUpvalue _entTax,MarkupValue
  _demo,MarkUpValue _freeInsur,MarkUpValue _addnWarrCost,MarkUpValue
  addnlCredit,&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MarkUpValue
  _bucketCost,MarkUpValue _opCharges,MarkUpValue _promo,Markupvalue
  _dealComm,MarkupValue _percentdisc,MarkUpValue _cashDisc)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;{&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  str&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  log;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  str&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  log_1,log_2,log_3,log_4,log_5,log_6,log_7,log_8,log_9;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  Inventsite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  site;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  InventLocation&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ware;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  SalesTable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header,salesTable,salesTablechk;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  SalesLine&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_1,line_2;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  SalesLine_IN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_In,line_Inc;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  NoYes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  noyes;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  str&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  component;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  container&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  con,_conchar,_concharvalue;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  i,j,configCount,k,counter;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  MarkupTable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  markTab;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  MarkupTrans&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  trans;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  EcoResProductMaster&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResProductMaster;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  EcoResConfiguration&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResConfiguration;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  EcoResProductMasterConfiguration&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResProductMasterConfiguration;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  EcoResDistinctProductVariant&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResDistinctProductVariant;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  EcoResProductVariantConfiguration&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResProductVariantConfiguration;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  EcoResconfigurationName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  _name;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  container&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  prodDimensions;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  RefRecId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResDistinctProductVariantRecId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ConfigChoice&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  config,configrec;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  newconfigrec;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ConfigGroup&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  configGroup;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ConfigGroupId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  groupId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  TmpConfigId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  tempConfig;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  TmpConfigValue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  tempConfigValue;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  EcoResProductReleaseManagerBase&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  releaseManager;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  InventDim&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  dim;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  InventDimCombination&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  comb;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
  // AxSalesTable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; axsalesTable;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  SalesFormLetter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  salesFormLetter;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  CompanyInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  info;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  DirPartyLocation&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  dirPartyLocation;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  TaxInformation_IN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  taxInformation;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  compProductMasterDefault&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prodMasterdef;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  _conchar&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
  str2con(_charname,&#39;,&#39;);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  _concharvalue&amp;nbsp;&amp;nbsp; =
  str2con(_charvalue,&#39;,&#39;);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  select * from prodMasterdef;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
  changeCompany(prodMasterdef.DealerCompany)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  select salesid from salesTablechk where salesTablechk.salesid
  ==_salesId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;
  if(!salesTablechk.RecId &amp;amp;&amp;amp; InventSite::exist(_site) &amp;amp;&amp;amp;
  InventLocation::exist(_warehouse) &amp;amp;&amp;amp; InventTable::exist(_item)
  &amp;amp;&amp;amp; SalesTaxFormTypes_IN::exist(_saleTypeSalesTax)&amp;nbsp; &amp;amp;&amp;amp;&amp;nbsp;
  TaxGroupHeading::exist(_taxGroup))&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  configcount++;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ttsBegin;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  //creating header&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.clear();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.SalesId = _salesId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.SalesType = SalesType::Sales;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.initValue();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.CustAccount = _customerId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.InvoiceAccount = _customerId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.initFromCustTable();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.InventSiteId = _site;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.InventLocationId = _warehouse;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.Payment = _paymTerm;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.ShippingDateRequested = _deliveryDate;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.CurrencyCode = _currency;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.LanguageId =&amp;nbsp;
  systemparameters::getSystemLanguageId();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_SoldToParty = _soldToParty ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_ShipToParty = _shipToParty;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_BilltoAddress = _billTo;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_ShiptoAddress = _shipTo;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.DlvTerm = _delTerm;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.CustGroup = CustTable::find(_customerId).CustGroup;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.TaxGroup&amp;nbsp;&amp;nbsp; =&amp;nbsp; _taxGroup;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.CustomerRef&amp;nbsp;&amp;nbsp; = _ref;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.PurchorderFormNum = _custReq;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_OrderType = _orderType;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_OrderCat = _orderCategory;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_SaleTypeExciseDuty = _saleTypeExcise;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_E1Sale = str2enum(noyes,_e1Sale);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_Domestic = str2enum(NoYes,_domestic);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_Export = str2enum(NoYes,_export);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_IncoTerm2 = _incoTerm;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_FOCSpacesOffered = _FOCspaces;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_FocInformation = _FOCInformation;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.comp_Financer = _financer;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  header.insert();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_1.initFromSalesTable(header,true);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_1.ItemId = _item;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  //line_1.QtyOrdered = _qty;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_1.SalesQty = _qty;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_1.initFromSalesLine_IN(line_1);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  // line_1.initFromSalesLineView_IN(&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  //changes start&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  select count(RecId) from configrec where configrec.ItemId == _item;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newconfigrec =
  int642int(configrec.RecId) + 1;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  //changes foc product&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if(!conLen(_conChar)==0 &amp;amp;&amp;amp; strLen(_charname) != 0)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  _name = this.Config(_conChar,_conCharValue,_item);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if(_name == &#39;&#39;)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //creating configuration on
  basis of characteristic name and values&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; _name = &#39;second&#39;;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _name =
  int2str(newconfigrec);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecoResConfiguration =
  EcoResConfiguration::findByName(_name);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!ecoResConfiguration)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResConfiguration.clear();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResConfiguration.initValue();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecoResConfiguration.Name
  = _name;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResConfiguration.insert();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select ecoResProductMaster
  where ecoResProductMaster.DisplayProductNumber == _item;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select firstonly
  ecoResProductMasterConfiguration where
  ecoResProductMasterConfiguration.ConfigProductMaster ==
  ecoResProductMaster.RecId&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;&amp;amp;
  ecoResProductMasterConfiguration.Configuration == ecoResConfiguration.RecId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if
  (!ecoResProductMasterConfiguration)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResProductMasterConfiguration.clear();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResProductMasterConfiguration.initValue();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResProductMasterConfiguration.Configuration =
  ecoResConfiguration.RecId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResProductMasterConfiguration.ConfigProductDimensionAttribute =
  EcoResProductDimensionAttribute::inventDimFieldId2DimensionAttributeRecId(fieldNum(InventDim,
  ConfigId));&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResProductMasterConfiguration.ConfigProductMaster =
  ecoResProductMaster.RecId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResProductMasterConfiguration.insert();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select tempConfig ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempconfig.ConfigId =&amp;nbsp; ecoResConfiguration.Name;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempConfig.doInsert();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i=1; i &amp;lt;=
  conlen(_conChar); i++)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempConfigValue.clear();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  tempConfigValue.ConfigGroupId = conPeek(_conChar,i) ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempConfigValue.ItemId =
  conPeek(_conChar,i)+&#39;_&#39;+ conPeek(_conCharValue,i);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempConfigValue.ConfigId =
  ecoResConfiguration.Name;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempConfigValue.GroupNum =
  counter;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  tempConfigValue.doInsert();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Counter++;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config.clear();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config.initValue();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  config.initFromTmpConfigValue(tempConfigValue);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config.ItemId = _item;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config.ConfigId =
  ecoResConfiguration.Name;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config.Autogenerated =
  NoYes::No;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config.insert();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prodDimensions =
  EcoResProductVariantDimValue::getDimensionValuesContainer(_name);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Create Product search name&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResDistinctProductVariant.DisplayProductNumber =
  EcoResProductNumberBuilderVariant::buildFromProductNumberAndDimensions(&#39;PC104&#39;,prodDimensions);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Create Product variant with
  Product and dimensions provided&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ecoResDistinctProductVariantRecId =
  EcoResProductVariantManager::createProductVariant(ecoResProductMasterConfiguration.ConfigProductMaster,ecoResDistinctProductVariant.DisplayProductNumber,prodDimensions);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Find newly created 4
  Variant&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecoResDistinctProductVariant
  = ecoResDistinctProductVariant::find(ecoResDistinctProductVariantRecId);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Now release the Product
  variant&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; releaseManager =
  EcoResProductReleaseManagerBase::newFromProduct(ecoResDistinctProductVariant);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; releaseManager.release();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dim.configId = _name;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  else&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dim.configId = _name;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  // dim.configId = InventTable::find(line.ItemId).StandardConfigId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  dim.InventSiteId = _site;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  dim.InventLocationId = _warehouse;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  // dim.configId = _name;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  dim = InventDim::findOrCreate(dim);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  dim.write();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  //creating line&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_1.InventDimId = dim.inventDimId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  comb = InventDimCombination::findByInventDim(line_1.ItemId,dim);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_1.RetailVariantId = comb.RetailVariantId&amp;nbsp; ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_1.createLine(true,true,true,false,true,true,false,false,&#39;&#39;,true,true,false,null,0,&#39;&#39;);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  select forUpdate line_2 where line_2.SalesId == line_1.SalesId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if(line_2.RecId)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_2.SalesPrice = _price;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_2.modifiedField(fieldnum(SalesLine,SalesPrice));&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_2.update();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  //allocating charges&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if(_FOCSpares != 0 )&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; markTab =
  MarkupTable::find((MarkupModuleType::Cust),&#39;1&#39;);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans.clear();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans.initFromSalesLine(line_1);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  trans.initFromMarkupTable(marktab);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans.MarkupCategory =
  MarkupCategory::Pcs;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans.Value = _FOCSpares/_qty;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans.LineNum = k;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans.insert();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; k++;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  info = CompanyInfo::findByCompany_IN(curext());&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  dirPartyLocation =
  DirPartyLocation::findPrimaryPartyLocation(info.RecId);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if (dirPartyLocation)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  line_In.CompanyLocation_IN =
  LogisticsLocation::find(dirPartyLocation.Location).RecId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select firstonly RecId from
  taxInformation&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where
  taxInformation.RegistrationLocation ==
  LogisticsLocation::find(dirPartyLocation.Location).RecId&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;&amp;amp;
  taxInformation.IsPrimary == NoYes::Yes;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  select forupdate line_IN where line_In.SalesLine == line_2.RecId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if(line_In.RecId)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line_In.CompanyLocation_IN&amp;nbsp; =
  LogisticsLocation::find(dirPartyLocation.Location).RecId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line_In.TaxInformation =
  taxInformation.RecId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line_In.SalesTaxFormTypes_IN =
  SalesTaxFormTypes_IN::findbyFormType(_saleTypeSalesTax).RecId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line_In.AssessableValue_IN =
  line_2.getMiscChargesAmount_IN();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line_In.ExciseRecordType_IN =
  ExciseRecordType_IN::RG23D;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line_In.ExciseType_IN =
  ExciseType_IN::Trader;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line_IN.update();&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  //confirming Sales Order&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  salesformletter =
  SalesFormletter::construct(DocumentStatus::Confirmation);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  salesTable = SalesTable::find(_salesId);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  salesFormLetter.update(salesTable);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ttscommit;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  log = strfmt(&#39;Success : Sales Order Created successfully&#39;);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  k = 1;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  else&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(salesTablechk.RecId)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log_9 = strfmt(&#39;Saled Order
  %1 already exist&#39;,_salesId) ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!InventSite::exist(_site))&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log_1 = strfmt(&#39;Site %1 is
  not valid for SO %2&#39;,_site,_salesId) ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if(!InventLocation::exist(_warehouse))&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log_2 = strFmt(&#39;Warehouse %1
  is not valid for SO %2&#39;,_warehouse,_salesId) ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!InventTable::exist(_item))&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log_3 = strFmt(&#39;Item %1 is
  not valid for SO %2&#39;,_item,_salesId) ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if(!SalesTaxFormTypes_IN::exist(_saleTypeSalesTax))&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log_4 = strFmt(&#39;SalesTax
  FormType %1 is not valid for SO %2&#39;,_saleTypeSalesTax,_salesId) ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if(!TaxGroupHeading::exist(_taxGroup))&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log_5 = strFmt(&#39;Tax Group %1
  is not valid for SO %2&#39;,_taxGroup,_salesId) ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log =
  strFmt(&quot;%1/n%2/n%3/n%4/n%5/n%6&quot;,log_9,log_1,log_2,log_3,log_4,log_5);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  info(strFmt(&quot;SO Integration : %1 - %2 &quot;,_salesId,log));&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  comp_RetailExceptionActivityLog::logEvent(&#39;Sales Order
  Creation:&#39;,infolog.export());&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  return log ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }//change company&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Config Creation:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 620px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 22674; mso-width-source: userset; width: 465pt;&quot; width=&quot;620&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt; width: 465pt;&quot; width=&quot;620&quot;&gt;config creation&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;public str config(container
  _conChar,Container _conCharValue,ItemId _item)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;{&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ConfigChoice&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  choice,_config;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  length,i,choice_1,con,l;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ItemId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  chosenItem;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  boolean&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  configexist;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  ConfigIdStandard&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  configname;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  container&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conTax ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  length = conLen(_conChar);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  while&amp;nbsp; select ConfigId from
  _config&amp;nbsp;&amp;nbsp;&amp;nbsp; group by
  _config.ConfigId&amp;nbsp; where&amp;nbsp; _config.itemid == _item&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  choice_1 = 0;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  for(i=1;i&amp;lt;=length;i++)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; chosenItem =
  conPeek(_conChar,i)+&#39;_&#39;+ conPeek(_conCharValue,i);&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select choice where
  choice.ConfigId ==&amp;nbsp; _config.ConfigId&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;&amp;amp;&amp;nbsp; choice.ChosenItemId == chosenItem;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(choice)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; choice_1++;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if(choice_1 == length)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; configexist = true;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; configname = choice.ConfigId;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  if(configexist == true)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  {&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break ;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  }&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  return configname;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;}&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/9210656698477847565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/sales-order-creation-service-ax-2012-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/9210656698477847565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/9210656698477847565'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/06/sales-order-creation-service-ax-2012-x.html' title='Sales Order Creation Service : AX 2012 X++ code'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-2039422173235365020</id><published>2015-05-27T05:41:00.001-07:00</published><updated>2015-05-27T05:41:55.281-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="HCM worker"/><category scheme="http://www.blogger.com/atom/ns#" term="hcmpersonnel"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="number sequence"/><category scheme="http://www.blogger.com/atom/ns#" term="x++ code"/><title type='text'>AX 2012 HCM Creating a Worker x++ code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; font-stretch: normal; margin: 0px; position: relative;&quot;&gt;
Creating a worker in AX 2012&lt;/h3&gt;
&lt;div class=&quot;post-header&quot; style=&quot;line-height: 1.6; margin: 0px 0px 1em;&quot;&gt;
&lt;div class=&quot;post-header-line-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-4060282904696420639&quot; style=&quot;line-height: 1.4; position: relative; width: 876px;&quot;&gt;
&lt;pre&gt;private HcmPersonnelNumberId nextPersonnelNumberId()
{
    HcmPersonnelNumberId    hcmPersonnelNumberId;
    NumberSequenceReference numberSeqReferencePersonnelNum;
    NumberSequenceTable     numberSeqTablePersonnelNum;
    NumberSeq               numberSeqPersonnelNum;

    // Number Sequence
    numberSeqReferencePersonnelNum  = NumberSeqReference::findReference(extendedTypeNum(HcmPersonnelNumberId));
    numberSeqTablePersonnelNum      = NumberSequenceTable::find(numberSeqReferencePersonnelNum.NumberSequenceId);

    if (numberSeqTablePersonnelNum)
    {
        // generate worker personnel number if number sequence code is created.
        numberSeqPersonnelNum = NumberSeq::newGetNumFromId(numberSeqTablePersonnelNum.RecId, true, true);

        if(numberSeqPersonnelNum)
        {
            hcmPersonnelNumberId = numberSeqPersonnelNum.num();
        }
    }
    return hcmPersonnelNumberId;
}

private void createHCMWorker()
{
    AxDirPerson             person;
    AxDirPersonName         personName;
    HcmWorker               worker;
    HcmPersonnelNumberId    hcmPersonnelNumberId;

    hcmPersonnelNumberId = this.nextPersonnelNumberId();

    if (!hcmPersonnelNumberId)
        return;

    // Create a person
    person = AxDirPerson::construct();
    person.parmName(&quot;Santa Claus&quot;);
    person.save();

    personName = AxDirPersonName::construct();
    personName.parmPerson(person.dirPerson().RecId);
    personName.parmFirstName(person.dirPerson().Name);
    personName.parmValidTo(DateTimeUtil::maxValue());
    personName.save();

    // Create the worker
    HcmWorkerTransition::newCreateHcmWorker(personName.dirPersonName(), hcmPersonnelNumberId);
}&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;post-footer&quot; style=&quot;line-height: 1.6; margin: 1.5em 0px 0px;&quot;&gt;
&lt;div class=&quot;post-footer-line post-footer-line-1&quot;&gt;
&lt;div class=&quot;post-share-buttons goog-inline-block&quot; style=&quot;display: inline-block; margin-right: 0px; margin-top: 0.5em; position: relative; vertical-align: middle;&quot;&gt;
&lt;div class=&quot;goog-inline-block dummy-container&quot; style=&quot;background-color: white; color: #444444; display: inline-block; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 20.7999992370605px; padding-left: 0.3em; position: relative; vertical-align: top;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/2039422173235365020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/05/ax-2012-hcm-creating-worker-x-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/2039422173235365020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/2039422173235365020'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/05/ax-2012-hcm-creating-worker-x-code.html' title='AX 2012 HCM Creating a Worker x++ code'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-3648554512080987294</id><published>2015-05-27T05:39:00.000-07:00</published><updated>2015-05-27T05:39:07.640-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax 2012 ssrs report"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="network path"/><category scheme="http://www.blogger.com/atom/ns#" term="remote registry"/><category scheme="http://www.blogger.com/atom/ns#" term="report"/><category scheme="http://www.blogger.com/atom/ns#" term="report server"/><category scheme="http://www.blogger.com/atom/ns#" term="ssrs"/><category scheme="http://www.blogger.com/atom/ns#" term="system"/><category scheme="http://www.blogger.com/atom/ns#" term="troubleshoot"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>AX 2012 SSRS REPORT ERRORS AND TROUBLESHOOT</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px; font-stretch: normal; font-weight: normal; margin: 0px; position: relative;&quot;&gt;
AX 2012 SSRS - Misc Problems and Solutions&lt;/h3&gt;
&lt;div class=&quot;post-header&quot; style=&quot;background-color: white; color: #999999; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.5px; line-height: 1.6; margin: 0px 0px 1.5em;&quot;&gt;
&lt;div class=&quot;post-header-line-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-2163134518949373683&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 1.4; position: relative; width: 618px;&quot;&gt;
&lt;u&gt;Problem&lt;/u&gt;&lt;br /&gt;You get a http 503 service unavailable during installation of Report Extensions.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Solution&lt;/u&gt;&lt;br /&gt;Check the remote registry settings.Remove Report Server settings in AX.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Problem&lt;/u&gt;&lt;br /&gt;The title of the window of a SSRS report doesn&#39;t change as expected when editing it on the menu item or from Visual Studio.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Solution&lt;/u&gt;&lt;br /&gt;Delete usage data in AX.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Problem&lt;/u&gt;&lt;br /&gt;Error while setting server report parameters. Error message: The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type &#39;System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#39; failed. (rsRuntimeErrorInExpression)&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Solution&lt;/u&gt;&lt;br /&gt;Open the file C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\rssrvpolicy.config&lt;br /&gt;Set PermissionSetName to “FullTrust” at Name=Report_Expressions_Default_Permissions&lt;br /&gt;&lt;br /&gt;See:&lt;br /&gt;&lt;a href=&quot;http://community.dynamics.com/product/ax/axtechnical/b/axsupport/archive/2012/02/02/microsoft-dynamics-ax-2012-reporting-extensions-error-system-security-permissions-environmentpermission-while-running-report.aspx&quot; style=&quot;color: #6699cc; text-decoration: none;&quot;&gt;http://community.dynamics.com/product/ax/axtechnical/b/axsupport/archive/2012/02/02/microsoft-dynamics-ax-2012-reporting-extensions-error-system-security-permissions-environmentpermission-while-running-report.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Problem&lt;/u&gt;&lt;br /&gt;The reports are deployed to the wrong report folder.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Solution&lt;/u&gt;&lt;br /&gt;AX was started with the wrong active client configuration. You need to set the client configuration to the AOS that you wish to deploy to, even though you are overriding it on the client shortcut. Don&#39;t forget to restart AX afterwards - the setting is cached when AX is started.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Problem&lt;/u&gt;&lt;br /&gt;The report cannot be deployed because it couldn&#39;t find the network path.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Solution&lt;/u&gt;&lt;br /&gt;Start Windows service &quot;Remote Registry&quot;&lt;br /&gt;See:&amp;nbsp;&lt;a href=&quot;http://technet.microsoft.com/en-us/library/gg724094.aspx&quot; style=&quot;color: #6699cc; text-decoration: none;&quot;&gt;http://technet.microsoft.com/en-us/library/gg724094.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Problem&lt;/u&gt;&lt;br /&gt;Error when running SSRS in batch:&lt;br /&gt;&quot;System.InvalidCastException: Unable to cast object of type &#39;Microsoft.Dynamics.Ax.Xpp.DictMethod&#39; to type &#39;Dynamics.Ax.Application.SysDictMethod&#39;.&quot;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Solution&lt;/u&gt;&lt;br /&gt;Change SysDictMethod to DictMethod on line 3 in:&lt;br /&gt;\Classes\SrsReportRdpRdlWrapperContractInfo\buildMemberAndNestedObjectMap&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Problem&lt;/u&gt;&lt;br /&gt;Error while setting report parameters. Error message: An error has occurred during report processing. (rsProcessingAborted)&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Solution&lt;/u&gt;&lt;br /&gt;See:&amp;nbsp;&lt;a href=&quot;https://community.dynamics.com/ax/b/axsupport/archive/2013/03/12/cannot-be-processed-at-the-receiver-due-to-a-contractfilter-mismatch-at-the-endpointdispatcher.aspx&quot; style=&quot;color: #6699cc; text-decoration: none;&quot;&gt;https://community.dynamics.com/ax/b/axsupport/archive/2013/03/12/cannot-be-processed-at-the-receiver-due-to-a-contractfilter-mismatch-at-the-endpointdispatcher.aspx&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/3648554512080987294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/05/ax-2012-ssrs-report-errors-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/3648554512080987294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/3648554512080987294'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/05/ax-2012-ssrs-report-errors-and.html' title='AX 2012 SSRS REPORT ERRORS AND TROUBLESHOOT'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-5715758275320257408</id><published>2015-05-27T05:34:00.001-07:00</published><updated>2015-05-27T05:34:25.874-07:00</updated><title type='text'>SQL STATEMENT IN AX X++ CODE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; font-stretch: normal; margin: 0px; position: relative;&quot;&gt;
SQL statement in Ax code x++ generated&amp;nbsp;&lt;/h3&gt;
&lt;div class=&quot;post-header&quot; style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.6; margin: 0px 0px 1em;&quot;&gt;
&lt;div class=&quot;post-header-line-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-1075706745618793870&quot; style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2000007629395px; position: relative; width: 876px;&quot;&gt;
So here is another small tip based on me reading&amp;nbsp;&lt;a href=&quot;https://www.microsoftpressstore.com/store/inside-microsoft-dynamics-ax-2012-r3-9780735685109&quot; style=&quot;color: #4d469c; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Inside Microsoft Dynamics AX 2012 R3&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you want to know what SQL statement the SQL Server query processor generates based on a regular X++ select statement, you can add to the keyword generateOnly to the statement and afterwards call the getSQLStatement method on the record buffer.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;pre&gt;&amp;nbsp; &amp;nbsp;AccountingEvent         accountingEvent;
&amp;nbsp; &amp;nbsp;SourceDocumentHeader    sourceDocumentHeader;
   
&amp;nbsp; &amp;nbsp;select generateonly accountingEvent
&amp;nbsp; &amp;nbsp;join sourceDocumentHeader 
&amp;nbsp; &amp;nbsp;    where sourceDocumentHeader.RecId == accountingEvent.SourceDocumentHeader;

&amp;nbsp; &amp;nbsp;info (accountingEvent.getSQLStatement());&lt;/pre&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-1075706745618793870&quot; style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2000007629395px; position: relative; width: 876px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/5715758275320257408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/05/sql-statement-in-ax-x-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/5715758275320257408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/5715758275320257408'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/05/sql-statement-in-ax-x-code.html' title='SQL STATEMENT IN AX X++ CODE'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-4925029113111760568</id><published>2015-05-27T05:31:00.001-07:00</published><updated>2015-05-27T05:31:51.200-07:00</updated><title type='text'>Issue while working in Dev Environment</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-stretch: normal; margin: 0px; position: relative;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Client crashes very frequently.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-stretch: normal; margin: 0px; position: relative;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-stretch: normal; margin: 0px; position: relative;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Set-AXModelStore -InstallMode&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/4925029113111760568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/05/issue-while-working-in-dev-environment.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/4925029113111760568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/4925029113111760568'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/05/issue-while-working-in-dev-environment.html' title='Issue while working in Dev Environment'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-8484472603181945640</id><published>2015-05-27T05:28:00.000-07:00</published><updated>2015-05-27T05:28:37.169-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax"/><category scheme="http://www.blogger.com/atom/ns#" term="dynamics ax"/><category scheme="http://www.blogger.com/atom/ns#" term="dynamics ax 2009"/><category scheme="http://www.blogger.com/atom/ns#" term="dynamics ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="EFDOCQRCODE"/><category scheme="http://www.blogger.com/atom/ns#" term="GENERATE QR CODE"/><category scheme="http://www.blogger.com/atom/ns#" term="GENERATE QR CODE FROM AX"/><category scheme="http://www.blogger.com/atom/ns#" term="qr code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>QR Code DAX 2012 </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre style=&quot;background-color: white; color: #444444; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;static void JobCreateforQRCode(Args _args)
{
    Image           image;
    container       imageContainer;
    str             url;
    EFDocQRCode_BR  qrCode;  
    
    // The url to create the QR code. 
    url = &#39;http://www.google.com&#39;;
    
    // Create an instance of the QR code class
    qrCode = new EFDocQRCode_BR();
    
    // Generate a QR code for the URL and save the result to a container
    imageContainer = qrCode.generateQRCode(url);
    
    // Use AX&#39;s good old Image class to load the image from the container
    // and save it as a file
    image = new Image();
    image.setData(imageContainer);
    
    image.saveImage(&quot;F:\QrCode.jpg&quot;, ImageSaveType::JPG);
}&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/8484472603181945640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/05/qr-code-dax-2012.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/8484472603181945640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/8484472603181945640'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2015/05/qr-code-dax-2012.html' title='QR Code DAX 2012 '/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-4490119185309693514</id><published>2012-01-11T23:45:00.000-08:00</published><updated>2012-01-11T23:45:44.866-08:00</updated><title type='text'>How  to connect to an external DB from Dynamics AX using X++</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #747775; font-family: Tahoma, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 11px; line-height: 12px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;span style=&quot;line-height: 28px;&quot;&gt;&lt;u&gt;&lt;b&gt;How &amp;nbsp;to connect to an external DB from Dynamics AX using X++&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit, serif; font-size: 13.5pt;&quot;&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;1. Create a DSN&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;inherit&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 9.0pt; mso-bidi-font-family: Tahoma;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-color: initial; border-image: initial; border-style: initial; font-style: inherit; line-height: 21.6pt; margin-bottom: 21.6pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;To create a Data Source Name (DSN) go to&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Administrative Tools&lt;/strong&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&amp;gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Data Sources (ODBC)&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-color: initial; border-image: initial; border-style: initial; font-style: inherit; line-height: 21.6pt; margin-bottom: 21.6pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;Create the DSN on the tier where the X++ code will call the DSN from&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit, serif; font-size: 13.5pt;&quot;&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;2. X++ code&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;inherit&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 9.0pt; mso-bidi-font-family: Tahoma;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;static void TestOdbcJob()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LoginProperty login;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OdbcConnection con;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Statement stmt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ResultSet rs;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; str strQuery, criteria;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlStatementExecutePermission&amp;nbsp;perm;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the information on the ODBC.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; login = new LoginProperty();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; login.setDSN(&quot;dsnName&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; login.setDatabase(&quot;databaseName&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Create a connection to external database.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; con = new OdbcConnection(login);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (con)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strQuery = strfmt(&quot;SELECT * from tableName WHERE XXX = ‘%1′ ORDER BY&amp;nbsp; FIELD1, FIELD2&quot;, criteria);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Assert permission for executing the sql string.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; perm = new SqlStatementExecutePermission(strQuery);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; perm.assert();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Prepare the sql statement.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stmt = con.createStatement();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rs = stmt.executeQuery(strQuery);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Cause the sql statement to run,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //then loop through each row in the result.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (rs.next())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //It is not possible to get field&amp;nbsp;2 and then 1.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Always get fields in numerical order, such as 1 then 2 the 3 etc.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print rs.getString(1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print rs.getString(2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rs.close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stmt.close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error(&quot;Failed to log on to the database through ODBC&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 21.6pt; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #333333; font-size: 9pt;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: #bcc5c1;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/4490119185309693514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2012/01/how-to-connect-to-external-db-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/4490119185309693514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/4490119185309693514'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2012/01/how-to-connect-to-external-db-from.html' title='How  to connect to an external DB from Dynamics AX using X++'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-9089584382689795850</id><published>2012-01-11T23:34:00.000-08:00</published><updated>2012-01-11T23:36:37.615-08:00</updated><title type='text'>How to print a different Sales Invoice per company in AX</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt; margin-left: 0cm; margin-right: 0cm; margin-top: 9pt;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: lime; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;How to print a different Sales Invoice per company in AX&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 12pt;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;If you want to print a different&amp;nbsp;&lt;i&gt;Sales Invoice&lt;/i&gt;&amp;nbsp;per every company you have, &amp;nbsp;change the method&amp;nbsp;&lt;b&gt;printJournal&lt;/b&gt;&amp;nbsp;in the table&amp;nbsp;&lt;i&gt;CustInvoiceJour&lt;/i&gt;&amp;nbsp;and the form&amp;nbsp;&lt;i&gt;CustInvoiceJournal&lt;/i&gt;&amp;nbsp;(MenuButton &quot;SalesInvoiceShow&quot; -&amp;gt; Copy, Original and Original print):&lt;br /&gt;
&lt;br /&gt;
Modified method&amp;nbsp;&lt;i&gt;printJournal&lt;/i&gt;&amp;nbsp;for the table&amp;nbsp;&lt;i&gt;CustInvoiceJour&lt;/i&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;server &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp; printJournal(SalesFormLetter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; salesFormLetter = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RecordSortedList&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; journalList&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NoYes &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;copy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NoYes::No)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Args&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameters = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; Args();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MenuFunction&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; salesInvoiceMenu;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 12pt;&quot;&gt;// Show the correct report for the every company in AX&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;switch&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; (strupr(curExt()))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;case&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #006080; font-family: Consolas; font-size: 12pt;&quot;&gt;&quot;CEU&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; salesInvoiceMenu = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; MenuFunction(menuitemoutputstr(OPPSalesInvoice),MenuItemType::Output);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; salesInvoiceMenu = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; MenuFunction(menuitemoutputstr(SalesInvoice),MenuItemType::Output);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 12pt;&quot;&gt;// End&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.caller(salesFormLetter);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; (journalList)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;(journalList);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.record(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; salesInvoiceMenu.run(parameters);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
For every MenuItemButton below the&amp;nbsp;&lt;i&gt;SalesInvoiceShow&lt;/i&gt;, you must override the clicked method as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; clicked()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Args&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameters = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; Args();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MenuFunction&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; salesInvoiceMenu;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 12pt;&quot;&gt;// Let the menuItemButton as this, with original parameters but&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 12pt;&quot;&gt;// don&#39;t call super, to avoid call directly to report SalesInvoice&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 12pt;&quot;&gt;//super();&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;switch&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; (strupr(curExt()))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;case&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #006080; font-family: Consolas; font-size: 12pt;&quot;&gt;&quot;OPP&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; salesInvoiceMenu = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; MenuFunction(menuitemoutputstr(OPPSalesInvoiceCopy),MenuItemType::Output);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; salesInvoiceMenu = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 12pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt; MenuFunction(menuitemoutputstr(SalesInvoiceCopy),MenuItemType::Output);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;Thanks,&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;Vikas Mehta.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/9089584382689795850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2012/01/how-to-print-different-sales-invoice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/9089584382689795850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/9089584382689795850'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2012/01/how-to-print-different-sales-invoice.html' title='How to print a different Sales Invoice per company in AX'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-6493534739225500782</id><published>2012-01-11T23:21:00.000-08:00</published><updated>2012-01-11T23:21:07.060-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="change"/><category scheme="http://www.blogger.com/atom/ns#" term="color in AX  color of form in AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Color your dynamics environments"/><category scheme="http://www.blogger.com/atom/ns#" term="How to change color for Dynamics Environment"/><title type='text'>Change Color of your Dynamics AX  Environments/Forms</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #cc0000; font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 14px;&quot;&gt;&lt;b&gt;&lt;u&gt;&amp;nbsp;Change Color of your Dynamics AX &amp;nbsp;Environments/Forms&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 14px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Arial, sans-serif; line-height: 115%;&quot;&gt;To change the color of the Dynamics forms to help indicate what environment is in use. It involved overriding the SysSetupFormRun.run() method, which will be called every time a form is opened. On the class SysSetupFormRun, create a new method with this code:&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;
&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;public void run()&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;SysSQLSystemInfo systemInfo = SysSQLSystemInfo::construct();&lt;br /&gt;
;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;super();&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;// Set the color scheme of this instance of the SysFormRun to RGB&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;this.design().colorScheme(FormColorScheme::RGB);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;// If the database name is not the live version, change the color of the form&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;if (systemInfo.getloginDatabase() != &#39;DynamicsAX_test&#39;)&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;this.design().backgroundColor(0x112255);&lt;br /&gt;
}&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, sans-serif; line-height: 115%;&quot;&gt;&amp;nbsp;If your live and test systems use the same database name, but the AOS is running on different servers you can modify this code to to match on systemInfo.getLoginServer() != &#39;MyServerName&#39;.&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: Arial, sans-serif; line-height: 115%;&quot;&gt;You can change the&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: Arial, sans-serif; line-height: 115%;&quot;&gt;color by setting the hex value. It uses the RGB values in reverse order:&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; line-height: 115%;&quot;&gt;0xBBGGRR&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 115%;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Arial, sans-serif; line-height: 115%;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;
&lt;!--[endif]--&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/6493534739225500782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2012/01/change-color-of-your-dynamics-ax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/6493534739225500782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/6493534739225500782'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2012/01/change-color-of-your-dynamics-ax.html' title='Change Color of your Dynamics AX  Environments/Forms'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-1581055851829962863</id><published>2012-01-11T07:49:00.000-08:00</published><updated>2012-01-11T07:49:15.776-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all records does not get selected in ax."/><category scheme="http://www.blogger.com/atom/ns#" term="select  records in ax"/><category scheme="http://www.blogger.com/atom/ns#" term="select all records in ax"/><category scheme="http://www.blogger.com/atom/ns#" term="select multiple records in ax"/><title type='text'>How to select multiple/all records  in AX</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;Recently I came across an issue regarding the selection of multiple records in AX ,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;You can do that in many ways:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;1) Press offcourse CTRL and then select the records with the mouse.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;2) Press SHIFT and scroll the mouse and select the end record(Make sure you keep the mouse button pressed.)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;3)&amp;nbsp;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Incase you want to select all the records you need to press&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&amp;nbsp;Ctrl+Shift+Home/End : To mark all records between the currently selected record and the first/last &amp;nbsp; &amp;nbsp;record&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&amp;nbsp;You will get the following warning.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;Do you want to continue &amp;nbsp;loading all the lines?&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC_QMqMkh3QDVuYEuBQsJeAfk7q2-Hyo4bkqxwW-QclVGNf-6W_WDFmFwqr4_s3nQ1UN6gOYhIYDJn17pklW9vhsuSpnNdHb3msn-RCl5hrSPCcvdI5KWavo5Z_zDXUkPgST4aX86BmFU/s1600/Untitled.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC_QMqMkh3QDVuYEuBQsJeAfk7q2-Hyo4bkqxwW-QclVGNf-6W_WDFmFwqr4_s3nQ1UN6gOYhIYDJn17pklW9vhsuSpnNdHb3msn-RCl5hrSPCcvdI5KWavo5Z_zDXUkPgST4aX86BmFU/s320/Untitled.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #073763;&quot;&gt;Click YES&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Thanks,&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Vikas Mehta.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/1581055851829962863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2012/01/how-to-select-multipleall-records-in-ax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/1581055851829962863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/1581055851829962863'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2012/01/how-to-select-multipleall-records-in-ax.html' title='How to select multiple/all records  in AX'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC_QMqMkh3QDVuYEuBQsJeAfk7q2-Hyo4bkqxwW-QclVGNf-6W_WDFmFwqr4_s3nQ1UN6gOYhIYDJn17pklW9vhsuSpnNdHb3msn-RCl5hrSPCcvdI5KWavo5Z_zDXUkPgST4aX86BmFU/s72-c/Untitled.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1683108690985799543.post-808326655788645314</id><published>2012-01-11T07:22:00.000-08:00</published><updated>2012-01-11T07:22:34.768-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ax is slow"/><category scheme="http://www.blogger.com/atom/ns#" term="AX Log Files"/><category scheme="http://www.blogger.com/atom/ns#" term="logs in ax"/><title type='text'>AX Log Files</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Just in case your system is running out of space or AX is too slow then delete the log files in the following location.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;&lt;b&gt;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Thanks,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Vikas Mehta.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamicsaxep.blogspot.com/feeds/808326655788645314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamicsaxep.blogspot.com/2012/01/ax-log-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/808326655788645314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1683108690985799543/posts/default/808326655788645314'/><link rel='alternate' type='text/html' href='http://dynamicsaxep.blogspot.com/2012/01/ax-log-files.html' title='AX Log Files'/><author><name>vikasmehta</name><uri>http://www.blogger.com/profile/14713543006722015304</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIeAdlRDG3C3t-OGX7lJLRSnCo0KQ_pLsKfpNPs6vwfCBCNYDShGv4An54W8-lV5qROss2qoiO9fHBaLvnCST7JbiV7BU5ehbZ2X4F-lS2phDnPprN_T0RSbAKBLgNRg/s220/vikas.jpg'/></author><thr:total>0</thr:total></entry></feed>