28 Ağustos 2019 Çarşamba

Satınalma taleplerinden sipariş oluşturma | Dynamics Ax

Satınalma taleplerinde girilen birim fiyatın sipariş oluşturulduğunda satınalma siparişinin birim fiyatına gelmesini PurchAutoCreate_PurchReq class'ında bulunan CreatePurchLine methodunu aşağıdaki gibi düzenlediğimizde birim fiyat talepteki olacaktır.

  if (reqLine.LineType == PurchReqLineType::Category || reqLine.PurchRFQCaseId)
        {
            searchPrice         = false;
            purchLine.PurchPrice    = reqLine.PurchPrice; // birim fiyat
            purchLine.LineDisc      = reqLine.LineDisc;
            purchLine.LinePercent   = reqLine.LinePercent;
            purchLine.PurchMarkup   = reqLine.PurchMarkup;
            purchLine.LineAmount    = purchLine.calcLineAmount();
        }
        else
        {
            searchPrice         = true;
        }
       
//        if (reqLine.ETGUnitCostPrice != 0) // maa
//         {
//           purchLine.PurchPrice = reqLine.ETGUnitCostPrice; // birim maliyet
//           searchPrice = false;
//         }
       

Üretim operasyonunu planlama projesi | Dynamics Ax

Üretim operasyonunda üretim ve iş merkezi bazlı sürelerin hesaplanması

Üretimde her bir iş emrinde harcanan süreyi ve sonrasında iş merkezi bazlı raporlanması için bir proje istenildi. 

Bunun için yapmamız gerekenlerden bir tanesi ProdId ile ilişkili bir tablo oluşturmak olacak.
Ben burada DRT_ProdOpReportTrans adında bir tablo oluşturdum ve ProdTable ile ilişkilerini aşağıdaki gibi düzenledim.




Her bir adımın sayılması için Sayı alanını, Üretimin başlangıç bitiş saatlerini, Üretimdeki duruşların girilmesi için Duruş kodu alanını ve iş merkezi alanını tabloya ekledim. Bunların dışında işlemlerin gerçekleşmesi hangi üretim üzerinde çalışılıyorsa onların bilgisi ve başlangıç bitiş saatleriyle hesaplama yapılacak olan Toplam Brüt, Duruş ve Toplam net süreleri ekledim.




Sayıyı 1 arttırmak için DRT_ProdOpReportTrans tablosunun methods'una aşağıdaki gibi kodları yazıyoruz.



1
public void initValue()
{
    super();

    this.Num = 1 + this.lastNum();
    this.TransDate = dateEndMth(systemdateget());

}
2
int lastNum()
{
    return (select maxof(Num) from DRT_ProdOpReportTrans).Num;
}
3
static Integer  Num(ProdId prodId)
{
    return (select maxof(Num) from DRT_ProdOpReportTrans
                index hint ProdIdx
                where DRT_ProdOpReportTrans.ProdId == prodId).Num;
}

Sonrasında oluşturmuş olduğumuz formun methods'una da aşağıdaki kodu yazıyoruz.


void Num()
{
    i = i+1;
}

Oluşturduğumuz formda yazacağımız kodların bölümler aşağıdaki gibi. incelemekte fayda var.



Saatin düzgün hesaplanmasını sağlamak için, Formun methods'una aşağıdaki gibi bir kod yazıyoruz.




