📄 mintax.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#include "mInTax.h"
//---------------------------------------------------------------------------
#pragma hdrstop
#pragma package(smart_init)
TKSInTax *sdInTax;
//---------------------------------------------------------------------------
__fastcall TKSInTax::TKSInTax()
:TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSInTax::ValidHeadValues()
{
int m_InTaxLine;
int b_InTaxLine;
m_InTaxLine=GetMasterValue("InTaxLine");
b_InTaxLine=GetMasterOldValue("InTaxLine");
if(m_InTaxLine<0)
throw Exception("行号不能为负");
if(m_InTaxLine!=b_InTaxLine)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("SELECT InTaxLine FROM SDInTax WHERE InTaxLine='" +AnsiString(m_InTaxLine)+"'");
Query->Open();
if(Query->RecordCount>0)
{
Query->Close();
throw Exception("行号'"+AnsiString(m_InTaxLine)+"'已存在");
}
Query->Close();
}
double m_InTaxBegAmt;
m_InTaxBegAmt=GetMasterValue("InTaxBegAmt");
if(m_InTaxBegAmt<0)
throw Exception("起始金额不能小于零");
double m_InTaxEndAmt;
m_InTaxEndAmt=GetMasterValue("InTaxEndAmt");
if(m_InTaxEndAmt<=0)
throw Exception("结束金额不能小于等于零");
if(m_InTaxEndAmt<=m_InTaxBegAmt)
throw Exception("结束金额不能小于等于起始金额");
double m_InTaxRate;
m_InTaxRate=GetMasterValue("InTaxRate");
if(m_InTaxRate<=0 ||m_InTaxRate>=100)
throw Exception("税率不能小于等于'0'或大于等于'100'");
}
//---------------------------------------------------------------------------
void __fastcall TKSInTax::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -