RS - platform dependent record set typepublic class UtInLnTxToBs<RS> extends Object
Utility for purchase/sales invoice. It makes taxes and totals for line and invoice. Base shared code-bunch.
| Constructor and Description |
|---|
UtInLnTxToBs() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInvBsTxExTxc(List<TxDtLn> pTxdLns,
Long pCatId,
Double pSubt,
Double pSubtFc,
Double pPercent,
AcStg pAs,
TxDst pTxRules)
Adds total tax by category for farther invoice adjusting.
|
<T extends IInvb,L extends IInvLn<T,?>,TL extends AInTxLn<T>> |
adjustInvoiceLns(Map<String,Object> pRvs,
Map<String,Object> pVs,
T pInv,
List<TxDtLn> pTxdLns,
AcStg pAs,
IInvTxMeth<T,TL> pInvTxMeth)
Adjust invoice lines totals/subtotals for invoice basis method.
|
<T extends IInvb,TL extends AInTxLn<T>> |
findCreateTaxLine(Map<String,Object> pRvs,
T pInv,
List<TL> pInvTxLns,
Tax pTax,
boolean pNeedFind,
org.beigesoft.fct.IFctRq<TL> pFctInvTxLn)
Finds (if need) line with same tax or creates one.
|
org.beigesoft.log.ILog |
getLog()
Geter for log.
|
org.beigesoft.srv.INumStr |
getNumStr()
Getter for numStr.
|
org.beigesoft.rdb.IOrm |
getOrm()
Geter for orm.
|
org.beigesoft.rdb.IRdb<RS> |
getRdb()
Getter for rdb.
|
<T extends IInvb,L extends IInvLn<T,?>,TL extends AInTxLn<T>> |
makeTotals(Map<String,Object> pRvs,
Map<String,Object> pVs,
L pLine,
AcStg pAs,
TxDst pTxRules,
IInvTxMeth<T,TL> pInvTxMeth)
Makes invoice totals include taxes lines
cause line inserted/changed/deleted.
|
TxDtLn |
makeTxdLine(List<TxDtLn> pTxdLns,
Long pTdlId,
Long pCatId,
TaxEx pTax,
Double pPercent,
AcStg pAs)
Make invoice line that stores taxes data in lines set
for invoice basis or item basis aggregate rate.
|
<T extends IInvb,L extends IInvLn<T,?>> |
mkLnFinal(L pLine,
BigDecimal pTotTxs,
BigDecimal pTotTxsFc,
Boolean pIsTxByUser)
Makes invoice line final results.
|
<T extends IInvb,L extends IInvLn<T,?>,LTL extends ALnTxLn<T,L>> |
mkLnTxItBasNonAggr(Map<String,Object> pRvs,
Map<String,Object> pVs,
L pLine,
AcStg pAs,
TxDst pTxRules,
IInvTxMeth<T,?> pInvTxMeth,
IInvLnTxMeth<T,L,LTL> pInvLnTxMeth)
Makes invoice line taxes item basis basis non-aggregate.
|
<T extends IInvb,L extends IInvLn<T,?>,TL extends AInTxLn<T>,LTL extends ALnTxLn<T,L>> |
mkLnTxTo(Map<String,Object> pRvs,
Map<String,Object> pVs,
L pLine,
AcStg pAs,
TxDst pTxRules,
IInvTxMeth<T,TL> pInvTxMeth,
IInvLnTxMeth<T,L,LTL> pInvLnTxMeth)
Makes invoice line's taxes, totals.
|
String |
prn(AcStg pAs,
org.beigesoft.mdl.CmnPrf pCpf,
org.beigesoft.mdlp.UsPrf pUpf,
BigDecimal pVal)
Simple delegator to print number.
|
<T extends IInvb,L extends IInvLn<T,?>,TL extends AInTxLn<T>> |
retrieveDataTx(Map<String,Object> pRvs,
L pLine,
AcStg pAs,
TxDst pTxRules,
IInvTxMeth<T,TL> pInvTxMeth)
Retrieve from database bundle of tax data.
|
<T extends IInvb,L extends IInvLn<T,?>,TL extends AInTxLn<T>> |
retrTxdLnsAdjInv(Map<String,Object> pRvs,
T pInv,
AcStg pAs,
TxDst pTxRules,
IInvTxMeth<T,TL> pInvTxMeth)
Retrieve from database tax data for adjusting invoice lines after
invoice tax line has been changed by user.
|
TxDst |
revealTaxRules(IInvb pInv,
AcStg pAs,
Boolean pIsExtrTx)
Reveal shared tax rules for invoice..
|
void |
setLog(org.beigesoft.log.ILog pLog)
Setter for log.
|
void |
setNumStr(org.beigesoft.srv.INumStr pNumStr)
Setter for numStr.
|
void |
setOrm(org.beigesoft.rdb.IOrm pOrm)
Setter for orm.
|
void |
setRdb(org.beigesoft.rdb.IRdb<RS> pRdb)
Setter for rdb.
|
<T extends IInvb> |
updInvTots(Map<String,Object> pRvs,
Map<String,Object> pVs,
T pInv,
AcStg pAs,
IInvTxMeth<T,?> pInvTxMeth)
Update invoice totals after its line has been changed/deleted
and taxes lines has been made
or after tax line has been changed (Invoice basis).
|
public final TxDst revealTaxRules(IInvb pInv, AcStg pAs, Boolean pIsExtrTx) throws Exception
Reveal shared tax rules for invoice..
pInv - invoicepAs - Accounting SettingspIsExtrTx - if extract taxesException - - an exception.public final <T extends IInvb,L extends IInvLn<T,?>,TL extends AInTxLn<T>> void makeTotals(Map<String,Object> pRvs, Map<String,Object> pVs, L pLine, AcStg pAs, TxDst pTxRules, IInvTxMeth<T,TL> pInvTxMeth) throws Exception
Makes invoice totals include taxes lines cause line inserted/changed/deleted.
T - invoice typeL - invoice line typeTL - invoice tax line typepRvs - request scoped varspVs - Invoker scoped variables, not nullpLine - affected linepAs - Accounting SettingspTxRules - NULL if not taxablepInvTxMeth - tax method code/data for purchase/sales invoiceException - - an exception.public final <T extends IInvb> void updInvTots(Map<String,Object> pRvs, Map<String,Object> pVs, T pInv, AcStg pAs, IInvTxMeth<T,?> pInvTxMeth) throws Exception
Update invoice totals after its line has been changed/deleted and taxes lines has been made or after tax line has been changed (Invoice basis).
T - invoice typepRvs - additional parampVs - Invoker scoped variables, not nullpInv - InvoicepAs - accounting settingspInvTxMeth - tax method code/data for purchase/sales invoiceException - - an exceptionpublic final <T extends IInvb,L extends IInvLn<T,?>,TL extends AInTxLn<T>> void adjustInvoiceLns(Map<String,Object> pRvs, Map<String,Object> pVs, T pInv, List<TxDtLn> pTxdLns, AcStg pAs, IInvTxMeth<T,TL> pInvTxMeth) throws Exception
Adjust invoice lines totals/subtotals for invoice basis method.
T - invoice typeL - invoice line typeTL - invoice tax line typepRvs - additional parampVs - Invoker scoped variables, not nullpInv - invoicepTxdLns - Tax Data linespAs - ASpInvTxMeth - tax method code/data for purchase/sales invoiceException - an Exceptionpublic final <T extends IInvb,L extends IInvLn<T,?>,TL extends AInTxLn<T>> ArrayList<TxDtLn> retrTxdLnsAdjInv(Map<String,Object> pRvs, T pInv, AcStg pAs, TxDst pTxRules, IInvTxMeth<T,TL> pInvTxMeth) throws Exception
Retrieve from database tax data for adjusting invoice lines after invoice tax line has been changed by user.
T - invoice typeL - invoice line typeTL - invoice tax line typepRvs - request scoped varspInv - affected invoicepAs - Accounting SettingspTxRules - taxable rulespInvTxMeth - tax method code/data for purchase/sales invoiceException - - an exception.public final <T extends IInvb,L extends IInvLn<T,?>,TL extends AInTxLn<T>,LTL extends ALnTxLn<T,L>> void mkLnTxTo(Map<String,Object> pRvs, Map<String,Object> pVs, L pLine, AcStg pAs, TxDst pTxRules, IInvTxMeth<T,TL> pInvTxMeth, IInvLnTxMeth<T,L,LTL> pInvLnTxMeth) throws Exception
Makes invoice line's taxes, totals.
T - invoice typeL - invoice line typeTL - invoice tax line typeLTL - invoice line's tax line typepRvs - request scoped varspVs - Invoker scoped variables, not nullpLine - invoice linepAs - Accounting SettingspTxRules - NULL if not taxablepInvTxMeth - tax method code/data for purchase/sales invoicepInvLnTxMeth - tax method code/data for purchase/sales invoice lineException - - an exception.public final <T extends IInvb,L extends IInvLn<T,?>,TL extends AInTxLn<T>> DataTx retrieveDataTx(Map<String,Object> pRvs, L pLine, AcStg pAs, TxDst pTxRules, IInvTxMeth<T,TL> pInvTxMeth) throws Exception
Retrieve from database bundle of tax data.
T - invoice typeL - invoice line typeTL - invoice tax line typepRvs - request scoped varspLine - affected linepAs - Accounting SettingspTxRules - taxable rulespInvTxMeth - tax method code/data for purchase/sales invoiceException - - an exception.public final void addInvBsTxExTxc(List<TxDtLn> pTxdLns, Long pCatId, Double pSubt, Double pSubtFc, Double pPercent, AcStg pAs, TxDst pTxRules)
Adds total tax by category for farther invoice adjusting.
pTxdLns - Tax Data linespCatId - tax category IDpSubt - subtotal without taxespSubtFc - subtotal FC without taxespPercent - tax ratepAs - ASpTxRules - tax rulespublic final TxDtLn makeTxdLine(List<TxDtLn> pTxdLns, Long pTdlId, Long pCatId, TaxEx pTax, Double pPercent, AcStg pAs)
Make invoice line that stores taxes data in lines set for invoice basis or item basis aggregate rate.
pTxdLns - Tax Data linespTdlId - line IDpCatId - tax category IDpTax - taxpPercent - tax ratepAs - ASpublic final <T extends IInvb,L extends IInvLn<T,?>,LTL extends ALnTxLn<T,L>> List<LTL> mkLnTxItBasNonAggr(Map<String,Object> pRvs, Map<String,Object> pVs, L pLine, AcStg pAs, TxDst pTxRules, IInvTxMeth<T,?> pInvTxMeth, IInvLnTxMeth<T,L,LTL> pInvLnTxMeth) throws Exception
Makes invoice line taxes item basis basis non-aggregate.
T - invoice typeL - invoice line typeLTL - invoice line's tax line typepRvs - request scoped varspVs - Invoker scoped variables, not nullpLine - invoice linepAs - Accounting SettingspTxRules - taxable rulespInvTxMeth - tax method code/data for purchase/sales invoicepInvLnTxMeth - tax method code/data for purchase/sales invoice lineException - - an exception.public final <T extends IInvb,L extends IInvLn<T,?>> void mkLnFinal(L pLine, BigDecimal pTotTxs, BigDecimal pTotTxsFc, Boolean pIsTxByUser)
Makes invoice line final results.
T - invoice typeL - invoice line typepLine - invoice linepTotTxs - total line taxespTotTxsFc - total line taxes FCpIsTxByUser - if tax set by userpublic final <T extends IInvb,TL extends AInTxLn<T>> TL findCreateTaxLine(Map<String,Object> pRvs, T pInv, List<TL> pInvTxLns, Tax pTax, boolean pNeedFind, org.beigesoft.fct.IFctRq<TL> pFctInvTxLn) throws Exception
Finds (if need) line with same tax or creates one.
T - invoice typeTL - invoice tax line typepRvs - additional parampInv - invoicepInvTxLns - invoice tax linespTax - taxpNeedFind - if need to find enabledpFctInvTxLn - invoice tax line factoryException - if no need to find but line is foundpublic final String prn(AcStg pAs, org.beigesoft.mdl.CmnPrf pCpf, org.beigesoft.mdlp.UsPrf pUpf, BigDecimal pVal)
Simple delegator to print number.
pAs - ACC stgpCpf - common prefspUpf - user prefspVal - valuepublic final org.beigesoft.srv.INumStr getNumStr()
Getter for numStr.
public final void setNumStr(org.beigesoft.srv.INumStr pNumStr)
Setter for numStr.
pNumStr - referencepublic final org.beigesoft.rdb.IRdb<RS> getRdb()
Getter for rdb.
public final void setRdb(org.beigesoft.rdb.IRdb<RS> pRdb)
Setter for rdb.
pRdb - referencepublic final org.beigesoft.rdb.IOrm getOrm()
Geter for orm.
public final void setOrm(org.beigesoft.rdb.IOrm pOrm)
Setter for orm.
pOrm - referencepublic final org.beigesoft.log.ILog getLog()
Geter for log.
public final void setLog(org.beigesoft.log.ILog pLog)
Setter for log.
pLog - referenceCopyright © 2019. All rights reserved.