Openbravo Issue Tracking System - Java Client POS | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0004499 | Java Client POS | (No Category) | public | 2008-07-24 09:10 | 2008-10-07 11:47 |
Reporter | jbablittle | ||||
Assigned To | |||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | acknowledged | Resolution | open | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Regression date | |||||
Regression introduced by commit | |||||
Regression level | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Support ticket | |||||
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 | ||||
Steps To Reproduce | |||||
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 } | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
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) |
There are no notes attached to this issue. |