Показать сообщение отдельно
Старый 20.05.2005, 10:50   #7  
vasiliy is offline
vasiliy
Программер
 
288 / 17 (1) ++
Регистрация: 21.10.2004
Адрес: E-burg
PHP код:
                    ledgerVoucherObject ledgerVoucher.findLedgerVoucherObject();
                    
LedgerVoucherTransObject =
                        
LedgerVoucherTransObject::newCreateTrans(
                            
ledgerVoucherObject,
                            
LedgerPostingType::PurchUpdTransCharg,
                            
account,
                            
CustInvoiceTrans.dimension,
                            
correctJour.currencyCode,
                            
AmountTrans,
                            
CustInvoiceTrans.recId,
                            
0
                            
);

                    if (
AmountTrans 0)
                        
LedgerVoucherTransObject.parmCorrect(NoYes::Yes);

                    
ledgerVoucher.addTrans(LedgerVoucherTransObject);

                    
ledgerVoucherObject.parmTransDate(CustInvoiceJour.InvoiceDate); //уточнить
                    
ledgerVoucher.lastTransDate(ledgerVoucherObject.parmTransDate());

                    
bound_LedgerVoucherTransObject =
                    
LedgerVoucherTransObject::newCreateTrans(
                            
ledgerVoucherObject,
                            
LedgerPostingType::PurchReceipt,
                            
accountCorrect,
                            
CustInvoiceTrans.dimension,
                            
correctJour.currencyCode,
                            -
1*AmountTrans,
                            
CustInvoiceTrans.recId,
                            
0
                            
);

                    if (
AmountTrans 0)
                        
bound_LedgerVoucherTransObject.parmCorrect(NoYes::Yes);

                    
ledgerVoucher.addTrans(bound_LedgerVoucherTransObject);

                    
// EVGL, Correspondence II -->
                    
if (ledgerBondClient && AmountTrans)
                    {
                        
ledgerBondClient.bondVRef2VRef(ledgerBondClient.lastVrefId(),
                                                       
ledgerBondClient.lastVrefId(-1));
                    }
                    
// EVGL, Correspondence II -->

                    
ledgerVoucherObject.parmTransDate(CustInvoiceJour.InvoiceDate);
                    
ledgerVoucher.lastTransDate(ledgerVoucherObject.parmTransDate());