Показать сообщение отдельно
Старый 26.02.2007, 15:25   #9  
raz is offline
raz
NavAx
Аватар для raz
NavAx Club
Лучший по профессии 2014
Лучший по профессии 2009
 
1,495 / 1070 (38) ++++++++
Регистрация: 22.07.2003
Адрес: МО
сторно делается через признак коррекции.
его можно так установить так
ledgerVoucher.findLedgerVoucherObject().parmCorrection(true);


X++:
//
                ledgerVoucher = LedgerVoucher::newLedgerPost(DetailSummary::Detail,
                                                             SysModule::Cust,
                                                             "001");

                ledgerVoucherObject = LedgerVoucherObject::newVoucher(Voucher, TransDate);
                ledgerVoucherObject.newTaxReference(DetailSummary::Summary);
                ledgerVoucher.AddVoucher(ledgerVoucherObject);
                ledgerVoucher.findLedgerVoucherObject().parmCorrection(true);

                ledgerBondClient    = ledgerVoucherObject.ledgerBondClient_RU();

                select LedgerTrans order by BondBatchTrans_RU, Crediting where   ;

                ledgerBondClient.addNewLogObject();

                bond = LedgerTrans.BondBatchTrans_RU;

                while (LedgerTrans)
                {
                    ledgerVoucherObject.AddTrans(LedgerVoucherTransObject::newCreateTrans(
                                                    ledgerVoucherObject,
                                                    LedgerTrans.Posting,
                                                    LedgerTrans.AccountNum,
                                                    LedgerTrans.Dimension,
                                              +/-  LedgerTrans.CurrencyCode,
                                                    LedgerTrans.AmountCur,
                                                    0));
                    next LedgerTrans;

                    if (bond != LedgerTrans.BondBatchTrans_RU)
                    {
                        ledgerBondClient.bondLastVRef2CurrentLog();

                        if (LedgerTrans)
                            ledgerBondClient.addNewLogObject();

                        bond = LedgerTrans.BondBatchTrans_RU;
                    }
                }

                ledgerVoucher.end();
типа такого

Последний раз редактировалось raz; 26.02.2007 в 15:35.