public void init()
{
    super();

   if (DRT_ProdOpReportTrans.End == NoYes::No && DRT_ProdOpReportTrans.Start == NoYes::No)
   {
    DRT_ProdOpReportTrans.StopHour =  (DRT_ProdOpReportTrans.EndHour - DRT_ProdOpReportTrans.StartHour) / 3600;
   }

  else
   {
    DRT_ProdOpReportTrans.StopHour =  (DRT_ProdOpReportTrans.EndHour - DRT_ProdOpReportTrans.StartHour) * 0;
   }
}
DataSourcw'daki aktive'ıne aşağıdaki kodu yazarak kaydın durumuna göre alanların pasif ya da aktif olmasını sağlıyoruz.
public int active()
{
    int ret;
    DRT_ProdOpReportTrans   prodOpReportTrans;
    ProdTable               ProdTable;

    ret = super();

   if (DRT_ProdOpReportTrans.Num < DRT_ProdOpReportTrans::Num(DRT_ProdOpReportTrans.ProdId) || (DRT_ProdOpReportTrans.End == NoYes::Yes))
      {
        OpEnd.enabled(false);
        DRT_ProdOpReportTrans_ds.allowCreate(false);
        DRT_ProdOpReportTrans_ds.allowEdit(false);
      }

    else
      {
         OpEnd.enabled(true);
         DRT_ProdOpReportTrans_ds.allowCreate(true);
         DRT_ProdOpReportTrans_ds.allowEdit(true);
      }

   if (DRT_ProdOpReportTrans.Num < DRT_ProdOpReportTrans::Num(DRT_ProdOpReportTrans.ProdId) || (DRT_ProdOpReportTrans.End == NoYes::Yes || DRT_ProdOpReportTrans.Start == NoYes::Yes ))
      {
        OpEnd.enabled(false);
      }

     else
      {
         OpEnd.enabled(true);
         DRT_ProdOpReportTrans_ds.allowCreate(true);
      }

    while select firstonly prodOpReportTrans
            where DRT_ProdOpReportTrans.End == NoYes::Yes // DRT_ProdOpReportTrans.ProdId  == ProdTable.ProdId && DRT_ProdOpReportTrans.Num > 1
    {
      {
        DRT_ProdOpReportTrans_ds.allowEdit(false);

      }

     if (DRT_ProdOpReportTrans.Num > DRT_ProdOpReportTrans::Num(DRT_ProdOpReportTrans.ProdId) && DRT_ProdOpReportTrans.End == NoYes::Yes)

      {
        DRT_ProdOpReportTrans_ds.allowEdit(false);

     }
    else
     {
        DRT_ProdOpReportTrans_ds.allowEdit(true);

     }
   }
   if (DRT_ProdOpReportTrans.Num < DRT_ProdOpReportTrans::Num(DRT_ProdOpReportTrans.ProdId))
      {
        DRT_ProdOpReportTrans_ds.allowDelete(false);
      }

     else
      {
        DRT_ProdOpReportTrans_ds.allowDelete(true);
      }

   if (DRT_ProdOpReportTrans.Start == NoYes::Yes)
      {
         DRT_ProdOpReportTrans_ds.object(fieldnum(DRT_ProdOpReportTrans, End)).allowEdit(false);
         DRT_ProdOpReportTrans_ds.object(fieldnum(DRT_ProdOpReportTrans, StopId)).allowEdit(false);
         DRT_ProdOpReportTrans_ds.object(fieldnum(DRT_ProdOpReportTrans, EndHour)).allowEdit(false);
         DRT_ProdOpReportTrans_ds.object(fieldnum(DRT_ProdOpReportTrans, StartHour)).allowEdit(true);
      }

     else
      {
        DRT_ProdOpReportTrans_ds.object(fieldnum(DRT_ProdOpReportTrans, EndHour)).allowEdit(true);
      }

   if (DRT_ProdOpReportTrans.End == NoYes::Yes)
       {
         DRT_ProdOpReportTrans_ds.object(fieldnum(DRT_ProdOpReportTrans, Start)).allowEdit(false);
         DRT_ProdOpReportTrans_ds.object(fieldnum(DRT_ProdOpReportTrans, StartHour)).allowEdit(false);
       }

   if (DRT_ProdOpReportTrans.Start == NoYes::No && DRT_ProdOpReportTrans.End == NoYes::No)
       {
         DRT_ProdOpReportTrans_ds.object(fieldnum(DRT_ProdOpReportTrans, StopId)).allowEdit(true);
         DRT_ProdOpReportTrans_ds.object(fieldnum(DRT_ProdOpReportTrans, StartHour)).allowEdit(true);
       }

     else
       {
         DRT_ProdOpReportTrans_ds.object(fieldnum(DRT_ProdOpReportTrans, StopId)).allowEdit(false);
       }


    return ret;
}

