Kişi bilgileri gizlidir. Logo çalışanları görebilir.

Fifo ya göre otomatik lot atanması

  Tiger/Logo Objects

Fatura/irsaliye/malzeme yönetim fişlerinde Seri/Lot takipli malzeme kullanmak istiyorum.

Fakat LOT numaralarının fifoya göre otomatik oluşmasını istiyorum.

Bunu object ile yapabiliyormuyuz. Yapabiliyor ise nasıl yapabiliyoruz




Uluç Karadeniz

Merhaba,

Bizimde benzer yapıyı kullandırdığımız müşteriler var. Object ne yazık ki bu şekilde bir yeteneğe sahip değil. İlk giren ilk çıkar mantığını sizlerin takip ederek lot atama işlemlerini yapmanız lazım.


20/11/18 09:56


Kişi bilgileri gizlidir. Logo çalışanları görebilir.

Merhaba konu hakkında bir gelişme var mıdır ?


20/02/19 10:48


Furkan Kaya

https://docs.logo.com.tr/public/wua/logo-objects/logo-objects-kuetuephanesi/data/formserilotlines


Şu yukarıdaki link aradığınız şey olabilir mi?


20/02/19 10:52


Kişi bilgileri gizlidir. Logo çalışanları görebilir.

Merhaba aynen aslında aradığım  fonksiyon sanırım bu ancak. İki kalemi olan bir satış faturasında; fonksiyonu çağırdıgımda sadece ilk kalemine FIFO olarak seri lotlu kaydediyor. Diğer kalemde uygulamıyor.  Örnek kodu da paylaşıyorum. Koyu harfler ile olan kısımda bulunuyor FormSeriLotLines 


 logoMaster = logo_App.NewDataObject(UnityObjects.DataObjectType.doSalesInvoice);


 logoMaster.New();

 switch (_productSlip.Type) {
 case 10: {
 logoMaster.DataFields.FieldByName("TYPE").Value = "8"; //satış
 }
 break;
 case 12: {
 logoMaster.DataFields.FieldByName("TYPE").Value = "3"; //iade
 }
 break;
 case 11: {
 logoMaster.DataFields.FieldByName("TYPE").Value = "9"; //hizmet
 }
 break;
 case 30: {
 logoMaster.DataFields.FieldByName("TYPE").Value = "8"; //irsaliye, satış faturası olarak
 }
 break;
 default:
 break;
 }


 if (_productSlip.IsEInvoice)
 if (logoTransform.POSlip_EInvoiceMethod == 2)
 logoMaster.DataFields.FieldByName("EINVOICE").Value = "1";


 logoMaster.DataFields.FieldByName("DATE").Value = Convert.ToDateTime(_productSlip.ActualDate).ToString("dd.MM.yyyy");

 logoMaster.DataFields.FieldByName("DATE_MODIFIED").Value = DateTime.Now.ToString("dd.MM.yyyy");

 if (logoTransform.POSlip_DocNoMethod == 2) // Belge Düzenleme Tarihi Aktarılsın
 logoMaster.DataFields.FieldByName("DOC_DATE").Value = DateTime.Now.ToString("dd.MM.yyyy");

 logoMaster.DataFields.FieldByName("TIME").Value = Convert.ToDateTime(_productSlip.CreatedOn).Second * 256 +
 Convert.ToDateTime(_productSlip.CreatedOn).Minute * 65536 +
 Convert.ToDateTime(_productSlip.CreatedOn).Hour * 16777216;

 
 if (logoMaster.DataFields.FieldByName("TYPE").Value == 3) {

 // karakter parametresini kontrol et. Eğer veri girilmişse o kadar karakteri sağdan al, başına seri no da ekleyerek logoya gönder.
 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipNo)) {

 if (logoTransform.POSlip_SlipNoCharacter > 0) {
 if (logoTransform.POSlip_SlipNoCharacter <= logoTransform.POSlip_SlipNo.Length) {
 string subSlipNo = logoTransform.POSlip_SlipNo.Substring(logoTransform.POSlip_SlipNo.Length - logoTransform.POSlip_SlipNoCharacter, logoTransform.POSlip_SlipNoCharacter);
 logoMaster.DataFields.FieldByName("NUMBER").Value = logoTransform.POSlip_SlipSerial + subSlipNo;
 }
 else {
 logoMaster.DataFields.FieldByName("NUMBER").Value = logoTransform.POSlip_SlipSerial + logoTransform.POSlip_SlipNo;
 }
 }
 else
 logoMaster.DataFields.FieldByName("NUMBER").Value = logoTransform.POSlip_SlipSerial + logoTransform.POSlip_SlipNo;
 }
 }
 else {
 
 if (!_productSlip.IsEInvoice || (_productSlip.IsEInvoice && logoTransform.POSlip_EInvoiceMethod == 1)) {
 
 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipNo)) {

 if (logoTransform.POSlip_SlipNoCharacter > 0) {
 if (logoTransform.POSlip_SlipNoCharacter <= logoTransform.POSlip_SlipNo.Length) {
 string subSlipNo = logoTransform.POSlip_SlipNo.Substring(logoTransform.POSlip_SlipNo.Length - logoTransform.POSlip_SlipNoCharacter, logoTransform.POSlip_SlipNoCharacter);
 logoMaster.DataFields.FieldByName("NUMBER").Value = logoTransform.POSlip_SlipSerial + subSlipNo;
 }
 else {
 logoMaster.DataFields.FieldByName("NUMBER").Value = logoTransform.POSlip_SlipSerial + logoTransform.POSlip_SlipNo;
 }
 }
 else
 logoMaster.DataFields.FieldByName("NUMBER").Value = logoTransform.POSlip_SlipSerial + logoTransform.POSlip_SlipNo;

 }
 }
 }


 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipCustomCode))
 logoMaster.DataFields.FieldByName("AUXIL_CODE").Value = logoTransform.POSlip_SlipCustomCode;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipAuthCode))
 logoMaster.DataFields.FieldByName("AUTH_CODE").Value = logoTransform.POSlip_SlipAuthCode;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipDocumentNo))
 logoMaster.DataFields.FieldByName("DOC_NUMBER").Value = logoTransform.POSlip_SlipDocumentNo;

 if (!string.IsNullOrEmpty(logoTransform.CodeMatching_Department))
 logoMaster.DataFields.FieldByName("DEPARTMENT").Value = logoTransform.CodeMatching_Department;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipDescription))
 logoMaster.DataFields.FieldByName("NOTES1").Value = logoTransform.POSlip_SlipDescription;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipProjectCode))
 logoMaster.DataFields.FieldByName("PROJECT_CODE").Value = logoTransform.POSlip_SlipProjectCode;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipDueDay))
 logoMaster.DataFields.FieldByName("PAYMENT_CODE").Value = logoTransform.POSlip_SlipDueDay;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipStaffCode))
 logoMaster.DataFields.FieldByName("SALESMAN_CODE").Value = logoTransform.POSlip_SlipStaffCode;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipShiptoAddress))
 logoMaster.DataFields.FieldByName("SHIPLOC_CODE").Value = logoTransform.POSlip_SlipShiptoAddress;

 if (!string.IsNullOrEmpty(logoTransform.CodeMatching_CurrAccCode))
 logoMaster.DataFields.FieldByName("ARP_CODE").Value = logoTransform.CodeMatching_CurrAccCode;
 else
 throw new Exception(_productSlip.SlipNo + " numaralı kayıtta " + _productSlip.CurrentAccountCode + " kodlu cari hesap için eşleşme kodu bulunamadı !");

 logoMaster.DataFields.FieldByName("SOURCE_WH").Value = logoTransform.CodeMatching_SourceWarehouseCode;

 logoMaster.DataFields.FieldByName("ADD_DISCOUNTS").Value = _productSlip.SubDiscountTotal;

 logoMaster.DataFields.FieldByName("TOTAL_DISCOUNTS").Value = _productSlip.DiscountTotal;

 logoMaster.DataFields.FieldByName("TOTAL_NET").Value = _productSlip.GrandTotal;

 logoMaster.DataFields.FieldByName("TOTAL_GROSS").Value = _productSlip.GrossTotal;

 logoMaster.DataFields.FieldByName("TOTAL_VAT").Value = _productSlip.VATTotal;

 logoMaster.DataFields.FieldByName("DIVISION").Value = logoTransform.CodeMatching_WorkStation;

 if (!string.IsNullOrEmpty(logoTransform.CodeMatching_Factory))
 logoMaster.DataFields.FieldByName("FACTORY").Value = logoTransform.CodeMatching_Factory;

 #endregion


 #region ProductSlipItems

 logoKalem = logoMaster.DataFields.FieldByName("TRANSACTIONS").Lines;

 // logo'daki ilk kalemin isfree olamaması için
 // 19.03.2018'deki güncelleme ile gerek kalmadı
 // _productSlip.Items = _productSlip.Items.OrderBy(x => x.IsFree).ToList();

 for (int j = 0; j < _productSlip.Items.Count; j++) {

 logoTransform.Calculate_ProductSlipItem(_productSlip, j);

 if (logoKalem.AppendLine()) {

 #region FreeItems

 if (_productSlip.Items[j].IsFree) {

 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 1;

 if (!string.IsNullOrEmpty(logoTransform.CodeMatching_ProductCode))
 logoKalem[logoKalem.Count - 1].FieldByName("MASTER_CODE").Value = logoTransform.CodeMatching_ProductCode;
 else
 throw new Exception(_productSlip.SlipNo + " numaralı kayıtta " + _productSlip.Items[j].ProductCode + " kodlu ürün için eşleşme kodu bulunamadı !");

 logoKalem[logoKalem.Count - 1].FieldByName("VAT_RATE").Value = _productSlip.Items[j].VAT;

 string _tmpUnit = "";

 if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit1)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit1;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit2)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit2;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit3)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit3;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit4)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit4;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit5)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit5;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit6)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit6;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit7)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit7;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit8)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit8;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit9)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit9;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit10)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit10;

 if (string.IsNullOrEmpty(_tmpUnit))
 _tmpUnit = _productSlip.Items[j].ProductUnitName;

 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = _tmpUnit;

 logoKalem[logoKalem.Count - 1].FieldByName("SOURCEINDEX").Value = logoTransform.CodeMatching_SourceWarehouseCode;
 logoKalem[logoKalem.Count - 1].FieldByName("SOURCECOSTGRP").Value = logoTransform.CodeMatching_SourceWarehouseCode;

 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = _productSlip.Items[j].Quantity;

 logoKalem[logoKalem.Count - 1].FieldByName("PRICE").Value = _productSlip.Items[j].UnitPrice;

 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = 100;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_SlipStaffCode;

 }
 }
 #endregion

 #region NotFreeItems

 else {


 switch (_productSlip.Items[j].Type) {
 case 10: {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 0;
 }
 break;
 case 12: {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 0;
 }
 break;
 case 11: {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 4;
 }
 break;
 case 30: {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 0;
 }
 break;
 default:
 break;
 }


 if (!string.IsNullOrEmpty(logoTransform.CodeMatching_ProductCode))
 logoKalem[logoKalem.Count - 1].FieldByName("MASTER_CODE").Value = logoTransform.CodeMatching_ProductCode;
 else
 throw new Exception(_productSlip.SlipNo + " numaralı kayıtta " + _productSlip.Items[j].ProductCode + " kodlu ürün için eşleşme kodu bulunamadı !");

 logoKalem[logoKalem.Count - 1].FieldByName("SOURCEINDEX").Value = logoTransform.CodeMatching_SourceWarehouseCode;
 logoKalem[logoKalem.Count - 1].FieldByName("SOURCECOSTGRP").Value = logoTransform.CodeMatching_SourceWarehouseCode;

 double _tmpQuantity = _productSlip.Items[j].Quantity;
 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = _productSlip.Items[j].Quantity;

 logoKalem[logoKalem.Count - 1].FieldByName("PRICE").Value = _productSlip.Items[j].UnitPrice;

 logoKalem[logoKalem.Count - 1].FieldByName("TOTAL").Value = _productSlip.Items[j].GrossTotal;


 string _tmpUnit = "";

 if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit1)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit1;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit2)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit2;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit3)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit3;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit4)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit4;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit5)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit5;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit6)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit6;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit7)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit7;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit8)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit8;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit9)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit9;
 else if (_productSlip.Items[j].ProductUnitName == logoTransform.ProductMatching_NSUnit10)
 _tmpUnit = logoTransform.ProductMatching_LogoUnit10;

 if (string.IsNullOrEmpty(_tmpUnit))
 _tmpUnit = _productSlip.Items[j].ProductUnitName;

 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = _tmpUnit;


 logoKalem[logoKalem.Count - 1].FieldByName("VAT_RATE").Value = _productSlip.Items[j].VAT;
 logoKalem[logoKalem.Count - 1].FieldByName("VAT_AMOUNT").Value = _productSlip.Items[j].VATPrice;
 logoKalem[logoKalem.Count - 1].FieldByName("VAT_BASE").Value = _productSlip.Items[j].VATTotal;
 logoKalem[logoKalem.Count - 1].FieldByName("TOTAL_NET").Value = _productSlip.Items[j].NetTotal;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipDueDay))
 logoKalem[logoKalem.Count - 1].FieldByName("PAYMENT_CODE").Value = logoTransform.POSlip_SlipDueDay;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_SlipStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_SlipStaffCode;

 if (Convert.ToString(logoMaster.DataFields.FieldByName("TYPE").Value) == "3") //Satış İade Faturası ise
 {
 logoKalem[logoKalem.Count - 1].FieldByName("RET_COST_TYPE").Value = "1";
 }


 

 #region Discounts

 if (_productSlip.Items[j].Dis1 != 0 ||
 _productSlip.Items[j].Dis2 != 0 ||
 _productSlip.Items[j].Dis3 != 0 ||
 _productSlip.Items[j].Dis4 != 0 ||
 _productSlip.Items[j].Dis5 != 0 ||
 _productSlip.Items[j].Dis6 != 0 ||
 _productSlip.Items[j].Dis7 != 0 ||
 _productSlip.Items[j].Dis8 != 0 ||
 _productSlip.Items[j].Dis9 != 0 ||
 _productSlip.Items[j].Dis10 != 0
 ) {
 if (logoTransform.POSlip_SlipLineDiscountMethod == 1)//Tekli İskonto Aktarım Yöntemi
 {
 if (logoKalem.AppendLine()) {

 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis1;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;
 //logoKalem[logoKalem.Count - 1].FieldByName("TOTAL_NET").Value = Convert.ToDouble(string.Format("{0:0.00000}", Convert.ToDouble(tmpQry.DegerAl("KalemIskTutar"))));
 //logoKalem[logoKalem.Count - 1].FieldByName("GL_CODE1").Value = tmpMuhKod3;
 //logoKalem[logoKalem.Count - 1].FieldByName("TOTAL").Value = Convert.ToDouble(string.Format("{0:0.00000}", Convert.ToDouble(tmpQry.DegerAl("KalemIskTutar"))));

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;
 }
 }
 else {
 if (_productSlip.Items[j].Dis1 != 0) {
 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis1;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }
 if (_productSlip.Items[j].Dis2 != 0) {
 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis2;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }
 if (_productSlip.Items[j].Dis3 != 0) {
 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis3;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }
 if (_productSlip.Items[j].Dis4 != 0) {
 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis4;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }
 if (_productSlip.Items[j].Dis5 != 0) {
 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis5;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }
 if (_productSlip.Items[j].Dis6 != 0) {
 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis6;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }
 if (_productSlip.Items[j].Dis7 != 0) {
 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis7;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }
 if (_productSlip.Items[j].Dis8 != 0) {
 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis8;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }
 if (_productSlip.Items[j].Dis9 != 0) {
 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis9;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }
 if (_productSlip.Items[j].Dis10 != 0) {
 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;


 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Items[j].Dis10;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CODE").Value = "";
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV1").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("UNIT_CONV2").Value = 0;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }

 }
 #endregion

 }

 }
 #endregion
 }

 

 }
 

 // tekrardan ana kayda ait parametreleri yükle
 logoTransform.Calculate_ProductSlip(_productSlip);

 #region Altİskonto

 if (logoTransform.POSlip_SlipSubDiscountMethod == 1) { // tekli alt iskonto

 //if (_productSlip.Dis1Amount != 0 || _productSlip.Dis2Amount != 0 || _productSlip.Dis3Amount != 0) {
 if (_productSlip.Dis1 != 0 || _productSlip.Dis2 != 0 || _productSlip.Dis3 != 0) {

 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;
 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("TOTAL").Value = _productSlip.SubDiscountTotal;
 //logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Dis1;

 // Emre - Erhan 20.12.2018 kapatıldı.
 double totalDiscountRate = CalculateNetDiscount(_productSlip.Dis1, _productSlip.Dis2, _productSlip.Dis3, 0, 0, 0, 0, 0, 0, 0);
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = totalDiscountRate;

 //if (logoTransform.POSlip_SlipFreeDiscountMethod == 1)
 logoKalem[logoKalem.Count - 1].FieldByName("DETAIL_LEVEL").Value = 1;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;

 }
 }
 }
 else { // çoklu alt iskonto
 if (_productSlip.Dis1Amount != 0) {

 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;
 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("TOTAL").Value = _productSlip.Dis1Amount;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Dis1;

 //if (logoTransform.POSlip_SlipFreeDiscountMethod == 1)
 logoKalem[logoKalem.Count - 1].FieldByName("DETAIL_LEVEL").Value = 1;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;
 }
 }
 if (_productSlip.Dis2Amount != 0) {

 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;
 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("TOTAL").Value = _productSlip.Dis2Amount;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Dis2;

 //if (logoTransform.POSlip_SlipFreeDiscountMethod == 1)
 logoKalem[logoKalem.Count - 1].FieldByName("DETAIL_LEVEL").Value = 1;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;
 }
 }
 if (_productSlip.Dis3Amount != 0) {

 if (logoKalem.AppendLine()) {
 logoKalem[logoKalem.Count - 1].FieldByName("TYPE").Value = 2;
 logoKalem[logoKalem.Count - 1].FieldByName("QUANTITY").Value = 0;
 logoKalem[logoKalem.Count - 1].FieldByName("TOTAL").Value = _productSlip.Dis3Amount;
 logoKalem[logoKalem.Count - 1].FieldByName("DISCOUNT_RATE").Value = _productSlip.Dis3;

 //if (logoTransform.POSlip_SlipFreeDiscountMethod == 1)
 logoKalem[logoKalem.Count - 1].FieldByName("DETAIL_LEVEL").Value = 1;

 if (!string.IsNullOrEmpty(logoTransform.POSlip_DiscountStaffCode))
 logoKalem[logoKalem.Count - 1].FieldByName("SALEMANCODE").Value = logoTransform.POSlip_DiscountStaffCode;
 }
 }
 }

 #endregion

 #endregion

 #region OtomatikSeriAtama
 if (logoTransform.POSlip_SlipLineSerialLotDescribeMethod == 1) // YOK
 {
 ;
 }
 else if (logoTransform.POSlip_SlipLineSerialLotDescribeMethod == 2) // GIRILEN DEGER
 {
 ;
 }
 else if (logoTransform.POSlip_SlipLineSerialLotDescribeMethod == 3) // SIRADAN AKTAR (FIFO)
 {
 if (logoMaster.FormSeriLotLines(0) == 1)
 {
 ;
 }
 else
 {

 }
 }
 #endregion

 #region LogoPost

 logoMaster.ApplyCampaign();

 //bool isXml = logoMaster.ExportToXML("Emre", "C:\\emre.xml");

 if (!logoMaster.Post()) {
 //rs = "ERROR";
 //string _errMessage = LogoErrorControl(logoMaster, "AddProductSlipSalesInvoicesToLOGO", logoTransform.POSlip_SlipNo);
 //throw new Exception(_errMessage);
 string _errMessage = LogoErrorControl(logoMaster, "AddProductSlipSalesInvoicesToLOGO", logoTransform.POSlip_SlipNo);
 rs.IsOk = false;
 rs.ErrorMessage = _errMessage;
 throw new Exception(rs.ErrorMessage);

 }
 else {

 rs.IsOk = true;

 string _logoNorthstarMatchingMethod = "01";

 var pt = _pDataTemplate.ParameterValues.Where(x => x.Code == "T0604").FirstOrDefault();

 if (pt != null)
 _logoNorthstarMatchingMethod = pt.ValueStr;

 if (!string.IsNullOrEmpty(_logoNorthstarMatchingMethod) && _logoNorthstarMatchingMethod == "02") {
 rs.InternalReference = Convert.ToString(logoMaster.DataFields.FieldByName("INTERNAL_REFERENCE").Value);
 }

 if (_productSlip.IsEInvoice && logoTransform.POSlip_EInvoiceMethod == 2 && logoTransform.POSlip_EInvoiceNoSendToNorthstarMethod > 0) {
 rs.Data = Convert.ToString(logoMaster.DataFields.FieldByName("NUMBER").Value);
 }
 }

 #endregion
C#



Tekrar merhaba , yaptığım testte FormSeriLotLines hata aldığımı farkettim ancak yinede seri şekilde ürünlerin logo ya gittiğini gördüm.

  if (logoMaster.FormSeriLotLines(0) == 1)
 {
 ;
 }
 else
 {
  "HATA"
 }



25/02/19 17:07

Cevap vermek için giriş yapmanız gerekmektedir.