Logo API ile Sipariş Girişi:
Data siparis = unity.NewDataObject(DataObjectType.doSalesOrderSlip);
siparis.New();
siparis.DataFields.FieldByName(“NUMBER”).Value = “Sipariş No”;
siparis.DataFields.FieldByName(“DATE”).Value = “Tarih”;
siparis.DataFields.FieldByName(“TIME”).Value = “Zaman”;
siparis.DataFields.FieldByName(“ARP_CODE”).Value = “Firma Kodu”;
siparis.DataFields.FieldByName(“TOTAL_NET”).Value = “Toplam Tutar”;
siparis.DataFields.FieldByName(“SALESMAN_CODE”).Value = “Satıcı Kodu”;
siparis.DataFields.FieldByName(“NOTES1”).Value = “Not 1”;
siparis.DataFields.FieldByName(“NOTES2”).Value = “Not 2”;
siparis.DataFields.FieldByName(“NOTES3”).Value = “Not 3”;
siparis.DataFields.FieldByName(“NOTES4”).Value = “Not 4”;
siparis.DataFields.FieldByName(“ORDER_STATUS”).Value = 4; //ÖDeme
siparis.DataFields.FieldByName(“WITH_PAYMENT”).Value = 1 ; //ÖDeme
Lines detay = siparis.DataFields.FieldByName(“TRANSACTIONS”).Lines;
if (detay.AppendLine())
{
detay[0].FieldByName(“TYPE”).Value = 4; // Hizmet
detay[0].FieldByName(“MASTER_CODE”).Value = “Ürün Kodu”;
detay[0].FieldByName(“QUANTITY”).Value = “Sayıs”;
detay[0].FieldByName(“PRICE”).Value = “Tutar”;
detay[0].FieldByName(“TOTAL”).Value = “Toplam Tutar”;
detay[0].FieldByName(“UNIT_CODE”).Value = “Adet”;
detay[0].FieldByName(“PC_PRICE”).Value = “Tutar”;
detay[0].FieldByName(“TOTAL_NET”).Value = “Toplam Tutar”;
detay[0].FieldByName(“VAT_RATE”).Value = “KDV”;
detay[0].FieldByName(“VAT_INCLUDED”).Value = 1; //KDV Dahil
}
siparis.DataFields.FieldByName(“ITEXT”).Value = “Ekstra bilgi alanı”;
ValidateErrors err = siparis.ValidateErrors;
if (siparis.Post())
{
Console.WriteLine(“Sipariş Eklendi”);
}
else
{
Console.WriteLine(“Sipariş Eklenemedi”);
for (int i = 0; i < err.Count; i++)
{
Console.WriteLine(“{0} – {1};”, err[i].Error, err[i].ID);
}
}