AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
EM::TicketIssueLogic::ECalculatePriceModule Class Reference

#include <ECalculatePriceModule.h>

Inheritance diagram for EM::TicketIssueLogic::ECalculatePriceModule:
Inheritance graph
[legend]
Collaboration diagram for EM::TicketIssueLogic::ECalculatePriceModule:
Collaboration graph
[legend]

Public Member Functions

 ECalculatePriceModule (ETicketIssueLogic *ticketIssueLogic, ETicketIssueLogicDataStorage *dataStorage, std::string moduleName=E_CALCULATE_PRICE_MODULE)
 
virtual ~ECalculatePriceModule ()
 
virtual
EIssueLogicDefines::ReturnValues 
Init ()
 init module input data ( for example other module ) More...
 
virtual
EIssueLogicDefines::ReturnValues 
CalculateAndSetPrice (IssuedTicket *issuedTicket, IssuedTicketSegment *issuedTicketSegment)
 Function calculate and set price to issued ticket. More...
 
virtual
EIssueLogicDefines::ReturnValues 
CalculatePrice (long &calculatedPrice, double &calculatedPriceDecimalFormat, const DataForPriceCalculation &dataForPriceCalculation, IssuedTicket *issuedTicket, IssuedTicketSegment *issuedTicketSegment)
 Calculate price fill input data, which send to calculatePrice ( EVypocetCeny ). Result save to actual issued ticket. More...
 
EIssueLogicDefines::ReturnValues SaveCalculatePriceResult (EHead *calculatePriceResultCollection, Strojcek::VstupneUdaje::_VSTUPNA_STRUKTURA &inputDataCalculatePrice, IssuedTicket *issuedTicket, IssuedTicketSegment *issuedTicketSegment)
 Function save calculate price result( instance of EListokTarifa, ETarifa ) to issued ticket. More...
 
EIssueLogicDefines::ReturnValues CalculateAndSaveVATRate (const DataForPriceCalculation &dataForPriceCalculation, IssuedTicketSegment *issuedTicketSegment)
 Calculates VAT rate and save to issued ticket segment. More...
 
EIssueLogicDefines::ReturnValues CalculateVATRateAndValue (const DataForVATCalculation &dataForVatCalculation, long &calculatedVatRate, double &calculatedVatValueInCents)
 Calculates VAT rate and VAT value in cents. More...
 
virtual
EIssueLogicDefines::ReturnValues 
CalculateMultipleTicketPrice (long &price, double &decimalPrice)
 Calculates total price of all set multiple tickets. More...
 
virtual
EIssueLogicDefines::ReturnValues 
FillAdditionalDataCalculatePrice (const DataForPriceCalculation &dataForPriceCalculation, Strojcek::VstupneUdaje::_VSTUPNA_STRUKTURA &inputDataCalculatePrice)
 Fill specific data to calculate price. For Example in multicard set application to input data to calculate price. More...
 
- Public Member Functions inherited from EM::TicketIssueLogic::ETicketIssueModule
 ETicketIssueModule (const std::string &name, EIssueLogicDefines::ModuleFamily moduleFamily)
 
virtual ~ETicketIssueModule ()
 
bool GetName (std::string &moduleName)
 unique module identificator More...
 
bool GetModuleFamily (EIssueLogicDefines::ModuleFamily &moduleFamily)
 return by reference module family More...
 

Protected Member Functions

virtual
EIssueLogicDefines::ReturnValues 
FillInputDataToCalculatePrice (const DataForPriceCalculation &dataForPriceCalculation, Strojcek::VstupneUdaje::_VSTUPNA_STRUKTURA &inputDataCalculatePrice)
 Fill input data to calculate price with common data and than call FillAdditionalDataCalculatePrice to add specific data. More...
 

Constructor & Destructor Documentation

INTERNAL ECalculatePriceModule::ECalculatePriceModule ( ETicketIssueLogic ticketIssueLogic,
ETicketIssueLogicDataStorage dataStorage,
std::string  moduleName = E_CALCULATE_PRICE_MODULE 
)
ECalculatePriceModule::~ECalculatePriceModule ( )
virtual

Member Function Documentation

EIssueLogicDefines::ReturnValues ECalculatePriceModule::CalculateAndSaveVATRate ( const DataForPriceCalculation dataForPriceCalculation,
IssuedTicketSegment issuedTicketSegment 
)

Calculates VAT rate and save to issued ticket segment.

Note
In case that operation is 'OperationCreditRecharge' or 'OperationTimeTicketSell' or 'OperationTerminalSell', VAT rate will be calculated by tariff setting EVlastnostTarifyHodnota::DPH / 7.
In all other cases
See also
EData::CalculateVATByBusStopsAndTariff
Returns
Ok - all ok
other - see enumerator in EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

