Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.data
Class Verrechnet

java.lang.Object
  extended by ch.elexis.data.PersistentObject
      extended by ch.elexis.data.Verrechnet
All Implemented Interfaces:
IPersistentObject, ISelectable

public class Verrechnet
extends PersistentObject

Ein Verrechnet ist ein realisiertes Verrechenbar. Ein Verrechenbar wird durch die Zuordnung zu einer Konsultation zu einem Verrechnet. Der Preis eines Verrechnet ist zunächst Taxpunkwert(TP) mal Scale (Immer in der kleinsten Währungseinheit, also Rappen oder ggf. cent). Der effektive Preis kann aber geändert werden (Rabatt etc.) Nebst VK_Scale, welche in der Schweiz dem taxpunktwert entspricht, können noch externe und interne zusätzlich Skalierungen angewendet werden. PrimaryScalefactor wird beispielsweise für %-Reduktionen oder Zusschläge gemäss Tarmed verwendet, SecondaryScalefactor kann ein Rabatt oder ein Privatzuschschlag sein.

Author:
gerry

Nested Class Summary
 
Nested classes/interfaces inherited from class ch.elexis.data.PersistentObject
PersistentObject.FieldType
 
Field Summary
static java.lang.String CLASS
           
static java.lang.String COST_BUYING
           
static java.lang.String COUNT
           
static java.lang.String DETAIL
           
static java.lang.String KONSULTATION
           
static java.lang.String LEISTG_CODE
           
static java.lang.String LEISTG_TXT
           
static java.lang.String PRICE_SELLING
           
static java.lang.String SCALE_SELLING
           
static java.lang.String SCALE_TP_SELLING
           
static java.lang.String TABLENAME
           
static java.lang.String VATSCALE
           
 
Fields inherited from class ch.elexis.data.PersistentObject
CACHE_DEFAULT_LIFETIME, CACHE_MIN_LIFETIME, CFG_CONNECTSTRING, CFG_DRIVER, CFG_PWD, CFG_TYPE, CFG_USER, DELETED, EXISTS, INEXISTENT, INVALID_ID, MATCH_AUTO, MATCH_CONTAINS, MATCH_EXACT, MATCH_REGEXP, MATCH_START
 
Fields inherited from interface ch.elexis.core.data.IPersistentObject
FLD_DATE, FLD_DELETED, FLD_EXTINFO, FLD_ID, FLD_LASTUPDATE, STATE_EXISTING, STATE_INEXISTENT, STATE_INVALID_ID
 
Constructor Summary
Verrechnet(IVerrechenbar iv, Konsultation kons, int zahl)
           
 
Method Summary
 void changeAnzahl(int neuAnzahl)
          Change the count for this service or article.
 Money getBruttoPreis()
          Den Preis nach Anwendung des Taxpunktwerts (aber ohne sonstige Skalierungen) holen
 java.lang.String getCode()
           
 java.lang.String getDetail(java.lang.String key)
          retrieve additional information
 Money getEffPreis()
          Deprecated.  
 Konsultation getKons()
           
 Money getKosten()
          Einkaufskosten
 java.lang.String getLabel()
          Einen menschenlesbaren Identifikationsstring für dieses Objet liefern
 Money getNettoPreis()
          Den Preis nach Anwendung sämtlicher SKalierungsfaktoren zurückgeben
 double getPrimaryScaleFactor()
          get the prinary scale factor
 double getSecondaryScaleFactor()
          Get the secondary scale factor
 Money getStandardPreis()
          Den Standardpreis holen (Ist immer TP*Scale, auf ganze Rappen gerundet)
 java.lang.String getText()
           
 double getTPW()
          Taxpunktwert auslesen
 IVerrechenbar getVerrechenbar()
           
 int getZahl()
          Wie oft wurde die Leistung bei derselben Kons. verrechnet?
 boolean isInstance(IVerrechenbar tmpl)
          Frage, ob dieses Verrechnet aus dem IVerrechenbar tmpl entstanden ist
