Muh.Kod.Genel Uygula  seçeneğinde yer alan sadece boş kodlar menü seçeneği ile yapılan atanmamış muhasebe kodlarına muhasebe kodu atama işlemini yapan metod dur. Bu method'u post methodundan önce kullanmak gerekir.Paremetresi yoktur.Bu method Data New işlemlerinde çalışmamakta,sadece READ POST esnasında kullanılabilmektedir. 

Return TypeAçıklama
BooleanSadece TRUE veya FALSE, işlemin gerçekleşme durumunu dönen bir geri dönüş değeri vardır.
 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 = "01.07.2015";
 invoice.DataFields.FieldByName("TIME").Value = 19937115;
 invoice.DataFields.FieldByName("ARP_CODE").Value = "CRH01";
 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("CREATED_BY").Value = 1;
 invoice.DataFields.FieldByName("CURRSEL_TOTALS").Value = 1;
 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 = "ETICARI01";
 transactions_lines[transactions_lines.Count - 1].FieldByName("QUANTITY").Value = 12;
 transactions_lines[transactions_lines.Count - 1].FieldByName("PRICE").Value = 365;
 transactions_lines[transactions_lines.Count - 1].FieldByName("UNIT_CODE").Value = "ADET";
 transactions_lines[transactions_lines.Count - 1].FieldByName("UNIT_CONV1").Value = 1;
 transactions_lines[transactions_lines.Count - 1].FieldByName("UNIT_CONV2").Value = 1;
 transactions_lines[transactions_lines.Count - 1].FieldByName("VAT_INCLUDED").Value = 1;
 transactions_lines[transactions_lines.Count - 1].FieldByName("VAT_RATE").Value = 18;
 transactions_lines[transactions_lines.Count - 1].FieldByName("EDT_CURR").Value = 1;
 transactions_lines[transactions_lines.Count - 1].FieldByName("MONTH").Value = 7;
 transactions_lines[transactions_lines.Count - 1].FieldByName("YEAR").Value = 2015;

 invoice.DataFields.FieldByName("DEDUCTIONPART1").Value = 2;
 invoice.DataFields.FieldByName("DEDUCTIONPART2").Value = 3;
 invoice.DataFields.FieldByName("AFFECT_RISK").Value = 0;
 invoice.DataFields.FieldByName("DOC_DATE").Value = "01.07.2015";
 invoice.DataFields.FieldByName("EINVOICE").Value = 1;
 invoice.DataFields.FieldByName("PROFILE_ID").Value = 2;
 invoice.DataFields.FieldByName("EXIMVAT").Value = 0;
 invoice.DataFields.FieldByName("EARCHIVEDETR_INTPAYMENTTYPE").Value = 0;
 invoice.DataFields.FieldByName("EBOOK_DOCDATE").Value = "06.07.2015";
 invoice.DataFields.FieldByName("EBOOK_DOCNR").Value = "1234";
 invoice.DataFields.FieldByName("EBOOK_DOCTYPE").Value = 5;
 invoice.DataFields.FieldByName("EBOOK_PAYTYPE").Value = "COKSECMELI";  
 invoice.DataFields.FieldByName("EBOOK_NOPAY").Value = 1;
 invoice.FillAccCodes();            
 if (invoice.Post() == true)
   {
     MessageBox.Show("POST OK !");
   }
 else
   {
     if (invoice.ErrorCode != 0)
       {
         MessageBox.Show("DBError(" + invoice.ErrorCode.ToString() + ")-" + invoice.ErrorDesc + invoice.DBErrorDesc);
       }
     else if (invoice.ValidateErrors.Count > 0)
       {
         string result = "XML ErrorList:";
         for (int i = 0; i < invoice.ValidateErrors.Count; i++)
            {
              result += "(" + invoice.ValidateErrors[i].ID.ToString() + ") - " + invoice.ValidateErrors[i].Error;
            }
          MessageBox.Show(result);
       }
    }
Rest Örneği
{
 "DataObjectParameter" : { 
"FillAccCodesOnPreSave":true },
 "INTERNAL_REFERENCE": 0,
 "NUMBER": "~",
 "DATE": "2020-12-06T00:00:00",
 "TIME": 2176817,
 "ARP_CODE": "003",
 "CURRSEL_TOTAL": 1,
 "TRANSACTIONS": {
 "items": [
 {
 "TYPE": 0,
 "MASTER_CODE": "002",
 "QUANTITY": 5,
 "PRICE": 10,
 "VAT_RATE": 18,
 "UNIT_CODE": "ADET",
 "UNIT_CONV1": 1,
 "UNIT_CONV2": 1,
 "EDT_CURR": 1
 }
 ]
 }
 

 


Telif HakkıKullanım KoşullarıGizlilik
Copyright © 2018 Logo Yazılım