Here is the caller graph for this function:

EIssueLogicDefines::ReturnValues ECalculatePriceModule::CalculateAndSetPrice ( IssuedTicket issuedTicket,
IssuedTicketSegment issuedTicketSegment 
)
virtual

Function calculate and set price to issued ticket.

Parameters
issuedTicketSegment- to this ticket segment will be set calculate price result
Returns
Ok - all ok
BadInputData - error get valid time ticket
See also
CalculatePrice

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues ECalculatePriceModule::CalculateMultipleTicketPrice ( long &  price,
double &  decimalPrice 
)
virtual

Calculates total price of all set multiple tickets.

Parameters
price
decimalPrice
Returns
EIssueLogicDefines::Ok on success, othervise the type of the occured error

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues ECalculatePriceModule::CalculatePrice ( long &  calculatedPrice,
double &  calculatedPriceDecimalFormat,
const DataForPriceCalculation dataForPriceCalculation,
IssuedTicket issuedTicket,
IssuedTicketSegment issuedTicketSegment 
)
virtual

Calculate price fill input data, which send to calculatePrice ( EVypocetCeny ). Result save to actual issued ticket.

Parameters
calculatedPrice- ticket price calculated in calculatePrice ( EVypocetCeny )
calculatedPriceDecimalFormat- ticket price calculated in calculatePrice ( EVypocetCeny ) in decimal format
issuedTicketSegment- to this ticket segment will be set calculate price result
Returns
BadInputData - something bad in input data - see log or data in ETicketIssueLogicDataStorage CalculatePriceError - function calculate price in calculatePrice( EVypocetCeny ) return bad result value Ok - all ok
Note
in this function save tarif to actual issued ticket - see issued ticket system in datastorage

Here is the call graph for this function:

Here is the caller graph for this function:

EIssueLogicDefines::ReturnValues ECalculatePriceModule::CalculateVATRateAndValue ( const DataForVATCalculation dataForVatCalculation,
long &  calculatedVatRate,
double &  calculatedVatValueInCents 
)

Calculates VAT rate and VAT value in cents.

Note
In case that operation is 'OperationCreditRecharge' or 'OperationTimeTicketSell' or 'OperationTerminalSell', VAT rate will be calculated by tariff setting EVlastnostTarifyHodnota::DPH / 7.
In all other cases
See also
EData::CalculateVATByBusStopsAndTariff
Returns

Here is the call graph for this function:

Here is the caller graph for this function:

EIssueLogicDefines::ReturnValues ECalculatePriceModule::FillAdditionalDataCalculatePrice ( const DataForPriceCalculation dataForPriceCalculation,
Strojcek::VstupneUdaje::_VSTUPNA_STRUKTURA &  inputDataCalculatePrice 
)
virtual

Fill specific data to calculate price. For Example in multicard set application to input data to calculate price.

Parameters
inputDataCalculatePrice- instance of input data structure, who i send to CalculatePrice
Returns
true - sucessfully ended, false otherwise

Implements EM::TicketIssueLogic::ECalculatePriceModuleInterface.

Here is the caller graph for this function:

EIssueLogicDefines::ReturnValues ECalculatePriceModule::FillInputDataToCalculatePrice ( const DataForPriceCalculation dataForPriceCalculation,
Strojcek::VstupneUdaje::_VSTUPNA_STRUKTURA &  inputDataCalculatePrice 
)
protectedvirtual

Fill input data to calculate price with common data and than call FillAdditionalDataCalculatePrice to add specific data.

Parameters
inputDataCalculatePrice- instance of input data structure, who i send to CalculatePrice
Returns
true - sucessfully ended, false otherwise

Here is the call graph for this function:

Here is the caller graph for this function:

EIssueLogicDefines::ReturnValues ECalculatePriceModule::Init ( void  )
virtual

init module input data ( for example other module )

Init

Returns
enum result value

Reimplemented from EM::TicketIssueLogic::ETicketIssueModule.

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues ECalculatePriceModule::SaveCalculatePriceResult ( EHead *  calculatePriceResultCollection,
Strojcek::VstupneUdaje::_VSTUPNA_STRUKTURA &  inputDataCalculatePrice,
IssuedTicket issuedTicket,
IssuedTicketSegment issuedTicketSegment 
)

Function save calculate price result( instance of EListokTarifa, ETarifa ) to issued ticket.

Parameters
calculatePriceResultCollection- datainput result from calcuale price
inputDataCalculatePrice- instance of input data structure, who i send to CalculatePrice
issuedTicketSegment- to this ticket segment will be set calculate price result
Returns
Ok - all ok
other - see enumerator in EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: