/** * <p>Get Owner Type if exist e.g. PurchaseInvoice 1.</p> * @return Integer **/ @Override public final Integer getOwnerType() { return this.getItsOwner().constTypeCode(); }
/** * <p>Get for document Date.</p> * @return Date **/ @Override public final Date getDocumentDate() { return this.getItsOwner().getItsDate(); }
/** * <p>Get for owner's ID.</p> * @return Long **/ @Override public final Long getOwnerId() { return this.getItsOwner().getItsId(); }
/** * <p>Get for document Date.</p> * @return Date **/ @Override public final Date getDocumentDate() { return this.getItsOwner().getItsDate(); }
/** * <p>Get for owner's ID.</p> * @return Long **/ @Override public final Long getOwnerId() { return this.getItsOwner().getItsId(); }
pReqVars.put("PurchaseInvoiceneededFields", ndFlInv); entity.setItsOwner(this.prcEntityCreate.getSrvOrm() .retrieveEntity(pReqVars, entity.getItsOwner())); pReqVars.remove("DebtorCreditorneededFields"); pReqVars.remove("PurchaseInvoiceneededFields");
pReqVars.put("PurchaseInvoiceneededFields", ndFlInv); pEntity.setItsOwner(getSrvOrm() .retrieveEntity(pReqVars, pEntity.getItsOwner())); pReqVars.remove("DebtorCreditorneededFields"); pReqVars.remove("PurchaseInvoiceneededFields"); 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(); pEntity.getItsOwner().getItsDate(), pEntity.getItsOwner().getItsId()); } else { if (pEntity.getItsQuantity().doubleValue() <= 0) { if (pEntity.getItsOwner().getPurchaseInvoice().getPriceIncTax()) { sourceCostNt = pEntity.getPurchaseInvoiceLine().getItsCost() .divide(BigDecimal.ONE.add(pEntity.getPurchaseInvoiceLine() for (PurchaseReturnGoodsTaxLine pigtl : tls) { pigtl.setItsOwner(pEntity);
/** * <p>Process entity request.</p> * @param pAddParam additional param, e.g. return this line's * document in "nextEntity" for farther process * @param pRequestData Request Data * @param pEntity Entity to process * @return Entity processed for farther process or null * @throws Exception - an exception **/ @Override public final PurchaseReturnLine process( final Map<String, Object> pAddParam, final PurchaseReturnLine pEntityPb, final IRequestData pRequestData) throws Exception { PurchaseReturnLine entity = this.prcAccEntityPbCopy .process(pAddParam, pEntityPb, pRequestData); entity.setItsOwner(this.prcAccEntityPbCopy .getSrvOrm().retrieveEntity(pAddParam, entity.getItsOwner())); entity.setPurchaseInvoiceLine(null); entity.setPurchInvLnAppearance(null); entity.setItsQuantity(BigDecimal.ZERO); entity.setItsTotal(BigDecimal.ZERO); entity.setTotalTaxes(BigDecimal.ZERO); entity.setSubtotal(BigDecimal.ZERO); entity.setTaxesDescription(null); return entity; }
getSrvOrm().insertEntity(pEntity); PurchaseReturn itsOwner = getSrvOrm().retrieveEntityById( PurchaseReturn.class, pEntity.getItsOwner().getItsId()); pEntity.setItsOwner(itsOwner); if (pEntity.getReversedId() != null) { srvWarehouseEntry.reverseDraw(pAddParam, pEntity); srvUseMaterialEntry.reverseDraw(pAddParam, pEntity, pEntity.getItsOwner().getItsDate(), pEntity.getItsOwner().getItsId()); } else { srvWarehouseEntry.withdrawal(pAddParam, pEntity, "select sum(SUBTOTAL) as SUBTOTAL, sum(TOTALTAXES) as TOTALTAXES from" + " PURCHASERETURNLINE where ITSOWNER=" + pEntity.getItsOwner().getItsId(); String[] columns = new String[]{"SUBTOTAL", "TOTALTAXES"}; Double[] totals = getSrvDatabase().evalDoubleResults(query, columns); if (getSrvAccSettings().lazyGetAccSettings() .getIsExtractSalesTaxFromSales()) { updateTaxLines(pEntity.getItsOwner().getItsId());