05.03.2011, 17:51 | #1 |
Member
|
Кто автор этого "гениального" кода?
\Data Dictionary\Maps\CustVendTable\Methods\balanceAllCurrency()
X++: //BP Deviation Documented display AmountCur balanceAllCurrency(CurrencyCode _currencyCode = this.Currency) { ... switch (custVendTrans.TableId) { case tablenum(CustTrans) : hasAccess = hasFieldAccess(tablenum(CustTrans), fieldnum(CustTrans, AmountCur), AccessType::View); hasAccess = hasAccess && hasFieldAccess(tablenum(CustTrans), fieldnum(CustTrans, AmountMST), AccessType::View); hasAccess = hasAccess && hasFieldAccess(tablenum(CustTrans), fieldnum(CustTrans, ExchAdjustment), AccessType::View); break; case tablenum(VendTrans) : hasAccess = hasFieldAccess(tablenum(VendTrans), fieldnum(VendTrans, AmountCur), AccessType::View); hasAccess = hasAccess && hasFieldAccess(tablenum(VendTrans), fieldnum(VendTrans, AmountMST), AccessType::View); hasAccess = hasAccess && hasFieldAccess(tablenum(VendTrans), fieldnum(VendTrans, ExchAdjustment), AccessType::View); break; } if (!hasAccess) throw error("@SYS57330"); ...
__________________
С уважением, glibs® |
|