⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mbtht.cpp

📁 一个以前收集的基于C/S架构的ERP客户端源代码
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop
#include "mBtht.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)
TKSBtht *sdBtht;
//---------------------------------------------------------------------------
__fastcall TKSBtht::TKSBtht()
  :TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSBtht::ValidHeadValues()
{

   AnsiString  m_BthtBatch;
   AnsiString  b_BthtBatch;
   m_BthtBatch=GetMasterValue("BthtBatch");
   b_BthtBatch=GetMasterOldValue("BthtBatch");
   AnsiString  m_BthtFmonth;
   m_BthtFmonth=GetMasterValue("BthtFmonth");
   AnsiString  m_BthtLoc;
   m_BthtLoc=GetMasterValue("BthtLoc");
   AnsiString  m_BthtGoods;
   m_BthtGoods=GetMasterValue("BthtGoods");
    if(m_BthtFmonth.IsEmpty())
       throw Exception("当前的财务月份不能为空!");
    if(m_BthtLoc.IsEmpty())
       throw Exception("物料的存储货位不能为空!");
    if(m_BthtGoods.IsEmpty())
       throw Exception("物料的编码不能为空!");
    if(m_BthtBatch.IsEmpty())
       throw Exception("批号编码不能为空!");
    if(m_BthtBatch.Length()>18)
       throw Exception("批号编码:'"+m_BthtBatch+"'的长度不能大于18!");
    if(m_BthtBatch.UpperCase()!=b_BthtBatch.UpperCase())
    {
       /*if(this->FindKey(KeyStr))
          throw Exception("批号'"+m_BthtBatch+"'的帐已经存在!");  */
       Query->Close();
       Query->SQL->Clear();
       Query->SQL->Add("select BatchCode from sdBatch where BatchCode='"+m_BthtBatch+"'");
       Query->Open();
       if(Query->RecordCount<=0)
       {
          Query->Close();
          throw Exception("批号编码:'"+m_BthtBatch+"'的资料未定义!");
       }
       Query->Close();
    }

   m_BthtFmonth=GetMasterValue("BthtFmonth");

   m_BthtLoc=GetMasterValue("BthtLoc");
   m_BthtGoods=GetMasterValue("BthtGoods");

  double m_BthtBoyQty;
   m_BthtBoyQty=GetMasterValue("BthtBoyQty");
     if(m_BthtBoyQty<0)
        throw Exception("年初数不能小于零!");

  double m_BthtBopQty;
   m_BthtBopQty=GetMasterValue("BthtBopQty");
     if(m_BthtBopQty<0)
        throw Exception("期初数不能小于零!");

 double m_BthtIopQty;
   m_BthtIopQty=GetMasterValue("BthtIopQty");

  double m_BthtOopQty;
   m_BthtOopQty=GetMasterValue("BthtOopQty");
     if(m_BthtOopQty<0)
        throw Exception("本年发出数不能小于零!");

  double m_BthtIoyQty;
   m_BthtIoyQty=GetMasterValue("BthtIoyQty");
     if(m_BthtIoyQty<0)
        throw Exception("本年收入数不能小于零!");

 double m_BthtOoyQty;
   m_BthtOoyQty=GetMasterValue("BthtOoyQty");

 double m_BthtAoyQty;
   m_BthtAoyQty=GetMasterValue("BthtAoyQty");

  int m_BthtClose;
   m_BthtClose=GetMasterValue("BthtClose");

  int m_BthtInit;
   m_BthtInit=GetMasterValue("BthtInit");
}
//---------------------------------------------------------------------------
void __fastcall TKSBtht::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -