this.typeCodeMap = new HashMap<Integer, Class<?>>(); this.subaccUsedCodeMap = new HashMap<Integer, Class<?>>(); DebtorCreditor dc = new DebtorCreditor(); this.typeCodeMap.put(dc.constTypeCode(), DebtorCreditor.class); this.subaccUsedCodeMap.put(dc.constTypeCode(), DebtorCreditorUsed.class); DebtorCreditorCategory dcc = new DebtorCreditorCategory();
pReqVars.remove("DebtorCreditorneededFields"); if (pEntity.getItsTotal().compareTo(BigDecimal.ZERO) == 1) { if (!pOldEntity.getCustomer().getItsId() .equals(pEntity.getCustomer().getItsId())) { pEntity.setCustomer(getSrvOrm() .retrieveEntity(pReqVars, pEntity.getCustomer())); if (pOldEntity.getCustomer().getTaxDestination() != null || pEntity.getCustomer().getTaxDestination() != null) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_cange_customer_with_another_tax_destination");
} else { tblCustomer.getItsCells().get(0) .setItsContent(inv.getCustomer().getItsName()); if (inv.getCustomer().getTaxIdentificationNumber() != null) { docMaker.addRowToDocTable(tblCustomer); tblCustomer.getItsCells().get(++n).setItsContent(this.srvI18n .getMsg("taxIdentificationNumber", lang) + ": " + inv.getCustomer().getTaxIdentificationNumber()); if (inv.getCustomer().getRegZip() != null) { docMaker.addRowToDocTable(tblCustomer); tblCustomer.getItsCells().get(++n).setItsContent(this.srvI18n .getMsg("regZip", lang) + ": " + inv.getCustomer().getRegZip()); addr = inv.getCustomer().getRegAddress1(); addr = i18nBuyer.getRegAddress2(); } else { addr = inv.getCustomer().getRegAddress2(); addr = i18nBuyer.getRegCity(); } else { addr = inv.getCustomer().getRegCity(); addr = i18nBuyer.getRegState(); } else { addr = inv.getCustomer().getRegState();
boolean isTaxable = as.getIsExtractSalesTaxFromPurchase() && !pEntity .getItsOwner().getOmitTaxes() && !pEntity.getItsOwner().getVendor() .getIsForeigner(); if (!isTaxable) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, boolean isItemBasis = !as.getSalTaxIsInvoiceBase(); RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getItsOwner().getVendor().getTaxDestination() != null) { .getTaxDestination().getSalTaxIsInvoiceBase(); rm = pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxRoundMode();
dc = new DebtorCreditor(); dc.setItsId(Long.parseLong(dcIdStr)); dc = getSrvOrm().retrieveEntity(pReqVars, dc); if (dc == null) {
AccSettings as = getSrvAccSettings().lazyGetAccSettings(pReqVars); boolean isTaxable = as.getIsExtractSalesTaxFromPurchase() && !pItsOwner .getOmitTaxes() && !pItsOwner.getVendor().getIsForeigner(); if (isTaxable) { boolean isItemBasis = !as.getSalTaxIsInvoiceBase(); boolean isAggrOnlyRate = as.getSalTaxUseAggregItBas(); RoundingMode rm = as.getSalTaxRoundMode(); if (pItsOwner.getVendor().getTaxDestination() != null) { .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pItsOwner.getVendor() .getTaxDestination().getSalTaxUseAggregItBas(); rm = pItsOwner.getVendor() .getTaxDestination().getSalTaxRoundMode();
boolean isTaxable = as.getIsExtractSalesTaxFromPurchase() && !pEntity .getItsOwner().getPurchaseInvoice().getOmitTaxes() && !pEntity .getItsOwner().getPurchaseInvoice().getVendor().getIsForeigner(); if (!isTaxable) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getItsOwner().getPurchaseInvoice().getVendor() .getTaxDestination() != null) { .getTaxDestination().getSalTaxIsInvoiceBase(); rm = pEntity.getItsOwner().getPurchaseInvoice().getVendor() .getTaxDestination().getSalTaxRoundMode();
this.typeCodeMap = new HashMap<Integer, Class<?>>(); this.subaccUsedCodeMap = new HashMap<Integer, Class<?>>(); DebtorCreditor dc = new DebtorCreditor(); this.typeCodeMap.put(dc.constTypeCode(), DebtorCreditor.class); this.subaccUsedCodeMap.put(dc.constTypeCode(), DebtorCreditorUsed.class); DebtorCreditorCategory dcc = new DebtorCreditorCategory();
pReqVars.remove("DebtorCreditorneededFields"); if (pEntity.getItsTotal().compareTo(BigDecimal.ZERO) == 1) { if (!pOldEntity.getVendor().getItsId() .equals(pEntity.getVendor().getItsId())) { pEntity.setVendor(getSrvOrm() .retrieveEntity(pReqVars, pEntity.getVendor())); if (pOldEntity.getVendor().getTaxDestination() != null || pEntity.getVendor().getTaxDestination() != null) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_cange_customer_with_another_tax_destination");
boolean isTaxable = as.getIsExtractSalesTaxFromSales() && !pEntity .getItsOwner().getOmitTaxes() && !pEntity .getItsOwner().getCustomer().getIsForeigner(); if (!isTaxable) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getItsOwner().getCustomer() .getTaxDestination() != null) { .getTaxDestination().getSalTaxIsInvoiceBase(); rm = pEntity.getItsOwner().getCustomer() .getTaxDestination().getSalTaxRoundMode();
AccSettings as = getSrvAccSettings().lazyGetAccSettings(pReqVars); boolean isTaxable = as.getIsExtractSalesTaxFromSales() && !pItsOwner .getOmitTaxes() && !pItsOwner.getCustomer().getIsForeigner(); if (isTaxable) { boolean isItemBasis = !as.getSalTaxIsInvoiceBase(); boolean isAggrOnlyRate = as.getSalTaxUseAggregItBas(); RoundingMode rm = as.getSalTaxRoundMode(); if (pItsOwner.getCustomer().getTaxDestination() != null) { .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pItsOwner.getCustomer() .getTaxDestination().getSalTaxUseAggregItBas(); rm = pItsOwner.getCustomer() .getTaxDestination().getSalTaxRoundMode();
boolean isTaxable = as.getIsExtractSalesTaxFromSales() && !pEntity .getItsOwner().getOmitTaxes() && !pEntity.getItsOwner().getCustomer() .getIsForeigner(); pEntity.setTaxCategory(pEntity.getService().getTaxCategory()); RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getItsOwner().getCustomer().getTaxDestination() != null) { .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pEntity.getItsOwner().getCustomer() .getTaxDestination().getSalTaxUseAggregItBas(); rm = pEntity.getItsOwner().getCustomer() .getTaxDestination().getSalTaxRoundMode(); pReqVars.put("DestTaxServSelLnitsOwnerdeepLevel", 1); List<DestTaxServSelLn> dtls = getSrvOrm() for (DestTaxServSelLn dtl : dtls) { if (dtl.getTaxDestination().getItsId().equals(pEntity.getItsOwner() .getCustomer().getTaxDestination().getItsId())) {
boolean isTaxable = as.getIsExtractSalesTaxFromPurchase() && !pEntity .getItsOwner().getOmitTaxes() && !pEntity.getItsOwner().getVendor() .getIsForeigner(); pEntity.setTaxCategory(pEntity.getService().getTaxCategory()); RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getItsOwner().getVendor().getTaxDestination() != null) { .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxUseAggregItBas(); rm = pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxRoundMode(); pReqVars.put("DestTaxServPurchLnitsOwnerdeepLevel", 1); List<DestTaxServPurchLn> dtls = getSrvOrm() for (DestTaxServPurchLn dtl : dtls) { if (dtl.getTaxDestination().getItsId().equals(pEntity.getItsOwner() .getVendor().getTaxDestination().getItsId())) {
boolean isTaxable = as.getIsExtractSalesTaxFromPurchase() && !pEntity .getItsOwner().getOmitTaxes() && !pEntity.getItsOwner().getVendor() .getIsForeigner(); if (pEntity.getInvItem().getKnownCost() != null) { if (pEntity.getItsOwner().getForeignCurrency() != null) { pEntity.setTaxCategory(pEntity.getInvItem().getTaxCategory()); RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getItsOwner().getVendor().getTaxDestination() != null) { .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxUseAggregItBas(); rm = pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxRoundMode(); pReqVars.put("DestTaxGoodsLnitsOwnerdeepLevel", 1); List<DestTaxGoodsLn> dtls = getSrvOrm() for (DestTaxGoodsLn dtl : dtls) { if (dtl.getTaxDestination().getItsId().equals(pEntity .getItsOwner().getVendor().getTaxDestination().getItsId())) {
boolean isTaxable = as.getIsExtractSalesTaxFromSales() && !pEntity .getItsOwner().getOmitTaxes() && !pEntity.getItsOwner().getCustomer() .getIsForeigner(); pEntity.setTaxCategory(pEntity.getInvItem().getTaxCategory()); RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getItsOwner().getCustomer().getTaxDestination() != null) { .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pEntity.getItsOwner().getCustomer() .getTaxDestination().getSalTaxUseAggregItBas(); rm = pEntity.getItsOwner().getCustomer() .getTaxDestination().getSalTaxRoundMode(); pReqVars.put("DestTaxGoodsLnitsOwnerdeepLevel", 1); List<DestTaxGoodsLn> dtls = getSrvOrm() for (DestTaxGoodsLn dtl : dtls) { if (dtl.getTaxDestination().getItsId().equals(pEntity .getItsOwner().getCustomer().getTaxDestination().getItsId())) {
boolean isTaxable = as.getIsExtractSalesTaxFromSales() && !pEntity .getItsOwner().getOmitTaxes() && !pEntity.getItsOwner().getCustomer() .getIsForeigner(); boolean isItemBasis = !as.getSalTaxIsInvoiceBase(); boolean isAggrOnlyRate = as.getSalTaxUseAggregItBas(); if (isTaxable) { pEntity.setTaxCategory(pEntity.getInvItem().getTaxCategory()); if (pEntity.getItsOwner().getCustomer().getTaxDestination() != null) { .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pEntity.getItsOwner().getCustomer() .getTaxDestination().getSalTaxUseAggregItBas(); rm = pEntity.getItsOwner().getCustomer() .getTaxDestination().getSalTaxRoundMode(); pReqVars.put("DestTaxGoodsLnitsOwnerdeepLevel", 1); List<DestTaxGoodsLn> dtls = getSrvOrm() for (DestTaxGoodsLn dtl : dtls) { if (dtl.getTaxDestination().getItsId().equals(pEntity .getItsOwner().getCustomer().getTaxDestination().getItsId())) {