Create böülümünde kayıt oluşturulurken ilgili alanların istenilen şekilde dolmasını sağlıyoruz.


public void create(boolean _append = false)
{
    DRT_ProdOpReportTrans   ProdOpReportTrans;
    ProdTable               ProdTable;
    super(_append);

    DRT_ProdOpReportTrans.TransDate =  systemdateget();
    DRT_ProdOpReportTrans.WrkCtrId  =  ProdRoute::findFirst(DRT_ProdOpReportTrans.ProdId).WrkCtrId;

    DRT_ProdOpReportTrans.Num          =  DRT_ProdOpReportTrans::Num(DRT_ProdOpReportTrans.ProdId) + 1;
    DRT_ProdOpReportTrans.QtySched     =  ProdTable::find(DRT_ProdOpReportTrans.ProdId).QtySched;
    DRT_ProdOpReportTrans.InventDimId  =  ProdTable::find(DRT_ProdOpReportTrans.ProdId).InventDimId;

    if  ((DRT_ProdOpReportTrans::Num(DRT_ProdOpReportTrans.ProdId)) < 1)
    {
      DRT_ProdOpReportTrans.Start     =  NoYes::Yes;
    }

    if  ((DRT_ProdOpReportTrans::Num(DRT_ProdOpReportTrans.ProdId)) > 1)
    {
      DRT_ProdOpReportTrans.Start     =  NoYes::No;
      DRT_ProdOpReportTrans.StartHour  = 0;
    }

}

ValidateWrite'a yazdığımız kodlar belirlenen koşullarda kayıtlara güncelleme yaptırmaya izin verir, yoksa kayıt ettirmez.


public boolean validateWrite()
{
    boolean     ret;
;

    if (DRT_ProdOpReportTrans.TransDate < ProdTable::find(DRT_ProdOpReportTrans.ProdId).SchedStart)

        return checkfailed (strfmt(" %1 Üretimin başlangıç tarihinden önce olamaz! %2",
                             ProdTable::find(DRT_ProdOpReportTrans.ProdId).ProdId, ProdTable::find(DRT_ProdOpReportTrans.ProdId).SchedStart));

    ret = super();

    return ret;
}

Bu operasyonu da bitirmek için buton eklendi ve click method'unda aşağıdaki Formun methods'una yazdığımız kod çağrıldı

.
void OpEnd()
{
    Dialog                  d = new Dialog(strfmt("%1 üretimi bitirme", DRT_ProdOpReportTrans.ProdId));
    DialogField             dlgEndHour;
    DialogGroup             dlgGroup;
    boolean ret = true;
    ;

    dlgGroup = d.addGroup("Üretimi bitir");
    dlgGroup.widthMode(FormWidth::ColumnWidth);
    dlgGroup.heightMode(FormHeight::ColumnHeight);
    dlgEndHour  = d.addField(typeid(SchedFromTime), "Bitiş saati");
    dlgEndHour.value(DRT_ProdOpReportTrans.ProdId);

    if  ((dlgEndHour.value(DRT_ProdOpReportTrans::StartHour(DRT_ProdOpReportTrans.ProdId)) > DRT_ProdOpReportTrans::EndHour(DRT_ProdOpReportTrans.ProdId)))
     {
         ret = checkfailed  ("Üretimin başlangıç saatinden önce olamaz!");
     }

     else
    if (DRT_ProdOpReportTrans)
    {
        d.run();
        if (d.closedOk())
        {
            ttsbegin;
                DRT_ProdOpReportTrans.EndHour = dlgEndHour.value();
                DRT_ProdOpReportTrans.End     = NoYes::Yes;
                DRT_ProdOpReportTrans.Update();
            ttscommit;

            DRT_ProdOpReportTrans_ds.research(true);
        }
    }
    else
        throw warning ("Öncelikle bir satır seçmelisiniz!");


Böylelikle bir üretim için operasyon süreleri sonlandırılmış oldu. Harcanan süreleri hesaplamak için yapmamız gerekenler de aşağıdaki gibi.

Toplam brüt süreyi hesaplamak için Operasyonun başladığı saatten bittiği saate kadar olan süreyi çıkardığımızda sonucu elde etmiş oluruz.

Başlangıç saatlerini aşağıdaki kodla alabiliriz. Birden fazla başlama olabilir.



display real dispStartProdHour()
{
    DRT_ProdOpReportTrans DRT_ProdOpReportTrans;

    select sum(StartHour) from DRT_ProdOpReportTrans
    where DRT_ProdOpReportTrans.ProdId == this.ProdId  && DRT_ProdOpReportTrans.Start == Noyes::Yes;
    return DRT_ProdOpReportTrans.StartHour;
}

Bitiş saatini de aşağıdaki kodla alabiliriz.



display real dispEndProdHour()
{
    DRT_ProdOpReportTrans   DRT_ProdOpReportTrans;
    select sum(EndHour) from DRT_ProdOpReportTrans
        where DRT_ProdOpReportTrans.ProdId == this.ProdId && DRT_ProdOpReportTrans.End == NoYes::Yes;
        return DRT_ProdOpReportTrans.EndHour;
}

Bitiş saatinden başlangıç saatini çıkardığımızda bu operasyonda geçen Toplam brüt süreyi elde ederiz.



server display Hours TotalTime()
{
    DRT_ProdOpReportTrans   ProdOpReportTrans;
    Hours   hours = 0;
    ;

    while select ProdOpReportTrans
            index hint ProdLineIdx
            where ProdOpReportTrans.ProdId     == this.ProdId
      if(ProdOpReportTrans.End == NoYes::Yes || ProdOpReportTrans.Start == NoYes::Yes )
      {
        hours = (ProdOpReportTrans.dispEndProdHour() - ProdOpReportTrans.dispStartProdHour()) / str2Time('00:60');
      }

   return hours;
}



Maddenin hareket durumları (InventTrans) | Dynamics Ax

Madde üzerindeki hareketler


Satınalma siparişinde;

Örnek bir madde kartı üzerinden gidelim; etiket için oluşturulmuş ETI0338 madde kartını stoğa almak için öncelikle bir satın alma siparişi oluşturalım hareketlerini inceleyelim.

1'de miktarı 2200 olacak şekilde satın alma siparişi oluşturuldu. 2'de 200 adeti faturalandı ve 3'te 150 adeti sevk irsaliyesi kesildi.



Burada madde hareketinin(InventTrans) referansı(StatusReceipt) Satınalma siparişi  olarak geliyor.

1. Sipariş oluşturuldu.

  • Referansı: Satınalma siparişi,
  • Fiili tarih ve Mali tarih dolmuyor,
  • Giriş: Sipariş edilen,
  • Çıkış: Boş

2. 150 adet miktar sevk irsaliyesi kesildi sonrasında faturalandı. Faturalandıktan sonra 150 adet siparişteki tesisin stoğuna 150 adet miktar kadar girmiş oldu.

  • Referansı: Satınalma siparişi,
  • Fiili tarih ve Mali tarih doluyor,
  • Giriş: Satın alınan,
  • Çıkış: Boş
3. 2000 adet miktar sevk irsaliyesi kesildi(İrsaliye hareketini de incelemek için).

  • Referansı: Satınalma siparişi,
  • Fiili tarih dolu, Mali tarih boş oluyor,
  • Giriş: Alındı,
  • Çıkış: Boş
Not: Nakil işleminden sonra stoğa girer, Madde hareketlerindeki miktar pozitiftir(+).

Üretimde;

TIM1583 Madde kartının üretimini oluşturalım(Üretim tamamlanmadan incelemek için).


100 adet miktar üretim oluşturuldu.

  • Referansı: Üretim,
  • Fiili tarih boş, Mali tarih boş oluyor,
  • Giriş: Sipariş edilen,
  • Çıkış: Boş
Aynı madde kartını 48 adetlik farklı bir üretimde tamamlandıktan sonra maddenin üzerindeki hareketleri inceleyelim;

Not: Nakil işleminden sonra stoğa girer, Madde hareketlerindeki miktar pozitiftir(+).

48 adet miktar üretim oluşturuldu.

  • Referansı: Üretim,
  • Fiili tarih dolu, Mali tarih dolu oluyor,
  • Giriş: Satın alınan,
  • Çıkış: Boş

Ax otomatik olarak karantina emri oluşturuyor, sonlandırılınca;

  • Referansı: Karantina emri,
  • Fiili tarih dolu, Mali tarih dolu oluyor,
  • Giriş: Boş,
  • Çıkış: Satılan,

Satışta;

24, 24 ayrı satırlarda sipariş oluşturuldu(Faturalanmışla faturalanmamış arasındaki farkı görmek için).

Not: Nakil işleminden sonra stoktan düşer, Madde hareketlerindeki miktar negatiftir(-).

Faturalanmamış(Sadece sipariş oluşturulmuş)
  • Referansı: Satış siparişi,
  • Fiili tarih boş, Mali tarih boş oluyor,
  • Giriş: Boş,
  • Çıkış: Siparişte
Faturalamış,
  • Referansı: Satış siparişi,
  • Fiili tarih dolu, Mali tarih dolu oluyor,
  • Giriş: Boş,
  • Çıkış: Satılan




Hareket günlüğünde;

Stok yönetimi > Günlükler > Madde hareketi > Hareket

Not: Nakil işleminden sonra stoktan düşer, Madde hareketlerindeki miktar negatiftir(-).

Harekete oluşturduğumuz günlüğü nakil etmeden;
  • Referansı: Hareket,
  • Fiili tarih boş, Mali tarih boş oluyor,
  • Giriş: Fiziksel rezerve miktar,
  • Çıkış: Boş,


Harekete oluşturduğumuz günlüğü nakil ettikten sonra;
  • Referansı: Hareket,
  • Fiili tarih dolu, Mali tarih dolu oluyor,
  • Giriş: Boş,
  • Çıkış: Satılan,


Maddenin hareketleri neticesinde oluşan değerler tesise göre Eldeki(InventSum) hesaplanır.




27 Ağustos 2019 Salı

InventTrans'a update işleminden sonra yeniden hesaplama yapılmalı (ReCalc) | Dynamics Ax

İnventTrans'ta update işlemi yaptıktan sonra InventSum'ı Eldeki'nin doğru çalışması için hesaplatmak gerekiyor. Tek bir kayıtta çalıştıracaksanız;

static void MAA_ReCalc_InventSumReCalcItem(Args _args)
{
    InventSumRecalcItem InventSumRecalcItem;
    ;
    InventSumRecalcItem = new InventSumRecalcItem("GUB0021", true, checkfix::Fix );
    InventSumRecalcItem.updatenow();
}
Bütün madde kartlarında çalıştırmak için;

static void MAA_ReCalc_IInventSumRecalcAllItems(Args _args)
{  
 InventTable InventTable;
   InventSumRecalcItem InventSumRecalcItem;
   ;
 
   while select InventTable
     where (InventTable.ItemType == ItemType::Item) || (InventTable.ItemType == ItemType::BOM)
   {
     InventSumRecalcItem = new InventSumRecalcItem(InventTable.ItemId, true, checkfix::fix);
     InventSumRecalcItem.updatenow();
   }
}

26 Ağustos 2019 Pazartesi

Enum'a göre display alan | Dynamics Ax

Enum değerine göre display alanın aşağıdaki gibi örnek bir kodla değiştiğini görebilirsiniz
display name LastTransAccountName ()
{
    ;
    if(this.LastTransACType == LedgerJournalACType::Cust)
        return custTable::find(this.LastTransAccount).Name;

    if(this.LastTransACType == LedgerJournalACType::Vend)
        return VendTable::find(this.LastTransAccount).Name;

    if(this.LastTransACType == LedgerJournalACType::Bank)
        return BankAccountTable::find(this.LastTransAccount).Name;

     if(this.LastTransACType == LedgerJournalACType::Ledger) // maa
        return BankAccountTable::find(this.LastTransAccount).Name;

    return "";

}

Örnek rapor | Dynamics Ax

Tarih itibariyle çek durum sorgusu

Örneğin sizden çeklerin durumunu tarih filtreli şekilde hesaplayıp raporlanmasını istenildiğinde.
Bir tablo oluşturup girilen tarihe göre hesaplama yaptırabilirsiniz.


DRT_ETGChequeHistoryByDates adında bir tablo oluşturuyoruz ve istenilen alanları ekliyoruz.
Sonrasında bunu oluşturduğumuz formun datasource'una ekliyoruz. Resimde olduğu gibi tarihi filtreleyebileceğimiz tarih alanı ve hesaplama yapabileceğimiz butonu ekliyoruz.


Formun methods'una hesaplama yaptıracağımız kodu yazıyoruz.




void calculate()
{
    LedgerJournalTrans      LTrans,LTrans2;
    LedgerJournalTable      LTable;
    DRT_ETGChequeHistoryByDates ETGchequeHistoryByDate;
    BankChequeTable         BankChequeTable;
    int                     chequeNum = 0;
    ETGBankChequeHistory    ChequeHistory;
    ;
    ttsbegin;
    delete_from ETGchequeHistoryByDate;

    while select BankChequeTable
        where BankChequeTable.AmountMST != 0
    {
        select maxof(ChequeTransNum) from LTrans
            where LTrans.BankChequeNum      == BankChequeTable.ChequeNum
                   && LTrans.TransDate          <= fromDate.dateValue()
                exists join LTable
                    where LTable.JournalNum == LTrans.JournalNum
                    &&    LTable.Posted;



        if (Ltrans && Ltrans.ChequeTransNum >= 0)
        {
            select firstonly LTrans2
                where LTrans2.BankChequeNum      == BankChequeTable.ChequeNum
                &&    LTrans2.ChequeTransNum     == LTrans.ChequeTransNum
                &&    LTrans2.TransDate          <=  fromDate.dateValue();

            ETGchequeHistoryByDate.clear();
            ETGchequeHistoryByDate.ChequeNum               = BankChequeTable.ChequeNum;
            ETGchequeHistoryByDate.CiroPayment             = BankChequeTable.ETGCiroPayment;
            ETGchequeHistoryByDate.LastTransACTypeOffset   = LTrans2.OffsetAccountType;
            ETGchequeHistoryByDate.LastTransAccountOffset  = LTrans2.OffsetAccount;


            select firstonly ChequeHistory
                where ChequeHistory.ChequeNum           == BankChequeTable.ChequeNum
                &&    ChequeHistory.RefJournalVoucher   == LTrans2.Voucher
                &&    ChequeHistory.TransDate           <=  fromDate.dateValue() ;



           if (ChequeHistory)
                {
                    ETGchequeHistoryByDate.LastTransACType       = LTrans2.AccountType;
                    ETGchequeHistoryByDate.LastTransAccount      = ChequeHistory.LastTransAccountNum ;//LTrans2.AccountNum;
                }

            else
                {
                     if(CompanyInfo::Find().DataAreaId == "TRS")
                     {
                      ETGchequeHistoryByDate.LastTransAccount    = LTrans2.OffsetAccount;//BankChequeTable.LastTransAccount; //Çek Tablosundan almak için
                      ETGchequeHistoryByDate.LastTransACType     = LTrans2.OffsetAccountType;//BankChequeTable.LastTransACType; //Çek Tablosundan almak için
                    }

                    else
                    {
                      ETGchequeHistoryByDate.LastTransAccount    = BankChequeTable.LastTransAccount; //Çek Tablosundan almak için
                      ETGchequeHistoryByDate.LastTransACType     = BankChequeTable.LastTransACType;//BankChequeTable.LastTransACType; //Çek Tablosundan almak için
                    }
               }

                    ETGchequeHistoryByDate.DocumentStatus      = LTrans2.TransactionTxtType;
                    ETGchequeHistoryByDate.ChequePrintedNum    = BankChequeTable.ChequePrintedNum;
                    ETGchequeHistoryByDate.DueDate             = BankChequeTable.DueDate;
                    ETGchequeHistoryByDate.FromDate            = fromdate.dateValue();
                    ETGchequeHistoryByDate.AmountMST           = BankChequeTable.AmountMST;
                    ETGchequeHistoryByDate.AccountID           = BankChequeTable.AccountID;
                    ETGchequeHistoryByDate.CurrencyCode        = BankChequeTable.CurrencyCode;
                    ETGchequeHistoryByDate.AmountCur           = BankChequeTable.AmountCur;
                    ETGchequeHistoryByDate.ETGChequeType       = BankChequeTable.ETGChequeType;
                    ETGchequeHistoryByDate.Customer            = BankChequeTable.Customer;

                    ETGchequeHistoryByDate.Drawer                   = BankChequeTable.Drawer; //MAA
                    ETGchequeHistoryByDate.ETGCentralBankBranchCode = BankChequeTable.ETGCentralBankBranchCode;
                    ETGchequeHistoryByDate.ETGCentralBankCode       = BankChequeTable.ETGCentralBankCode;


                     ETGchequeHistoryByDate.insert();

                     if (     BankChequeTable.ChequeNum == "CEK_030248" // Gelmesini istemediniz çek varsa bu şekilde belirtebilirsiniz.
                           || BankChequeTable.ChequeNum == "CEK_028932"
                           || BankChequeTable.ChequeNum == "CEK_029017"
                           || BankChequeTable.ChequeNum == "CEK_029088"
                           || BankChequeTable.ChequeNum == "CEK_029064"
                           || BankChequeTable.ChequeNum == "CEK_028922"
                           || BankChequeTable.ChequeNum == "CEK_029059"
                           || BankChequeTable.ChequeNum == "CEK_029151"
                           || BankChequeTable.ChequeNum == "CEK_029162")
                  {
                     ETGchequeHistoryByDate.delete();
                  }

       }
       else
       continue;

    }


    ttscommit;

    DRT_ETGChequeHistoryByDates_ds.executeQuery();
    info("Hesaplama Tamamlandı");

}

Sonrasında bu hesaplamayı buton ile çağırmak için, eklediğimiz butonun click'ine aşağıdaki kodu yazıyoruz.
Rapor bu şekilde ilgili tablolardan kayıtları alıyor ve raporu oluşturuyor.

void clicked()
{
    element.calculate();
}

Kasa borç bakiye tanımlama | Dynamics Ax

Kasa hesaplarının eksi(-)'ye düşmemesi için,

Genel muhasebe hesabı
100.01.001
100.02.001
100.03.001
100.04.001

Genel Muhasebe > Hesap planı ayrıntıları
Bakiye kontrolü alanı : Borç olarak seçildiğinde kasayı eksi(-)'ye düşürmeyecektir.



Total ciro

static void MAA_SalesTableTotal(Args _args) { SalesTable SalesTable; utcDateTime dateTime; dateTime ...