When inserting a VAT number for a customer, it checks if the value I enter exists in the TaxVATNumTable
.
为客户插入增值税号时,它会检查我输入的值是否存在于TaxVATNumTable中。
This check is active in the method: checkVATNum
in the table TaxVATNumTable
:
此检查在方法中处于活动状态:表TaxVATNumTable中的checkVATNum:
if (!TaxVATNumTable::existOptionalCountryRegion(vatNum))
ret = checkFailed(strFmt("@SYS83770", vatNum, fieldId2pname(common.TableId, fieldId), countryRegion, tableId2pname(tableNum(TaxVATNumTable))));
I want to comment out the: ret = ...
line and build in a code that the VAT number I enter at the customer is being inserted in the TaxVATNumTable
.
我想注释掉:ret = ... line并构建一个代码,我在客户输入的增值税号码被插入到TaxVATNumTable中。
This table does not have an insert
method, what is the best way to approach this situation? Create an insert
method for this?
这个表没有插入方法,处理这种情况的最佳方法是什么?为此创建一个插入方法?
1 个解决方案
#1
2
The checkVATNum()
method should not be modified as you always want to confirm that value exists.
不应修改checkVATNum()方法,因为您始终要确认该值是否存在。
What you should do is identify where the inserting action is happening, and perform a check and insert before the checkVATNum()
logic.
您应该做的是确定插入操作发生的位置,并在checkVATNum()逻辑之前执行检查和插入。
If a table doesn't have an insert()
method, you just right click on the table methods and click Override Method > Insert
. If you do this though, insert_recordset
operations will not be efficient against the specific table as the insert()
logic will need to be called, and it will break down to a regular style operation.
如果表没有insert()方法,只需右键单击表方法,然后单击“覆盖方法”>“插入”。但是,如果执行此操作,insert_recordset操作对特定表将无效,因为需要调用insert()逻辑,并且它将分解为常规样式操作。
#1
2
The checkVATNum()
method should not be modified as you always want to confirm that value exists.
不应修改checkVATNum()方法,因为您始终要确认该值是否存在。
What you should do is identify where the inserting action is happening, and perform a check and insert before the checkVATNum()
logic.
您应该做的是确定插入操作发生的位置,并在checkVATNum()逻辑之前执行检查和插入。
If a table doesn't have an insert()
method, you just right click on the table methods and click Override Method > Insert
. If you do this though, insert_recordset
operations will not be efficient against the specific table as the insert()
logic will need to be called, and it will break down to a regular style operation.
如果表没有insert()方法,只需右键单击表方法,然后单击“覆盖方法”>“插入”。但是,如果执行此操作,insert_recordset操作对特定表将无效,因为需要调用insert()逻辑,并且它将分解为常规样式操作。