public class InvoiceItem extends ChargeItem
DBObject.DenormalizeAction
Modifier and Type | Field and Description |
---|---|
static GlobalId |
DBCLASS_GID
An item that appears on an invoice.
|
static java.lang.String |
DBCLASS_NAME
An item that appears on an invoice.
|
ATTRIBUTE_MARVIN, dbClass, ds, NO_LOOP_PARAMS
Constructor and Description |
---|
InvoiceItem(DBClass def,
DataSource dataSource)
Std.
|
Modifier and Type | Method and Description |
---|---|
protected void |
eventFieldUpdated(DBField field,
java.lang.Object previous,
GlobalKey previousKey,
FldParams params)
update dependent fields.
|
protected void |
extCheckModifyAccess(DBField field)
Additional access checking for write access of this object.
|
protected void |
extCheckReadAccess()
Additional access checking for READ access of this object.
|
protected void |
extDelete()
Additional functionality when an object is marked for deletion by calling delete().
|
protected void |
extFixUp()
The extended fix up routine for known problems.
|
protected java.lang.Object |
extGetDerivedValue(DBField field,
FldParams params)
Calculate the derived value for this field.
|
protected boolean |
extIsMandatory(DBField field)
Conditional mandatory field.
|
protected ValidationError |
extValidateField(DBField field,
ValidationList list)
Additional validation for a particular field.
|
Activity |
findActivity(java.lang.String... args)
Activity.
|
Invoice |
findInvoiceId(java.lang.String... args)
Invoice Id.
|
ProductItem |
findProductItem(java.lang.String... args)
Product Item.
|
InvoiceItem |
generateCreditItem(MutableDataSource mds,
Invoice creditInvoice,
double creditAmount)
This method is derived from Subscription.
|
Activity |
getActivity(java.lang.String... args) |
Invoice |
getInvoice() |
Invoice |
getInvoiceId(java.lang.String... args) |
ProductItem |
getProductItem(java.lang.String... args) |
double |
getTotalBuyPriceIncludingTax(java.lang.String... args) |
double |
getTotalProfit(java.lang.String... args) |
double |
getUnitBuyPriceIncludingTax(java.lang.String... args) |
protected boolean |
isModifiableWhenLocked(DBField field) |
boolean |
requiresPurchase()
Does this sale item need a purchase order so that it can be
ordered from supplier
|
InvoiceItem |
setActivity(com.aspc.dal.layers.aspc_app.task.Activity value,
java.lang.String... args) |
protected void |
setDontTouchInvoice(boolean fg)
To keep the concrete calculated fields the invoice is touched each time
a changes is made to an item
Some fields will not affect these calculations so for performance reasons
we set the dontTouchInvoice flag so that the invoice is not touched meaning
it will not be included in the validation and save process
|
InvoiceItem |
setInvoiceId(com.aspc.dal.layers.aspc_app.invoice.Invoice value,
java.lang.String... args) |
InvoiceItem |
setProductItem(com.aspc.dal.layers.aspc_app.task.ProductItem value,
java.lang.String... args) |
InvoiceItem |
setUnitBuyPriceIncludingTax(double value,
java.lang.String... args) |
copyIncludeField, extAutoEnterCreate, extCopy, extIsOnChange, extPreValidate, findAccount, findAdjPriceCheckedBy, findAdjPriceReason, findCalcPriceMatrix, findChargeItemStatus, findChargeItemType, findEnteredBy, findExportFg, findKey, findOwnerBusUnit, findRecurringBase, findTaxCodeId, getAccount, getAdjPriceCheckedBy, getAdjPriceCheckedNotes, getAdjPriceReason, getAdjPriceReasonNotes, getAdjTotalPrice, getAdjTotalPriceIncludingTax, getAdjUnitPrice, getAdjUnitPriceExcludingTax, getAdjUnitPriceIncludingTax, getBackOrdered, getCalcPriceMatrix, getCalcUnitPriceExcludingTax, getChargeItemStatus, getChargeItemType, getCode, getDescription, getDiscountRate, getEnteredBy, getEnteredTime, getExportedTime, getExportFg, getID, getItemCode, getMyobImportTime, getNotes, getOrdered, getOwnerBusUnit, getQty, getRecurringBase, getRoyalties, getTaxCodeId, getTaxRate, getTotalDiscount, getTotalPriceExcludingTax, getTotalPriceIncludingTax, getTotalRoyalties, getTotalTax, getUnitMeasure, getUnitPrice, getUnitPriceDisplay, getUnitPriceDisplayExcludingTax, getUnitPriceDisplayIncludingTax, getUnitPriceExcludingTax, getUnitPriceIncludingTax, hasReadAccess, isAdjPriceChecked, isAdjPriceReasonRequired, isAdjTotalPriceIncludesTax, isAdjUnitPriceIncludesTax, isAdjustItem, isMonthlyRecurring, isNeedToBeCloned, isUnitPriceIncludesTax, makeQuery, setAccount, setAdjPriceChecked, setAdjPriceCheckedBy, setAdjPriceCheckedNotes, setAdjPriceReason, setAdjPriceReasonNotes, setAdjPriceReasonRequired, setAdjTotalPrice, setAdjTotalPriceIncludesTax, setAdjTotalPriceIncludingTax, setAdjUnitPrice, setAdjUnitPriceIncludesTax, setAdjustItem, setBackOrdered, setChargeItemStatus, setCode, setDescription, setDiscountRate, setEnteredBy, setEnteredTime, setExportedTime, setExportFg, setID, setItemCode, setMonthlyRecurring, setMyobImportTime, setNotes, setOrdered, setOwnerBusUnit, setQty, setRecurringBase, setTaxCodeId, setTaxRate, setUnitMeasure, setUnitPrice, setUnitPriceExcludingTax, setUnitPriceIncludesTax, setUnitPriceIncludingTax
addReloadEventListener, archiveCheck, autoEnterCreate, calculateValue, calculateValue, calculateValue, callingRestoreByJournal, changeThreadMode, checkCreateAccess, checkDelete, checkDeleteAccess, checkModifyAccess, checkModifyAccess, checkReadAccess, clearCache, copy, copyFields, copyInwardLinks, delete, denormalizedResult, displayLogName, displayName, displayValue, doSearch, dump, equals, eventDataLoaded, extCanDeleteDependantObject, extCheckCreateAccess, extCheckDeleteAccess, extCheckModifyAccess, extDeleteRecord, extGetDerivedGlobalKey, extGetValue, extMarkSavePoint, extPostDeleteRecord, extPostSaveRecord, extPreDeleteRecord, extPreSaveRecord, extPreValidateDelete, extRaiseEvents, extRollbackTo, extSaveRecord, extSetValue, extUndelete, extValidateDelete, extValidateRecord, fetchLinkHolder, findGlobalKey, findGlobalKey, findGlobalKey, findGlobalKey, findLinkedObject, findLinkedObject, findLinkedObject, findRawData, fireEventDataLoaded, fixUp, forceLockedTransaction, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getChangedFieldInfo, getChangedFields, getDate, getDate, getDate, getDate, getDate, getDefaultValue, getDisableOnChangeEvent, getDouble, getDouble, getDouble, getDouble, getDouble, getFieldDouble, getFieldInt, getFieldLong, getFieldString, getFormattedString, getFormattedString, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getInt, getInt, getInt, getInt, getInt, getInt, getInwardLinkage, getKeyString, getKeyValue, getLinkedObject, getLinkedObject, getLinkedObject, getLinkedObjectByKey, getLinkedRowId, getLinkedRowId, getLinkedRowIdByData, getLinkHolder, getLockedTransaction, getLong, getLong, getLong, getLong, getLong, getLong, getMutableArrayValue, getMutableArrayValue, getOriginalKey, getOriginalValue, getOriginalValue, getProcessedValue, getPureValue, getRawData, getRawValue, getRawValue, getRowId, getRowKey, getSecondaryCacheGroupKey, getSrcLayerID, getString, getString, getString, getString, getString, getString, getValue, getValue, getValue, getValue, hasAutoChanged, hasAutoChanged, hasChanged, hasChangedByUser, hasChangedByUserField, hasChangedByUserField, hasFieldChanged, hasFieldChanged, hashCode, hasStoredResult, iCheckDeleteAccess, iCheckModifyAccess, iCheckReadAccess, iGetDenormalizedMap, iGetRawValue, iPlaceDenormalizedResult, iPostSaveOrDeleteRecord, iPreSaveOrDeleteRecord, iPreValidate, iRaiseEvents, iSaveOrDeleteRecord, isBrokenLink, isBrokenLink, isChanged, isDataCacheKnownToBeDirty, isDeleted, isEmpty, iSetValue, isForceReindex, isKeyWordField, isMandatory, isNew, isNull, isNull, isOnChange, isReindex, iValidateRecord, lastTouched, makeArchiveDataLoader, makeClone, makeDataLoader, makeDenormalizedDoc, makeLinkedArray, makeModifyAccessException, makeSearchPlan, makeWriteProvider, manualDenormalizeOnSave, markSavePoint, optLockedTransaction, registerWatchedObject, reindex, releaseDenormalized, removeReloadEventListener, restoreByJournal, rollbackTo, setBoolean, setBoolean, setBoolean, setBoolean, setDisableOnChangeEvent, setDouble, setDouble, setInt, setInt, setLong, setLong, setRawData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, touch, undelete, validateField, validateRecord, validateSubType
public static final java.lang.String DBCLASS_NAME
public static final GlobalId DBCLASS_GID
public InvoiceItem(DBClass def, DataSource dataSource) throws java.lang.Exception
def
- The class of this objectdataSource
- The datasource for this objectjava.lang.Exception
- A serious problem occurred@CheckReturnValue @Nullable public Activity getActivity(java.lang.String... args)
@CheckReturnValue @Nonnull public final Activity findActivity(java.lang.String... args) throws NotFoundException
Activity
(Integer, Searchable)args
- the optional argumentsNotFoundException
- Activity was not found@Nonnull public InvoiceItem setActivity(com.aspc.dal.layers.aspc_app.task.Activity value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public Invoice getInvoiceId(java.lang.String... args)
@CheckReturnValue @Nonnull public final Invoice findInvoiceId(java.lang.String... args) throws NotFoundException
Invoice
(Integer, Mandatory, Searchable)args
- the optional argumentsNotFoundException
- Invoice was not found@Nonnull public InvoiceItem setInvoiceId(com.aspc.dal.layers.aspc_app.invoice.Invoice value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public ProductItem getProductItem(java.lang.String... args)
@CheckReturnValue @Nonnull public final ProductItem findProductItem(java.lang.String... args) throws NotFoundException
ProductItem
(Integer, Searchable)args
- the optional argumentsNotFoundException
- ProductItem was not found@Nonnull public InvoiceItem setProductItem(com.aspc.dal.layers.aspc_app.task.ProductItem value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public double getTotalBuyPriceIncludingTax(java.lang.String... args)
@CheckReturnValue public double getTotalProfit(java.lang.String... args)
@CheckReturnValue public double getUnitBuyPriceIncludingTax(java.lang.String... args)
@Nonnull public InvoiceItem setUnitBuyPriceIncludingTax(double value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
public Invoice getInvoice()
public boolean requiresPurchase()
public InvoiceItem generateCreditItem(MutableDataSource mds, Invoice creditInvoice, double creditAmount) throws java.lang.Exception
mds
- The Mutable DataSourcecreditInvoice
- creditAmount
- java.lang.Exception
- A serious error.@OverridingMethodsMustInvokeSuper protected void extCheckReadAccess() throws DBAccessException
extCheckReadAccess
in class DBObject
DBAccessException
- No access to READDBObject.checkReadAccess()
@CheckReturnValue protected boolean extIsMandatory(@Nonnull DBField field)
extIsMandatory
in class ChargeItem
field
- The field to getDBObject.extIsMandatory( DBField)
@OverridingMethodsMustInvokeSuper protected void extCheckModifyAccess(@Nonnull DBField field) throws DBAccessException
extCheckModifyAccess
in class DBObject
field
- The fieldDBAccessException
- No access to modifyprotected boolean isModifiableWhenLocked(DBField field)
field
- The field@CheckReturnValue protected java.lang.Object extGetDerivedValue(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
extGetDerivedValue
in class ChargeItem
field
- The field to getparams
- The parameters for this field eg. language= or default=java.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void eventFieldUpdated(@Nonnull DBField field, @Nullable java.lang.Object previous, @Nullable GlobalKey previousKey, @Nullable FldParams params) throws java.lang.Exception
eventFieldUpdated
in class ChargeItem
field
- The field updated.previous
- The previous value for this field.previousKey
- The previous keyparams
- The parameters usedjava.lang.Exception
- a serious problem@OverridingMethodsMustInvokeSuper protected void extDelete() throws java.lang.Exception
@CheckReturnValue @OverridingMethodsMustInvokeSuper @Nullable protected ValidationError extValidateField(@Nonnull DBField field, @Nonnull ValidationList list) throws java.lang.Exception
extValidateField
in class DBObject
list
- The validation listfield
- The field to be validatedjava.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void extFixUp() throws java.lang.Exception
extFixUp
in class ChargeItem
java.lang.Exception
- A serious problemprotected void setDontTouchInvoice(boolean fg)
fg
- stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.