Giriş/Çıkış fişlerinde serilot numarası ve miktar bilgisini set edip çağrıldığında ilgili çıkış fişleri için giriş hareketlerini otomatik bularak SL_DETAILS altına dolduran metod'dur.
Parametre | Type | Açıklama |
---|---|---|
slCode | String | Serilot kodudur. |
amount | double | LOT için miktar bilgisidir. |
locCode | String | Stok yeri kodudur. |
lOMtd | short | FIFO yada LIFO ayrımını yapabileceğimiz opsiyonel parametredir. Öndeğeri -1 değerindedir. Bu şekilde bırakıldığında programdaki ilgili parametreden okunuyor. Aksi belirtilmek istendiğinde ise 0 (FIFO) ve 1 (LIFO) değerleri set edilebilir. |
Return Type | Açıklama | |
Boolean | Method çalışır ve ugun Seri/Lot set edilebildiyse TRUE, diğer durumlarda FALSE döner. |
C# Örneği
UnityObjects.Data Invoice = Global.UnityApp.NewDataObject(UnityObjects.DataObjectType.doSalesInvoice);
Invoice.New();
Invoice.DataFields.FieldByName("TYPE").Value = 7;
Invoice.DataFields.FieldByName("NUMBER").Value = "~";
Invoice.DataFields.FieldByName("DATE").Value = "17.07.2009";
Invoice.DataFields.FieldByName("TIME").Value = 254481483;
Invoice.DataFields.FieldByName("ARP_CODE").Value = "CARI.01";
Invoice.DataFields.FieldByName("POST_FLAGS").Value = 247;
Invoice.DataFields.FieldByName("VAT_RATE").Value = 18;
Invoice.DataFields.FieldByName("VAT_INCLUDED_GRS").Value = 1;
Invoice.DataFields.FieldByName("CURRSEL_TOTALS").Value = 1;
UnityObjects.Lines transactionstransaction = Invoice.DataFields.FieldByName("TRANSACTIONS").Lines;
transactionstransaction.AppendLine();
transactionstransaction[transactionstransaction.Count - 1].FieldByName("TYPE").Value = 0;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("MASTER_CODE").Value = "LOTLU";
transactionstransaction[transactionstransaction.Count - 1].FieldByName("QUANTITY").Value = 7;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("PRICE").Value = 2000;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("UNIT_CODE").Value = "ADET";
transactionstransaction[transactionstransaction.Count - 1].FieldByName("VAT_INCLUDED").Value = 1;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("VAT_RATE").Value = 18;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("EDT_CURR").Value = 160;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("EDT_PRICE").Value = 2000;
if (transactionstransaction.AddSeriLots("LOT.007",4,"STOK1"))
{
MessageBox.Show("sl_details eklendi");
}
if (transactionstransaction.AddSeriLots("LOT.006",3,"STOK1"))
{
MessageBox.Show("sl_details eklendi");
}
transactionstransaction.AppendLine();
transactionstransaction[transactionstransaction.Count - 1].FieldByName("TYPE").Value = 0;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("MASTER_CODE").Value = "LOTLU.02";
transactionstransaction[transactionstransaction.Count - 1].FieldByName("QUANTITY").Value = 10;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("PRICE").Value = 1000;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("UNIT_CODE").Value = "ADET";
transactionstransaction[transactionstransaction.Count - 1].FieldByName("VAT_INCLUDED").Value = 1;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("VAT_RATE").Value = 18;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("EDT_CURR").Value = 160;
transactionstransaction[transactionstransaction.Count - 1].FieldByName("EDT_PRICE").Value = 2000;
if (transactionstransaction.AddSeriLots("LOTLU.02.001",10))
{
MessageBox.Show("sl_details eklendi");
}
if (!Invoice.Post())
{
if (Invoice.ErrorCode!=0)
{
MessageBox.Show("DB Error: ("+Invoice.ErrorCode.ToString()+ ") -"+ Invoice.ErrorDesc);
}
}
else
{
if (Invoice.ValidateErrors.Count > 0)
{
for (int i = 0; i < Invoice.ValidateErrors.Count - 1; i++)
{
MessageBox.Show("XML Error : (" + Invoice.ValidateErrors[i].ID.ToString() + ") - " + Invoice.ValidateErrors[i].Error);
}
}
}
Copyright © 2018 Logo Yazılım