Показать сообщение отдельно
Старый 23.10.2003, 10:28   #3  
raz is offline
raz
NavAx
Аватар для raz
NavAx Club
Лучший по профессии 2014
Лучший по профессии 2009
 
1,496 / 1071 (38) ++++++++
Регистрация: 22.07.2003
Адрес: МО
можно так
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;
.....