iDE Soft

Hızlı ürütim fişi ekleme

  Tiger/Logo Objects

LOD ole hizli uretim fisi ekliyorum, ama ilgili malzeme fisleri (Sarf ve uretimden giris) otomatik olusmuyor.

Bunun nasil yapa bilirim? kod orneyi asagida.


Sub ButtonClick(ctrl as String)
if ctrl="LButton1" then
UnityApp = oleObject("UnityObjects.UnityApplication")              
arr = Application.GetUsers()
for k = 0 to arr.Size-1
if Application.UserName = arr[k].Name   then
glb_FDA_userpassword= arr[k].pwd
end if
next k
'EndProgress()
SetProgressMsg("Gonderilecek Firmaya Baglanilir..")
Login = UnityApp.Login(Application.UserName,glb_FDA_userpassword,Application.CompanyId,Application.FiscPerdId)      
'str(Login,chklogin)

if Login then

xml="<?xml version=\"1.0\" encoding=\"UTF-16\"?>"
xml=xml+"<QPRODUCTIONS>"
xml=xml+"  <QPRODUCTION DBOP=\"INS\" >"
xml=xml+"    <INTERNAL_REFERENCE>1683</INTERNAL_REFERENCE>"
xml=xml+"    <FICHENO>TEST0006</FICHENO>"
xml=xml+"    <DATE>25-07-2021</DATE>"
xml=xml+"    <FTIME>255141127</FTIME>"
xml=xml+"    <AUXIL_CODE>005</AUXIL_CODE>"
xml=xml+"    <ITEM_CODE>A204.001.02.014-900GR</ITEM_CODE>"
xml=xml+"    <UEDIT>ADET</UEDIT>"
xml=xml+"    <UUNIT>ADET.GR</UUNIT>"
xml=xml+"    <AMOUNT>342</AMOUNT>"
xml=xml+"    <DEPARTMENT>0</DEPARTMENT>"
xml=xml+"    <SOURCEINDEX>0</SOURCEINDEX>"
xml=xml+"    <XML_ATTRIBUTE>2</XML_ATTRIBUTE>"
xml=xml+"    <DATA_REFERENCE>1683</DATA_REFERENCE>"
xml=xml+"    <PRODTYPE>1</PRODTYPE>"
xml=xml+"    <DEF>BIZIM ASCI BASMATI PLASTIK 900 GR 1x12</DEF>"
xml=xml+"    <TRANSACTIONS>"
xml=xml+"      <TRANSACTION>"
xml=xml+"        <LOGICALREF>0</LOGICALREF>"
xml=xml+"        <AMNT>307.8</AMNT>"
xml=xml+"        <LINENO>1</LINENO>"
xml=xml+"        <SOURCEINDEX>0</SOURCEINDEX>"
xml=xml+"        <UOMREF>33</UOMREF>"
xml=xml+"        <CARDTYPE>10</CARDTYPE>"
xml=xml+"        <SCODE>201.01.0004</SCODE>"
xml=xml+"        <COMP_TYPE>1</COMP_TYPE>"
xml=xml+"      </TRANSACTION>"
xml=xml+"      <TRANSACTION>"
xml=xml+"        <LOGICALREF>0</LOGICALREF>"
xml=xml+"        <AMNT>342</AMNT>"
xml=xml+"        <LINENO>2</LINENO>"
xml=xml+"        <SOURCEINDEX>0</SOURCEINDEX>"
xml=xml+"        <UOMREF>23</UOMREF>"
xml=xml+"        <CARDTYPE>10</CARDTYPE>"
xml=xml+"        <SCODE>201.01.0226</SCODE>"
xml=xml+"        <COMP_TYPE>1</COMP_TYPE>"
xml=xml+"      </TRANSACTION>"
xml=xml+"      <TRANSACTION>"
xml=xml+"        <LOGICALREF>0</LOGICALREF>"
xml=xml+"        <AMNT>342</AMNT>"
xml=xml+"        <LINENO>3</LINENO>"
xml=xml+"        <SOURCEINDEX>0</SOURCEINDEX>"
xml=xml+"        <UOMREF>23</UOMREF>"
xml=xml+"        <CARDTYPE>10</CARDTYPE>"
xml=xml+"        <SCODE>201.01.0294</SCODE>"
xml=xml+"        <COMP_TYPE>1</COMP_TYPE>"
xml=xml+"      </TRANSACTION>"
xml=xml+"      <TRANSACTION>"
xml=xml+"        <LOGICALREF>0</LOGICALREF>"
xml=xml+"        <AMNT>342</AMNT>"
xml=xml+"        <LINENO>4</LINENO>"
xml=xml+"        <SOURCEINDEX>0</SOURCEINDEX>"
xml=xml+"        <UOMREF>23</UOMREF>"
xml=xml+"        <CARDTYPE>10</CARDTYPE>"
xml=xml+"        <SCODE>201.01.0270</SCODE>"
xml=xml+"        <COMP_TYPE>1</COMP_TYPE>"
xml=xml+"      </TRANSACTION>"
xml=xml+"      <TRANSACTION>"
xml=xml+"        <LOGICALREF>0</LOGICALREF>"
xml=xml+"        <AMNT>28.4886</AMNT>"
xml=xml+"        <LINENO>5</LINENO>"
xml=xml+"        <SOURCEINDEX>0</SOURCEINDEX>"
xml=xml+"        <UOMREF>30</UOMREF>"
xml=xml+"        <CARDTYPE>10</CARDTYPE>"
xml=xml+"        <SCODE>201.01.0282</SCODE>"
xml=xml+"        <COMP_TYPE>1</COMP_TYPE>"
xml=xml+"      </TRANSACTION>"
xml=xml+"    </TRANSACTIONS>"
xml=xml+"    <XBUFS>0</XBUFS>"
xml=xml+"    <CALC_OPTION>1</CALC_OPTION>"
xml=xml+"  </QPRODUCTION>"
xml=xml+"</QPRODUCTIONS>"

Dim WSPBnfis As Variant
WSPBnfis  = UnityApp.NewDataObject(123)
WSPBnfis.New()
WSPBnfis.ImportFromXMLstr("",xml)
WSPBnfis.Recalculate()
post_= WSPBnfis.Post()
EndProgress()
warn(post_)

else
warn("Login failed")
end if

end if    
End Sub



Cevap vermek için giriş yapmanız gerekmektedir.