Merhaba,
Aşağıdaki kod ile 2.50 ve 2.50.00.01 setlerinde yaptığım denemelerde bir sıkıntı ile karşılaşmadım. Aynı işlemi XML dışarı /içeri yaparak denediğinizde de sıkıntı yaşanıp yaşanmadığını kontrol edebilir misiniz?
Ayrıca aktarım kodunuz ile benim kodum arasında bir fark görüyor musunuz?
UnityObjects.Data bankvo = Global.UnityApp.NewDataObject(UnityObjects.DataObjectType.doBankVoucher);
bankvo.New();
bankvo.DataFields.FieldByName("DATE").Value = "17.05.2018";
bankvo.DataFields.FieldByName("NUMBER").Value = "~";
bankvo.DataFields.FieldByName("TYPE").Value = 17;
bankvo.DataFields.FieldByName("CURRSEL_TOTALS").Value = 1;
UnityObjects.Lines transactions_lines = bankvo.DataFields.FieldByName("TRANSACTIONS").Lines;
transactions_lines.AppendLine();
transactions_lines[transactions_lines.Count - 1].FieldByName("TYPE").Value = 1;
transactions_lines[transactions_lines.Count - 1].FieldByName("TRANNO").Value = "~";
transactions_lines[transactions_lines.Count - 1].FieldByName("BANKACC_CODE").Value = "BANKA TH.01";
transactions_lines[transactions_lines.Count - 1].FieldByName("ARP_CODE").Value = "CARI.02";
transactions_lines[transactions_lines.Count - 1].FieldByName("DATE").Value = "17.05.2018";
transactions_lines[transactions_lines.Count - 1].FieldByName("TRCODE").Value = 17;
transactions_lines[transactions_lines.Count - 1].FieldByName("MODULENR").Value = 7;
transactions_lines[transactions_lines.Count - 1].FieldByName("BANK_PROC_TYPE").Value = 2;
transactions_lines[transactions_lines.Count - 1].FieldByName("DUE_DATE").Value = "17.05.2018";
transactions_lines[transactions_lines.Count - 1].FieldByName("BN_CRDTYPE").Value = 1;
bankvo.DataFields.FieldByName("BNACCCODE").Value = "BANKA TH.01";
UnityObjects.Lines attachment_invoice_lines = bankvo.DataFields.FieldByName("ATTACHMENT_INVOICE").Lines;
attachment_invoice_lines.AppendLine();
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("TYPE").Value = 9;
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("NUMBER").Value = "~";
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("DATE").Value = "17.05.2018";
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("TIME").Value = 386344202;
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("ARP_CODE").Value = "CARI.02";
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("POST_FLAGS").Value = 244;
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("VAT_RATE").Value = 18;
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("SALESMAN_CODE").Value = 1;
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("CURRSEL_TOTALS").Value = 1;
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("FROMBANK").Value = 1;
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("DOC_DATE").Value = "17.05.2018";
attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("PROFILE_ID").Value = 1;
UnityObjects.Lines transactions0 = attachment_invoice_lines[attachment_invoice_lines.Count - 1].FieldByName("TRANSACTIONS").Lines;
transactions0.AppendLine();
transactions0[transactions0.Count - 1].FieldByName("TYPE").Value = 4;
transactions0[transactions0.Count - 1].FieldByName("MASTER_CODE").Value = "HIZMET.01";
transactions0[transactions0.Count - 1].FieldByName("QUANTITY").Value = 1;
transactions0[transactions0.Count - 1].FieldByName("PRICE").Value = 1000;
transactions0[transactions0.Count - 1].FieldByName("UNIT_CODE").Value = "ADET";
transactions0[transactions0.Count - 1].FieldByName("UNIT_CONV1").Value = 1;
transactions0[transactions0.Count - 1].FieldByName("UNIT_CONV2").Value = 1;
transactions0[transactions0.Count - 1].FieldByName("VAT_RATE").Value = 15;
transactions0.AppendLine();
transactions0[transactions0.Count - 1].FieldByName("TYPE").Value = 2;
transactions0[transactions0.Count - 1].FieldByName("TOTAL").Value = 100;
transactions0[transactions0.Count - 1].FieldByName("RC_XRATE").Value = 1;
transactions0[transactions0.Count - 1].FieldByName("DISCOUNT_RATE").Value = 10;
transactions0.AppendLine();
transactions0[transactions0.Count - 1].FieldByName("TYPE").Value = 2;
transactions0[transactions0.Count - 1].FieldByName("DETAIL_LEVEL").Value = 1;
transactions0[transactions0.Count - 1].FieldByName("TOTAL").Value = 180;
transactions0[transactions0.Count - 1].FieldByName("DISCOUNT_RATE").Value = 20;
if (bankvo.Post() == true)
{
MessageBox.Show("POST OK !");
}
else
{
if (bankvo.ErrorCode != 0)
{
MessageBox.Show("DBError(" + bankvo.ErrorCode.ToString() + ")-" + bankvo.ErrorDesc + bankvo.DBErrorDesc);
}
else if (bankvo.ValidateErrors.Count > 0)
{
string result = "XML ErrorList:";
for (int i = 0; i < bankvo.ValidateErrors.Count; i++)
{
result += "(" + bankvo.ValidateErrors[i].ID.ToString() + ") - " + bankvo.ValidateErrors[i].Error;
}
MessageBox.Show(result);
}
}
Cevap vermek için giriş yapmanız gerekmektedir.
Soru sormak için lütfen oturum açınız.
Banka Alınan/Verilen Hizmet Faturalarında Genel İndirim Set Edilememe Sorunu
09/05/18 13:25   Tiger/Logo ObjectsMerhabalar. 2.50 sürümünde bankadan Alınan ve Verilen hizmet faturalarında genele yansıtmaya çalıştığım oransal ve tutarsal
indirim satırlarını set etmeye çalıştığımda Objeden "Fatura geneline uygulanan satır türü yanlış" hata mesajı almaktayım.
Fakat Satırlara oransal ve tutarsal indirim uygulayabiliyorum.