Satış koşulu uygulama işlemini yapar.
Return Type | Açıklama |
---|---|
Boolean | Koşulun sağlanma işleminin başarıyla gerçekleştirilip geçekleştirilemediğini döner. |
C# Örneği
UnityObjects.Data order = Global.UnityApp.NewDataObject(UnityObjects.DataObjectType.doSalesOrderSlip);
order.New();
order.DataFields.FieldByName("NUMBER").Value = "~";
order.DataFields.FieldByName("DATE").Value = "01.07.2015";
order.DataFields.FieldByName("TIME").Value = 271658552;
order.DataFields.FieldByName("ARP_CODE").Value = "CRH01";
order.DataFields.FieldByName("ARP_CODE_SHPM").Value = "CRH01";
order.DataFields.FieldByName("SHIPLOC_CODE").Value = "UMRANIYE01";
order.DataFields.FieldByName("ORDER_STATUS").Value = 4;
order.DataFields.FieldByName("CREATED_BY").Value = 1;
order.DataFields.FieldByName("CURRSEL_TOTAL").Value = 1;
order.DataFields.FieldByName("DEDUCTIONPART1").Value = 2;
order.DataFields.FieldByName("DEDUCTIONPART2").Value = 3;
UnityObjects.Lines transactions_lines = order.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 = "TICARI01";
transactions_lines[transactions_lines.Count - 1].FieldByName("QUANTITY").Value = 12;
transactions_lines[transactions_lines.Count - 1].FieldByName("PRICE").Value = 3652;
transactions_lines[transactions_lines.Count - 1].FieldByName("VAT_RATE").Value = 18;
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("ORDER_RESERVE").Value = 1;
transactions_lines[transactions_lines.Count - 1].FieldByName("DUE_DATE").Value = "01.07.2015";
transactions_lines[transactions_lines.Count - 1].FieldByName("EDT_CURR").Value = 1;
transactions_lines[transactions_lines.Count - 1].FieldByName("ORG_DUE_DATE").Value = "01.07.2015";
transactions_lines[transactions_lines.Count - 1].FieldByName("ORG_QUANTITY").Value = 12;
transactions_lines[transactions_lines.Count - 1].FieldByName("ORG_PRICE").Value = 3652;
transactions_lines[transactions_lines.Count - 1].FieldByName("RESERVE_DATE").Value = "01.07.2015";
transactions_lines[transactions_lines.Count - 1].FieldByName("RESERVE_AMOUNT").Value = 12;
order.ApplyCondition();
if (order.Post() == true)
{
MessageBox.Show("POST OK !");
}
else
{
if (order.ErrorCode != 0)
{
MessageBox.Show("DBError(" + order.ErrorCode.ToString() + ")-" + order.ErrorDesc + order.DBErrorDesc);
}
else if (order.ValidateErrors.Count > 0)
{
string result = "XML ErrorList:";
for (int i = 0; i < order.ValidateErrors.Count; i++)
{
result += "(" + order.ValidateErrors[i].ID.ToString() + ") - " + order.ValidateErrors[i].Error;
}
MessageBox.Show(result);
}
}
Copyright © 2018 Logo Yazılım