Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Java Client POS] (No Category)minorhave not tried2008-07-24 09:102008-10-07 11:47
ReporterjbablittleView Statuspublic 
Assigned To 
PrioritynormalResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned To
Regression introduced in release

0004499: New methods suggestion for TicketInfo

DescriptionSeeing messages in the OpenbravoPOS forum concerning more elaborate ticket printing I wrote a few extra methods which can make things easier in template writing. The three methods return integer values which seem easier to use in Velocity conditional statements.

This should help people that what personalized text on a ticket based on hour of day, day of week or month of year.

One use is printing a discount coupon at the end of a receipt depending upon time of day ( Happy Hour in a bar or restaurant)

The methods just use the present time instance and are not meant to be used when modifying older tickets.

These methods should be able to be dropped into with no influence of normal operation.

Proposed Solutionpublic int printHour(){
Calendar now = Calendar.getInstance();
return now.get(Calendar.HOUR);
public int printDay(){
Calendar now = Calendar.getInstance();
return now.get(Calendar.DAY_OF_WEEK);
public int printMonth(){
Calendar now = Calendar.getInstance();
return 1+ now.get(Calendar.MONTH); // normally months start with 0 for January. This makes the return value more human freindly January 1, Febuary 2 etc
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2008-07-24 09:10 jbablittle New Issue
2008-07-24 09:10 jbablittle sf_bug_id 0 => 2026465
2008-10-07 11:47 adrianromero Status new => acknowledged
2012-11-07 09:40 priyam Category 01 - General => (No Category)

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker