PHP код:
server static CustAccount createOneTimeAccount(Common _common)
{
NumberSeq numberSeq;
CustInvoiceTable custInvoiceTable;
SalesTable salesTable;
CustTable custTable;
;
if (!CustTable::createOneTimeAccountValidate())
return '';
ttsbegin;
numberSeq = NumberSeq::newGetNum(CustParameters::numRefOneTimeCustomerAccount());
custTable = CustTable::find(CustParameters::find().defaultCust);
custTable.accountNum = numberSeq.num();
switch (_common.tableId)
{
case custInvoiceTable.tableId :
custTable.initFromCustInvoiceTable(_common);
break;
case salesTable.tableId :
custTable.initFromSalesTable(_common);
break;
.....