Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | |||||||||||
0004499 | |||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||
feature request | [Java Client POS] (No Category) | minor | have not tried | 2008-07-24 09:10 | 2008-10-07 11:47 | ||||||
Reporter | jbablittle | View Status | public | ||||||||
Assigned To | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | |||||||
Status | acknowledged | Fix in branch | Fixed in SCM revision | ||||||||
Projection | none | ETA | none | Target Version | |||||||
OS | Any | Database | Any | Java version | |||||||
OS Version | Database version | Ant version | |||||||||
Product Version | SCM revision | ||||||||||
Regression date | |||||||||||
Regression introduced by commit | |||||||||||
Regression level | |||||||||||
Review Assigned To | |||||||||||
Regression introduced in release | |||||||||||
Summary | 0004499: New methods suggestion for TicketInfo | ||||||||||
Description | Seeing 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 TicketInfo.java with no influence of normal operation. Jim | ||||||||||
Proposed Solution | public 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 } | ||||||||||
Tags | No tags attached. | ||||||||||
Attached Files | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
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 |