Показать сообщение отдельно
Старый 06.09.2011, 15:20   #2  
Andrux is offline
Andrux
Участник
Axapta Retail User
 
263 / 17 (1) ++
Регистрация: 29.05.2007
Вот сопоставление (в метод PostingProfileSettle_RU передается всегда дебетовая операция)
X++:
CustVendSettle::postingProfileSettle_RU(ledgerVoucher,
                                                    custVendTransDebit,
                                                    this.amount(_settleAmountCurDebit),
                                                    custVendTransSettlement,
                                                    settlementGroupPlaceHolder,
                                                    custVendTransCredit.Dimension,
                                                    custVendTransCredit.PostingProfile,
                                                    LedgerTransTxt::Settlement,
                                                    this.amount(closeAmountMST));

CustVendSettle::postingProfileSettle_RU(ledgerVoucher,
                                                    custVendTransDebit,
                                                    this.amount(-_settleAmountCurDebit),
                                                    custVendTransSettlement,
                                                    settlementGroupPlaceHolder,
                                                    custVendTransDebit.Dimension,
                                                    custVendTransDebit.PostingProfile,
                                                    LedgerTransTxt::Settlement,
                                                    this.amount(- closeAmountMST));
а вот отмена сопоставления (в метод PostingProfileSettle_RU передается и проводка Дт и Кт):
X++:
CustVendSettle::postingProfileSettle_RU(ledgerVoucher,
                                                        custVendTransDebet,
                                                        - transPostingLog.AmountCur,
                                                        custVendTransSettlement,
                                                        settlementGroupPlaceHolder,
                                                        custVendTransDebet.Dimension,
                                                        custVendTransDebet.PostingProfile,
                                                        LedgerTransTxt::Settlement,
                                                        - transPostingLog.AmountMST,
                                                        - transPostingLog.AmountMSTSecond);

                CustVendSettle::postingProfileSettle_RU(ledgerVoucher,
                                                        custVendTransCredit,
                                                        transPostingLog.AmountCur,
                                                        custVendTransSettlement,
                                                        settlementGroupPlaceHolder,
                                                        custVendTransCredit.Dimension,
                                                        custVendTransCredit.PostingProfile,
                                                        LedgerTransTxt::Settlement,
                                                        transPostingLog.AmountMST,
                                                        transPostingLog.AmountMSTSecond,
                                                        custVendTransDebet.CurrencyCode);