AŞAĞIDAKİ KODAL TIGER3 E İNSERT YAPILIYOR,
PERAKENDE FATURA SEÇİLDİĞİNDE FATURA LİSTESİNDE GÖZÜNEN TOPLAM İÇTEKİ TOPLAMLA FARKLI (KDV DAHİL TOPLAM+KDV HESAPLANARAK YAZIYOR TOPLAM : 256.61),
FATURA İÇİNDE DEĞİŞTİR İLE BAKILDIĞINDA TOPLAMI DOĞRU,
invoice = unitiapp.NewDataObject(UnityObjects.DataObjectType.doSalesInvoice); //FATURA ınsert
invoice.New();
invoice.DataFields.FieldByName("TYPE").Value = 7;
invoice.DataFields.FieldByName("NUMBER").Value = siparisfisno;
invoice.DataFields.FieldByName("DATE").Value = siparistarihi;
invoice.DataFields.FieldByName("TIME").Value = zaman;
invoice.DataFields.FieldByName("DOC_NUMBER").Value = FATBASID;
invoice.DataFields.FieldByName("AUXIL_CODE").Value = "ozkod";
invoice.DataFields.FieldByName("AUTH_CODE").Value = "YETKI";
invoice.DataFields.FieldByName("ARP_CODE").Value = carkod;
invoice.DataFields.FieldByName("SOURCE_WH").Value = 15;
invoice.DataFields.FieldByName("SOURCE_COST_GRP").Value = 2;
invoice.DataFields.FieldByName("DIVISION").Value = 2;
invoice.DataFields.FieldByName("DEPARTMENT").Value = 9;
// IrSALİYE İNSERTLERİ****************************************************************************************
UnityObjects.Lines dispatches_lines = invoice.DataFields.FieldByName("DISPATCHES").Lines;//iRSALİYE
dispatches_lines.AppendLine();
dispatches_lines[dispatches_lines.Count - 1].FieldByName("TYPE").Value = 7;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("NUMBER").Value = IRSNO;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DATE").Value = siparistarihi;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("TIME").Value = zaman;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("SOURCE_WH").Value = 15;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("INVOICED").Value = 1;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("CREATED_BY").Value = 43;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DATE_CREATED").Value = DateTime.Now;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("HOUR_CREATED").Value = DateTime.Today.Hour;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("MIN_CREATED").Value = DateTime.Today.Minute;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("SEC_CREATED").Value = DateTime.Today.Second;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("MODIFIED_BY").Value = 43;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("CURRSEL_TOTALS").Value = 1;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DATA_SITEID").Value = 1;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DIVISION").Value = 2;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DEPARTMENT").Value = 9;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("ORIG_NUMBER").Value = siparisfisno;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("PROJECT_CODE").Value = 2;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("AFFECT_RISK").Value = 0;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DISP_STATUS").Value = 1;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("SHIP_DATE").Value = DateTime.Now;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("SHIP_TIME").Value = zaman;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DOC_DATE").Value = siparistarihi;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DOC_TIME").Value = zaman;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("EINVOICE").Value = 2;
UnityObjects.Lines transactions_lines = invoice.DataFields.FieldByName("TRANSACTIONS").Lines;
transactions_lines.AppendLine();
transactions_lines[transactions_lines.Count - 1].FieldByName("TYPE").Value = 0;
transactions_lines[transactions_lines.Count - 1].FieldByName("MASTER_CODE").Value = stkod;
transactions_lines[transactions_lines.Count - 1].FieldByName("SOURCEINDEX").Value = 15;
transactions_lines[transactions_lines.Count - 1].FieldByName("SOURCECOSTGRP").Value = 2;
transactions_lines[transactions_lines.Count - 1].FieldByName("QUANTITY").Value = siparisSatirmiktari; //MIKTAR
transactions_lines[transactions_lines.Count - 1].FieldByName("CURR_PRICE").Value = 160;
transactions_lines[transactions_lines.Count - 1].FieldByName("TOTAL").Value = siparisSatirkdvdahiltutari;
transactions_lines[transactions_lines.Count - 1].FieldByName("COST_DISTR").Value = 0;//İSK ORAN
transactions_lines[transactions_lines.Count - 1].FieldByName("DISCOUNT_DISTR").Value = 0; //İSK TUTAR
transactions_lines[transactions_lines.Count - 1].FieldByName("UNIT_CODE").Value = birimseti;
transactions_lines[transactions_lines.Count - 1].FieldByName("UNIT_CONV1").Value = 1; //cevrim 1
transactions_lines[transactions_lines.Count - 1].FieldByName("UNIT_CONV2").Value = 1; //cevrim2
transactions_lines[transactions_lines.Count - 1].FieldByName("VAT_RATE").Value = kdvoran; //kdv oran
transactions_lines[transactions_lines.Count - 1].FieldByName("BILLED").Value = 1; //faturalandı
Convert.ToDateTime(siparistarihi).Year; //yıl
i++;
}
Cevap vermek için giriş yapmanız gerekmektedir.
Soru sormak için lütfen oturum açınız.
Logosphere kullanıcı ve parolası ile giriş yapabilirsiniz.
LOGO OBJECT FATURA KAYDI
29/05/21 15:13   Tiger/Logo ObjectsAŞAĞIDAKİ KODAL TIGER3 E İNSERT YAPILIYOR,
PERAKENDE FATURA SEÇİLDİĞİNDE FATURA LİSTESİNDE GÖZÜNEN TOPLAM İÇTEKİ TOPLAMLA FARKLI (KDV DAHİL TOPLAM+KDV HESAPLANARAK YAZIYOR TOPLAM : 256.61),
FATURA İÇİNDE DEĞİŞTİR İLE BAKILDIĞINDA TOPLAMI DOĞRU,
invoice = unitiapp.NewDataObject(UnityObjects.DataObjectType.doSalesInvoice); //FATURA ınsert
invoice.New();
invoice.DataFields.FieldByName("TYPE").Value = 7;
invoice.DataFields.FieldByName("NUMBER").Value = siparisfisno;
invoice.DataFields.FieldByName("DATE").Value = siparistarihi;
invoice.DataFields.FieldByName("TIME").Value = zaman;
invoice.DataFields.FieldByName("DOC_NUMBER").Value = FATBASID;
invoice.DataFields.FieldByName("AUXIL_CODE").Value = "ozkod";
invoice.DataFields.FieldByName("AUTH_CODE").Value = "YETKI";
invoice.DataFields.FieldByName("ARP_CODE").Value = carkod;
invoice.DataFields.FieldByName("SOURCE_WH").Value = 15;
invoice.DataFields.FieldByName("SOURCE_COST_GRP").Value = 2;
invoice.DataFields.FieldByName("DIVISION").Value = 2;
invoice.DataFields.FieldByName("DEPARTMENT").Value = 9;
// IrSALİYE İNSERTLERİ****************************************************************************************
UnityObjects.Lines dispatches_lines = invoice.DataFields.FieldByName("DISPATCHES").Lines;//iRSALİYE
dispatches_lines.AppendLine();
dispatches_lines[dispatches_lines.Count - 1].FieldByName("TYPE").Value = 7;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("NUMBER").Value = IRSNO;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DATE").Value = siparistarihi;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("TIME").Value = zaman;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("SOURCE_WH").Value = 15;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("INVOICED").Value = 1;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("CREATED_BY").Value = 43;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DATE_CREATED").Value = DateTime.Now;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("HOUR_CREATED").Value = DateTime.Today.Hour;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("MIN_CREATED").Value = DateTime.Today.Minute;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("SEC_CREATED").Value = DateTime.Today.Second;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("MODIFIED_BY").Value = 43;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("CURRSEL_TOTALS").Value = 1;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DATA_SITEID").Value = 1;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DIVISION").Value = 2;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DEPARTMENT").Value = 9;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("ORIG_NUMBER").Value = siparisfisno;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("PROJECT_CODE").Value = 2;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("AFFECT_RISK").Value = 0;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DISP_STATUS").Value = 1;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("SHIP_DATE").Value = DateTime.Now;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("SHIP_TIME").Value = zaman;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DOC_DATE").Value = siparistarihi;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("DOC_TIME").Value = zaman;
dispatches_lines[dispatches_lines.Count - 1].FieldByName("EINVOICE").Value = 2;
UnityObjects.Lines transactions_lines = invoice.DataFields.FieldByName("TRANSACTIONS").Lines;
transactions_lines.AppendLine();
transactions_lines[transactions_lines.Count - 1].FieldByName("TYPE").Value = 0;
transactions_lines[transactions_lines.Count - 1].FieldByName("MASTER_CODE").Value = stkod;
transactions_lines[transactions_lines.Count - 1].FieldByName("SOURCEINDEX").Value = 15;
transactions_lines[transactions_lines.Count - 1].FieldByName("SOURCECOSTGRP").Value = 2;
transactions_lines[transactions_lines.Count - 1].FieldByName("QUANTITY").Value = siparisSatirmiktari; //MIKTAR
transactions_lines[transactions_lines.Count - 1].FieldByName("CURR_PRICE").Value = 160;
transactions_lines[transactions_lines.Count - 1].FieldByName("TOTAL").Value = siparisSatirkdvdahiltutari;
transactions_lines[transactions_lines.Count - 1].FieldByName("COST_DISTR").Value = 0;//İSK ORAN
transactions_lines[transactions_lines.Count - 1].FieldByName("DISCOUNT_DISTR").Value = 0; //İSK TUTAR
transactions_lines[transactions_lines.Count - 1].FieldByName("UNIT_CODE").Value = birimseti;
transactions_lines[transactions_lines.Count - 1].FieldByName("UNIT_CONV1").Value = 1; //cevrim 1
transactions_lines[transactions_lines.Count - 1].FieldByName("UNIT_CONV2").Value = 1; //cevrim2
transactions_lines[transactions_lines.Count - 1].FieldByName("VAT_RATE").Value = kdvoran; //kdv oran
transactions_lines[transactions_lines.Count - 1].FieldByName("BILLED").Value = 1; //faturalandı
Convert.ToDateTime(siparistarihi).Year; //yıl
i++;
}
C# LOGOOBJECT FATURA