/** * <p>Get Owner Type if exist e.g. PurchaseInvoice 1.</p> * @return Integer **/ @Override public final Integer getOwnerType() { return new SalesInvoice().constTypeCode(); }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final SalesInvoice createEntity( final Map<String, Object> pAddParam) throws Exception { SalesInvoice entity = new SalesInvoice(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity with its itsOwner e.g. invoice line * for invoice.</p> * @param pAddParam additional param * @param pIdEntityItsOwner entity itsOwner ID * @return entity instance * @throws Exception - an exception **/ @Override public final SalesInvoiceLine createEntityWithOwnerById( final Map<String, Object> pAddParam, final Object pIdEntityItsOwner) throws Exception { SalesInvoiceLine entity = new SalesInvoiceLine(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); SalesInvoice itsOwner = new SalesInvoice(); itsOwner.setItsId(Long.valueOf(pIdEntityItsOwner.toString())); entity.setItsOwner(itsOwner); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity with its itsOwner e.g. invoice line * for invoice.</p> * @param pAddParam additional param * @param pIdEntityItsOwner entity itsOwner ID * @return entity instance * @throws Exception - an exception **/ @Override public final SalesInvoiceServiceLine createEntityWithOwnerById( final Map<String, Object> pAddParam, final Object pIdEntityItsOwner) throws Exception { SalesInvoiceServiceLine entity = new SalesInvoiceServiceLine(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); SalesInvoice itsOwner = new SalesInvoice(); itsOwner.setItsId(Long.valueOf(pIdEntityItsOwner.toString())); entity.setItsOwner(itsOwner); addAccSettingsIntoAttrs(pAddParam); return entity; }
typeCodeMap.put(new SalesInvoiceLine().constTypeCode(), SalesInvoiceLine.class); typeCodeMap.put(new SalesInvoice().constTypeCode(), SalesInvoice.class); typeCodeMap.put(new Manufacture().constTypeCode(),
typeCodeMap.put(new SalesInvoiceLine().constTypeCode(), SalesInvoiceLine.class); typeCodeMap.put(new SalesInvoice().constTypeCode(), SalesInvoice.class); typeCodeMap.put(new Manufacture().constTypeCode(),
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final SalesInvoiceServiceLine createEntity( final Map<String, Object> pAddParam) throws Exception { SalesInvoiceServiceLine entity = new SalesInvoiceServiceLine(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); SalesInvoice itsOwner = new SalesInvoice(); entity.setItsOwner(itsOwner); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final SalesInvoiceLine createEntity( final Map<String, Object> pAddParam) throws Exception { SalesInvoiceLine entity = new SalesInvoiceLine(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); SalesInvoice itsOwner = new SalesInvoice(); entity.setItsOwner(itsOwner); addAccSettingsIntoAttrs(pAddParam); return entity; }
try { String invStr = pRequestData.getParameter("invoice"); inv = new SalesInvoice(); inv.setItsId(Long.parseLong(invStr)); inv = getSrvOrm().retrieveEntity(pReqVars, inv);
SalesInvoice reversed = new SalesInvoice(); pEntity.setForeignCurrency(reversed.getForeignCurrency()); pEntity.setForeignSubtotal(reversed.getForeignSubtotal().negate());