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");
pReqVars.remove("DebtorCreditortaxDestinationdeepLevel"); boolean isTaxable = as.getIsExtractSalesTaxFromPurchase() && !pEntity .getItsOwner().getOmitTaxes() && !pEntity.getItsOwner().getVendor() .getIsForeigner(); if (!isTaxable) { boolean isItemBasis = !as.getSalTaxIsInvoiceBase(); RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getItsOwner().getVendor().getTaxDestination() != null) { isItemBasis = !pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxIsInvoiceBase(); rm = pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxRoundMode();
.getVendor().getItsId().equals(pEntity.getVendor().getItsId())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "prepayment_for_different_vendor");
boolean isTaxable = as.getIsExtractSalesTaxFromPurchase() && !pEntity .getItsOwner().getPurchaseInvoice().getOmitTaxes() && !pEntity .getItsOwner().getPurchaseInvoice().getVendor().getIsForeigner(); if (!isTaxable) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, boolean isItemBasis = !as.getSalTaxIsInvoiceBase(); RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getItsOwner().getPurchaseInvoice().getVendor() .getTaxDestination() != null) { isItemBasis = !pEntity.getItsOwner().getPurchaseInvoice().getVendor() .getTaxDestination().getSalTaxIsInvoiceBase(); rm = pEntity.getItsOwner().getPurchaseInvoice().getVendor() .getTaxDestination().getSalTaxRoundMode();
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) { isItemBasis = !pItsOwner.getVendor() .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pItsOwner.getVendor() .getTaxDestination().getSalTaxUseAggregItBas(); rm = pItsOwner.getVendor() .getTaxDestination().getSalTaxRoundMode();
.retrieveEntity(pReqVars, pEntity.getService())); 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) { isItemBasis = !pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxUseAggregItBas(); rm = pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxRoundMode(); pReqVars.put("DestTaxServPurchLnitsOwnerdeepLevel", 1); for (DestTaxServPurchLn dtl : dtls) { if (dtl.getTaxDestination().getItsId().equals(pEntity.getItsOwner() .getVendor().getTaxDestination().getItsId())) {
pEntity.setTheRest(pEntity.getItsQuantity()); boolean isTaxable = as.getIsExtractSalesTaxFromPurchase() && !pEntity .getItsOwner().getOmitTaxes() && !pEntity.getItsOwner().getVendor() .getIsForeigner(); if (pEntity.getInvItem().getKnownCost() != null) { pEntity.setTaxCategory(pEntity.getInvItem().getTaxCategory()); RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getItsOwner().getVendor().getTaxDestination() != null) { isItemBasis = !pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxUseAggregItBas(); rm = pEntity.getItsOwner().getVendor() .getTaxDestination().getSalTaxRoundMode(); pReqVars.put("DestTaxGoodsLnitsOwnerdeepLevel", 1); for (DestTaxGoodsLn dtl : dtls) { if (dtl.getTaxDestination().getItsId().equals(pEntity .getItsOwner().getVendor().getTaxDestination().getItsId())) {
.getVendor().getItsId().equals(pEntity.getVendor().getItsId())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "prepayment_for_different_vendor");
RoundingMode rm = as.getSalTaxRoundMode(); if (pEntity.getPurchaseInvoiceLine().getTaxCategory() != null && pEntity.getItsOwner().getPurchaseInvoice().getVendor() .getTaxDestination() != null) { isItemBasis = !pEntity.getItsOwner().getPurchaseInvoice().getVendor() .getTaxDestination().getSalTaxIsInvoiceBase(); isAggrOnlyRate = pEntity.getItsOwner().getPurchaseInvoice() .getVendor().getTaxDestination().getSalTaxUseAggregItBas(); rm = pEntity.getItsOwner().getPurchaseInvoice().getVendor() .getTaxDestination().getSalTaxRoundMode();