static Verrechnet load(java.lang.String id)
           
 void setDetail(java.lang.String key, java.lang.String value)
          Set arbitrary additional informations to a service
 void setPreis(Money m)
          Deprecated. use setTP and setFactor
 void setPrimaryScaleFactor(double scale)
          set the primary scale factor (usually system specific or "internal" to the code system NOTE: This ist NOT identical to the multiplier or "Taxpunkt".
 void setSecondaryScaleFactor(double scale)
          Set the secondary scale factor
 void setStandardPreis()
          Bequemlichkeits-Shortcut für Standardbetrag setzen
 void setText(java.lang.String text)
           
 void setTP(double tp)
          Taxpunktpreis setzen
 void setZahl(int z)
           
 
Methods inherited from class ch.elexis.data.PersistentObject
addChangeListener, addSticker, addToList, addXid, begin, checkNull, checkZero, checkZeroDouble, clearCache, connect, connect, delete, deleteList, disconnect, equals, executeSQLScript, exists, exportData, fireChangeEvent, flatten, fold, get, get, getCacheTime, getConnection, getDefaultCacheLifetime, getFieldType, getId, getInt, getLastUpdate, getList, getList, getMap, getSticker, getStickers, getWrappedId, getXid, getXid, getXids, hashCode, isAvailable, isDeleted, isDragOK, isMatching, isMatching, isMatching, isMatching, isShowDeleted, isValid, lock, map, relock, removeChangeListener, removeFromList, removeFromList, removeSticker, resetCache, set, set, setDefaultCacheLifetime, setInt, setMap, setShowDeleted, setTrace, state, storeToString, tableExists, ts, undelete, unlock
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DETAIL

public static final java.lang.String DETAIL
See Also:
Constant Field Values

LEISTG_CODE

public static final java.lang.String LEISTG_CODE
See Also:
Constant Field Values

LEISTG_TXT

public static final java.lang.String LEISTG_TXT
See Also:
Constant Field Values

KONSULTATION

public static final java.lang.String KONSULTATION
See Also:
Constant Field Values

PRICE_SELLING

public static final java.lang.String PRICE_SELLING
See Also:
Constant Field Values

SCALE_SELLING

public static final java.lang.String SCALE_SELLING
See Also:
Constant Field Values

SCALE_TP_SELLING

public static final java.lang.String SCALE_TP_SELLING
See Also:
Constant Field Values

COST_BUYING

public static final java.lang.String COST_BUYING
See Also:
Constant Field Values

COUNT

public static final java.lang.String COUNT
See Also:
Constant Field Values

CLASS

public static final java.lang.String CLASS
See Also:
Constant Field Values

TABLENAME

public static final java.lang.String TABLENAME
See Also:
Constant Field Values

VATSCALE

public static final java.lang.String VATSCALE
See Also:
Constant Field Values
Constructor Detail

Verrechnet

public Verrechnet(IVerrechenbar iv,
                  Konsultation kons,
                  int zahl)
Method Detail

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

getTPW

public double getTPW()
Taxpunktwert auslesen

Returns:

setPrimaryScaleFactor

public void setPrimaryScaleFactor(double scale)
set the primary scale factor (usually system specific or "internal" to the code system NOTE: This ist NOT identical to the multiplier or "Taxpunkt". The final price will be calculated as VK_PREIS * VK_SCALE * primaryScale * secondaryScale

Parameters:
scale - the new scale value as x.x

getPrimaryScaleFactor

public double getPrimaryScaleFactor()
get the prinary scale factor

Returns:
the primary svcale factor as double
See Also:
setPrimaryScaleFactor

setSecondaryScaleFactor

public void setSecondaryScaleFactor(double scale)
Set the secondary scale factor

Parameters:
scale - the factor
See Also:
setPromaryScaleFactor

getSecondaryScaleFactor

public double getSecondaryScaleFactor()
Get the secondary scale factor

Returns:
the factor
See Also:
setPrimaryScaleFactor

setTP

public void setTP(double tp)
Taxpunktpreis setzen

Parameters:
tp -

setPreis

@Deprecated
public void setPreis(Money m)
Deprecated. use setTP and setFactor

Den effektiven Preis setzen (braucht nicht TP*Scale zu sein


getKosten

public Money getKosten()
Einkaufskosten


getEffPreis

@Deprecated
public Money getEffPreis()
Deprecated. 

Den effektiv verrechneten Preis holen (braucht nicht TP*Scale zu sein


getNettoPreis

public Money getNettoPreis()
Den Preis nach Anwendung sämtlicher SKalierungsfaktoren zurückgeben

Returns:

getBruttoPreis

public Money getBruttoPreis()
Den Preis nach Anwendung des Taxpunktwerts (aber ohne sonstige Skalierungen) holen


getStandardPreis

public Money getStandardPreis()
Den Standardpreis holen (Ist immer TP*Scale, auf ganze Rappen gerundet)


setStandardPreis

public void setStandardPreis()
Bequemlichkeits-Shortcut für Standardbetrag setzen


getKons

public Konsultation getKons()

getZahl

public int getZahl()
Wie oft wurde die Leistung bei derselben Kons. verrechnet?


setZahl

public void setZahl(int z)

getCode

public java.lang.String getCode()

setDetail

public void setDetail(java.lang.String key,
                      java.lang.String value)
Set arbitrary additional informations to a service

Parameters:
key - name of the information
value - value of the information

getDetail

public java.lang.String getDetail(java.lang.String key)
retrieve additional information

Parameters:
key - name of the requested information
Returns:
value if the information or null if no information with that name was found

changeAnzahl

public void changeAnzahl(int neuAnzahl)
Change the count for this service or article. If it ist an Artikel, the store will be updated accordingly

Parameters:
neuAnzahl - new count this service is to be billed.

isInstance

public boolean isInstance(IVerrechenbar tmpl)
Frage, ob dieses Verrechnet aus dem IVerrechenbar tmpl entstanden ist


getVerrechenbar

public IVerrechenbar getVerrechenbar()
Returns:
the IVerrechenbar object this Verrechnet is based on if found and resolvable, else null

getLabel

public java.lang.String getLabel()
Description copied from class: PersistentObject
Einen menschenlesbaren Identifikationsstring für dieses Objet liefern

Specified by:
getLabel in interface IPersistentObject
Specified by:
getLabel in class PersistentObject

load

public static Verrechnet load(java.lang.String id)

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis