|
From: <han...@us...> - 2010-10-14 21:53:17
|
Revision: 851
http://posper.svn.sourceforge.net/posper/?rev=851&view=rev
Author: hans_artmann
Date: 2010-10-14 21:53:10 +0000 (Thu, 14 Oct 2010)
Log Message:
-----------
- added void setItemsPrinted(double amount) and double getItemsPrinted() to TicketLineFormatter
to facilitate printing correct kitchen receipts when the amount of a line has changed.
The templates have to be adapted individually.
Note, that we still cannot detect if a line has been deleted.
- change com products amounts accordingly when the base product is incremented, decremented or set
to an new absolute amount
- changed trigger incrementProductReference on posper_product to start with 100.000. This results
in correctly sorted records even if no numeric sort is used. This can easily be changed. Actually, the idea
is to create customer specific product id's which could e.g. also resemble a customer owned barcode. If no
real barcode is available for a product, the reference could serve as a replacement. The barcode could then
be scanned from a printed template.
Modified Paths:
--------------
1.00/CHANGELOG
1.00/buildNumber.properties
1.00/src/main/java/net/adrianromero/tpv/inventory/ProductsEditor.java
1.00/src/main/java/net/adrianromero/tpv/panelsales/JPanelTicket.java
1.00/src/main/java/org/posper/hibernate/TicketLine.java
1.00/src/main/java/org/posper/hibernate/formatters/TicketLineFormatter.java
Added Paths:
-----------
1.00/readme-851-2010-10-11.txt
Removed Paths:
-------------
1.00/changelog_821.txt
1.00/posper-1.0-821.release_note.txt
1.00/readme-844-36-08.04.2010.txt
1.00/readme-847-xx-10.08.2010.txt
Modified: 1.00/CHANGELOG
===================================================================
--- 1.00/CHANGELOG 2010-10-11 13:16:18 UTC (rev 850)
+++ 1.00/CHANGELOG 2010-10-14 21:53:10 UTC (rev 851)
@@ -1,75 +1,15 @@
-- Edit Floors: ID has been renamed to Order Nr and can be edited. The number now determines
- the sort order of floors in the restaurant map.
-- fixed single quote being displayed as ' in product description in the ticket window
-- new templates for Payment.Types
-- configured ehcache (with second level cache on)
-- migrated Hibernate to hibenate-annotations 3.4.0 GA, hibernate 3.3.2 GA
-- added slf4j (needed by Hibernate)
-- enabled c3p0 connection pool (later changed to DriverManagerConnectionProvider)
-- replaced Vector by ArrayList in Ticket and Category
-- renamed getCategories to getSubcategories
-- renamed childs to children
-- fixed imports in TicketLine
-- added type to TicketLine iterator
-- adapted log4j settings
-- removed (hopefully) unused dependencies from pom.xml
-- added REST server for ticket printing
-- new option panel for Mobile Server. The server base address must include the
- port number and end with a /.
-- changed connection pool from c3p0 to DriverManagerConnectionProvider
- (layzy initialization problem with web service printing)
-- Log level list is now INFO by default instead of ALL when a new properties file is created
-- reconfigured logging, set JUL logging (jersey) to WARNING
-- restrict passwords to digits
-- workaround for +/- ticketline changes not updateing ticket version
-- added ehcache configuration, which passed testing fine. I've
- switched cahing off again, though, because other Hibernate probelms
- (see previous item) might have been caused or at least influenced
- by caching.
-- added printsXXX() methods to formatters, PaymentsModel, and PaymentsInfo
-- fixed typos and minor layout issues
-- fixed gastro mask default assignment in modifiers template
-- When a ticket that contains topup lines is being edited or deleted, the
- payment server will be sent a request to cancel the topup.
- If the server cannot perform the operation ...
-- In PaymentGatewayMembercard a locally assigned error message will be overwritten
- with a message sent by the server, if any. The first parameter returned by
- the server is interpreted as message key which then will be looked up in
- messages.properties.
-- changed logging strategy: runtime switching of logging levels only affects
- org.hibernate. org.posper will always be logged with the defined level (default info)
-- new logger 'audit' to log critical user activities in audit.log
-- audit performing cash count
-- fixed syntax error in cash count discount collection query
-- audit ticket operations that result in a dimminished value
-- audit deletions of open tickets
-- issue a message when no ticket exists for editing
-- fixed JNumberListener to insert digits respecting the cursor position
-- fix audit for '-' key
-- add net value to 'Open ticket deleted
-- fixed modifier globalMask behaviour: defining a global mask is no more interfering
- with naming of the discount buttons.
- A global modifier is always activated when a product is newly added or a modifier button
- is being pressed (does not work with the plus and minus keys!).
- The evaluated mask is now written back to the ticketline to keep the modifier state of when
- the line has been created or a modified with a function key.
-- new modifier function addComProducts(codes). The argument string takes a semicolon separated list
- of product codes (property code), optionally with an amount (as double) as a multiplier, which must
- be separated from the code by a comma. The string quotes must be escaped in the xml template.
- Example: addComProducts("DEPOSITBOTTLE,12;DEPOSITCARRIER&qout;)
- This would add two lines, one with 12 times bottle deposit and one with 1 carrier deposit.
-- Modifiers#getDisplayNames now has two formats:
- getModifiers(int mask) retrieves the display names for all modifiers in the mask. The mask
- is not evaluated before looking up the names. This is now used to set the button names.
- getModifiers(int mask, Product prod) works as before. Modifiers are evaluated before looking up the names.
-- jPanelTicket#addComLine() takes the string inserted into ticketline as a transient property by
- Modifierfunctions#addComProducts and inserts ticketlines as indicated by the string.
- addComLine is only called on product insertion.
-- jPanelTicket#incProductByCode can now take an amount to allow inserting com products with multiplier
-- add an activation modifier to products
-- add customergroup modifier (not yet evaluated)
-- add Modifiers#getCustomerMask and Modifiers#getCustomerGroupMask (not used until customers can be assigned)
-- fix category selection bug SF #3037463
-- check required database schema in basic.properties against posper.schema entry on posper_property for the
- db version check. We assume db backward compatibility and do no db upgrades in posper.
- Existing databases can be upgraded using the migrations in POSper Backoffice.
+Changes since revision 850
+==========================
+
+- added void setItemsPrinted(double amount) and double getItemsPrinted() to TicketLineFormatter
+ to facilitate printing correct kitchen receipts when the amount of a line has changed.
+ The templates have to be adapted individually.
+ Note, that we still cannot detect if a line has been deleted.
+- change com products amounts accordingly when the base product is incremented, decremented or set
+ to an new absolute amount
+- changed trigger incrementProductReference on posper_product to start with 100.000. This results
+ in correctly sorted records even if no numeric sort is used. This can easily be changed. Actually, the idea
+ is to create customer specific product id's which could e.g. also resemble a customer owned barcode. If no
+ real barcode is available for a product, the reference could serve as a replacement. The barcode could then
+ be scanned from a printed template.
+
Modified: 1.00/buildNumber.properties
===================================================================
--- 1.00/buildNumber.properties 2010-10-11 13:16:18 UTC (rev 850)
+++ 1.00/buildNumber.properties 2010-10-14 21:53:10 UTC (rev 851)
@@ -1,3 +1,3 @@
#maven.buildNumber.plugin properties file
-#Mon Oct 11 15:11:40 CEST 2010
-buildNumber0=72
+#Tue Oct 12 14:32:02 CEST 2010
+buildNumber0=82
Deleted: 1.00/changelog_821.txt
===================================================================
--- 1.00/changelog_821.txt 2010-10-11 13:16:18 UTC (rev 850)
+++ 1.00/changelog_821.txt 2010-10-14 21:53:10 UTC (rev 851)
@@ -1,45 +0,0 @@
-Changes in POSper 1.0 Rev 821
-=============================
-
-
-Major features:
-===============
-- added an option to define the inventory location
- which is assigned to the sales transactions for
- the current host.
- This allows stock management over different locations.
-
-
-Minor features:
-===============
-- more log info for error dialogs
-- added payment types to German template
-- detect missing modifiers template
-- added date annotations in Customer
-- detect Ticket.Button (taxid value) misconfiguration
-- added calibrate button in config devices. Pressing the
- button calls ./calibrate in the posper home directory.
- For the button to work ./calibrate must be linked to
- the touchscreen calibration program.
-- calculateItemCount() now returns "1" for lines with
- scale products or without products (free price entry)
-- also show empty categories (reasons: a) performance, b) free price with category)
-- added option to show empty categories;
-
-Bug fixes:
-==========
-- some static properties were not used as static
-
-
-Cleanup:
-========
-- layout fixes in config
-
-Caveats:
-========
-
-!! Always look at ALL change logs
-!! if you're upgrading
-!! from older versions.
-
-
Deleted: 1.00/posper-1.0-821.release_note.txt
===================================================================
--- 1.00/posper-1.0-821.release_note.txt 2010-10-11 13:16:18 UTC (rev 850)
+++ 1.00/posper-1.0-821.release_note.txt 2010-10-14 21:53:10 UTC (rev 851)
@@ -1,156 +0,0 @@
-Changes in POSper 1.0 Rev 821 against 0.60 Rev 759
-==================================================
-
-Major features:
-===============
-- Release 1.0!
- Adapted launch files to major version number.
-- added new fields to Customer
- email, email1
- date, date1
- user_field, user_field1
- comment
-- new methods in ticketline formatter:
- getOrderPrinted() returns true if the ticketline
- has not been flagged as printed, false otherwise.
- setOrderPrinted flags the ticketline as printed.
- This can be used to print kitchen order receipts
- containing only the items which have been added
- since the the last ticket print.
- Example:
- #if (! $ticketline.getOrderPrinted())
- # set(${ticketline.setOrderPrinted()}
- <line>
- <text align ="left" length="9">${ticketline.getAmount()}</text>
- <text align ="left" length="33">${ticketline.getDescription()}</text>
- </line>
- #end
-- new method in payments formatter:
- printCurrentBalance
- Example:
- #if ($paymentline.printCardBalance())
- <line>
- <text length="14"></text>
- <text align="left" length="17" bold="true">Card Balance:</text>
- <text align="right" length="9">${paymentline.printCardBalance()}</text>
- </line>
- #end
-- New splash screen with progress indication (and a fresh new POSper logo by the way).
-- The reports which had been individualized have been revised and internationalized
- again.
-- Payment methods cashin and cashout can be qualified with a name in a resource
- Payment.Types. The names are selectable in the Payments dialog and stored in the
- field 'name' in posper_payment. This field can e.g. be evaluated in POSper Backoffice
- to create input for third party accounting software.
-- A serial number will assigned to payments created in the Payments dialog.
- For this purpose a 'serial' and a 'name' field have been addded to the posper_payment
- record. You can use a database trigger to define the creation of a serial
- number per a base entry. If serial is NULL, the id will be displayed as serial number
- which is continuously auto-incremented by 1.
- A database trigger example is supplied in ./paymentserial.sql. The trigger defined
- with this procedure will restart the serial number at 1 every month.
-- added an option to define the inventory location
- which is assigned to the sales transactions for
- the current host.
- This allows stock management over different locations.
-
-
-
-Minor features:
-===============
-- Security question before deleting records in navigator.
-- new display 8035 (Jarltech/Glancetron)
-- new Customer fields: email, email1, date1, date2,
- userfield1, userfield2, comment
-- added a set of templates translated into German
- and adapted to use two different tax rates.
-- An additional security password (="setup") is required to be entered before POSper will
- overwrite an existing database schema.
-- Added a Yes-No dialog to reinitialize the database connection if the connection
- was closed. -- This is still a field to play with: what happens in different situations
- when the DB connection gets lost ? --
-- F[1-5] button captions are taken from modifier definitions (name tag)
-- When the close cash dialog is run a ticket will be created with the
- comment 'ticketcomment.cashcounted'.
- Another ticket with the comment 'ticketcomment.cashout' will be created and
- associated with a 'daycashout' payment only if an amount has been counted to
- be taken out of the drawer and the close cash procedure has been completed.
- This behaviour is different from before where we always created a ticket with
- a payment record which could cause inconsitencies when close cash was canceled.
-- addded french language files (_fr), still incomplete
-- Added Javadoc to all formatters;
-- package description for org.posper.hibernate.formatters;
-- load resources by default locale; if the default locale does not exist
- in templates 'en' is used
-- write a log message when an error message dialog is displayed
-- removed some obsolete log messages
-- default reports have been revised and are again fully localizable
-- more log info for error dialogs
-- added payment types to German template
-- detect missing modifiers template
-- added date annotations in Customer
-- detect Ticket.Button (taxid value) misconfiguration
-- added calibrate button in config devices. Pressing the
- button calls ./calibrate in the posper home directory.
- For the button to work ./calibrate must be linked to
- the touchscreen calibration program.
-- calculateItemCount() now returns "1" for lines with
- scale products or without products (free price entry)
-- also show empty categories (reasons: a) performance, b) free price with category)
-- added option to show empty categories;
-
-Bug fixes:
-==========
-- Stock diary and stock management had been broken since the devel merge. Touching a category
- button threw an exception and didn't show products.
-- Report Inventory2: Filter by warehouse threw an exception.
-- fixed Printer.Ticket in German templates- several minor fixes in forms
-- fixed mmessage.asksetup
-- fix size of JTicketsBagTicket form (make Pay Note button visible in all languages)
-- fixed issue in PaymentsModel: skip 'null lines'. null lines can occur when the
- line_index is not starting with 0. A log message is written.
-- fixed table creation in DBsetup;
-- fixed the issue in ticket edit that products could not be selected by button
-- fixed issue with duplicated payment records: this could happen when editing a
- ticket was canceled
-- fixed place creation in db setup
-- fixed ticketline duplicate (dup orderPrinted)
-- some static properties were not used as static
-
-Cleanup:
-========
-- moved message.wannasave from data/i18n to tpv/i18n
-- several minor fixes in forms
-- lanuage file cleanup (still iincomplete)
-- removed old printerlogo
-- improved some log messages
-- layout fixes in config
-
-Caveats:
-========
-- An existing rev 759 database has to be migrated to contain the
- following new fields:
- add to posper_customer:
- email, email1 (string)
- date, date1 (date)
- user_field, user_field1 (string)
- comment (string)
- add to posper_ticketline
- orderPrinted (boolean)
- Set orderPrinted=0 for open ticketlines (must not be null!)
- when migrating an exiting database.
-- The following updates have to be manually performed on the database, when updateing
- from rev 762:
- - Table posper_payment:
- new field serial (integer)
- new field name (varchar(30))
- - New table posper_paymentserialgenerator with
- field id (integer, auto)
- field base (varchar(20))
- field serial (integer)
-
-!! Always look at ALL change logs
-!! if you're upgrading
-!! from older versions.
-
-
Deleted: 1.00/readme-844-36-08.04.2010.txt
===================================================================
--- 1.00/readme-844-36-08.04.2010.txt 2010-10-11 13:16:18 UTC (rev 850)
+++ 1.00/readme-844-36-08.04.2010.txt 2010-10-14 21:53:10 UTC (rev 851)
@@ -1,86 +0,0 @@
-posper-1.0-844-36-08-04-2010
-============================
-
-This is mainly a maintenance release covering the latest snapshots and
-some new changes as listed below.
-We upgraded JasperReports to 3.5.2 which makes is necessary to upgrade
-your libs directory to that of the current release.
-No database changes have been made.
-
-Changes since the latest release:
-
-snapshot 464-372-21.07.2010:
-- Mifare RFID reader Proomag PCR310 can be used with the card's serial number
-- fixed #3026932 pictures not deletable
-- 3778627: removed '`' from Products report query definition (assumed incompatibility
- with PostgreSQL)
-- 3778627: catch Hibernate exception and issue a log warning when statistics query
- in close cash fails
-
-snapshot 468-390-22.07.2010:
-- fixed #3032700: tax entries in sales panel drop down list is now
- ordered by visibleId
-- fixed #3032644: table name can now be edited
-
-sanpshot 472-469-26.07.2010
-- fixed 3033117: German label for 'Edit Sales' changed to 'Beleg bearbeiten'
-- fixed 3033407: Modifier id="4" must have exlude="7",
- Modifier id="6" must have exlude="0"
- Remember these are defaults which can be changed as per requirement.
- The fix is only applied to default templates. Values in existing
- installations must be changed in the DB.
-- getting the nubmer of payments failed in PospgreSQL and HSQLDB,
- query changed, now works in HSQLDN, not tested with Postgres but should work,
- catch exception and set number of payments to 0.
-- fixed current inventory report:
- 'is null' and 'is not null' threw an exception,
- 'less or equal' returned the result of 'greater or equal'
-- fixed # close cash issue with HSQLDB (and PostgreSQL)
-
-snapshot 474-485-27.07.2010
-- fixed #3032660: The exception 'a different object with the same identifier
- value ...' was thrown in restaurant mode under certain conditions. This
- happened in JTicketsBagRestaurantMap when the place is checked for unclosed
- tickets. At this point either the ticket has already been deleted
- or Hibernate has detected a stale object condition. This happens under certain
- conditions and can very likely be safely ignored because at this point the
- original ticket has already been processed and saved.
-
-latest changes in this release
-- fixed #2678430: User's images are now resized to max 40x40 and can be
- flawlessly assigned an deleted
-- Form layout fixes in config, config options, config payments,
- and products editor
-- In Edit Sales, leaving the edit procedure before it has finished
- or explicitely been canceled caused stale tickets. Leaving the edit process
- is now equivalent to 'Cancel'
- Editing a ticket that is assigned to a place could not be completed if there
- was a ticket opened for the same place.
- Both problems have been fixed.
-- fixed remaining HSQLDB (and PostgreSQL) issues in reports
-- Jasper libs updated to 3.5.2
-- Products by Warehouse (now German 'Produkte Min Max'):
- list is now ordered by name
-- Users: list is now ordered by name
-- Product edit: drop down list of categories and categories table
- are now ordered by name
-- FR #3037773: Category visible id is now editable. The user has
- to reassign the start category manually in case of violating the
- association. Entering 0 (zero) raises a cannot save error.
-- fixed #3036437 according to the following list
- 1. Resized button 'Refresh' in restaurant mode
- 2. Naming of ticket field (e.g. German 'Bon') is now
- different in edit mode according to the fact that
- we use the ticket 'number' instead of the tickets
- 'visibleid'. Using the same name caused confusion
- 3. Resized fields in close cash
- 4. Fixd field sizes in product edit. Improved description
- for modifiers (Excluded...)
- 5. Fixd field sizes in category edit.
- 6. Fixd field sizes in user edit.
- 7. Edit taxes, sort list: this is always a short list, won't fix
- 8. Edit floors, sort list: this is always a short list, won't fix
- 9. Edit tables: list is now ordered by name
-
-
-
Deleted: 1.00/readme-847-xx-10.08.2010.txt
===================================================================
--- 1.00/readme-847-xx-10.08.2010.txt 2010-10-11 13:16:18 UTC (rev 850)
+++ 1.00/readme-847-xx-10.08.2010.txt 2010-10-14 21:53:10 UTC (rev 851)
@@ -1,109 +0,0 @@
-posper-1.0-847-41-10-08-2010
-============================
-
-This is mainly a maintenance release covering the latest snapshots and
-some new changes as listed below.
-
-Important notes:
-
-The password editor has been changed to only return digits.
-Although there was an SMS like mimic this was hardly recognized by users and
-resulted in unexpected strings (no problem in a pure POSper environment but it
-clashes with other clients used on the POSper DB).
-To migrate an existing database with user passwords, please delete at least the
-admin password before upgrading to this POSper release. Then you can delete/change
-other user passwords from there.
-
-We have made schema changes which makes it necessary that you manually upgrade your
-existing database. We have also migrated Hibernate to hibenate-annotations 3.4.0 GA,
-hibernate 3.3.2 GA and added slf4j (needed by Hibernate)which makes it necessary that you
-upgrade your libs directory to that of the current release.
-
-Changes since the latest release (more details see CHANGELOG)
-
-Changes since rev 1.0-844
-=========================
-
-Major features
-==============
-- migrated Hibernate to hibenate-annotations 3.4.0 GA, hibernate 3.3.2 GA
-- added REST server (Mobile Server) for ticket printing
-- new option panel for Mobile Server. The server base address must include the
- port number and end with a /.
-- new modifier function addComProducts(codes). The argument string takes a semicolon separated list
- of product codes (property code), optionally with an amount (as double) as a multiplier, which must
- be separated from the code by a comma. The string quotes must be escaped in the xml template.
- Example: addComProducts("DEPOSITBOTTLE,12;DEPOSITCARRIER&qout;)
- This would add two lines, one with 12 times bottle deposit and one with 1 carrier deposit.
-- A global modifier now works as expected. Defining a global mask is no more interferingD
- with naming of the discount buttons. A global modifier is always activated when a product is newly added
- or a modifier button is being pressed (does not work with the plus and minus keys!).
- The evaluated mask is now written back to the ticketline to keep the modifier in the same state
- as it was when the line has first been created or a modified with a function key.
-- new logger 'audit' to log critical user activities in audit.log. The following activities are being logged:
- performing cash count
- all activities on ticketlines that result in a lesser value
- deletion of open tickets and ticketlines
-
-Minor features
-==============
-- Edit Floors: ID has been renamed to Order Nr and can be edited. The number now determines
- the sort order of floors in the restaurant map.
-- new templates for Payment.Types
-- added slf4j (needed by Hibernate)
-- configured ehcache (with second level cache on)
-- added printsXXX() methods to formatters, PaymentsModel, and PaymentsInfo to allow
- formatting without currency sign
-- restrict passwords to digits (there are misconceptions in the virtual keyboard behaviour
- which come up when a normal keyboard is used)
-- changed logging strategy: runtime switching of logging levels only affects
- org.hibernate. org.posper will always be logged with the defined level (default info)
-- Log level list is now OFF by default instead of ALL when a new properties file is created
-- issue a message when no ticket exists for editing
-- add customergroup modifier (not yet evaluated)
-
-Bug fixes and cleanup
-=====================
-
-- fixed single quote being displayed as ' in product description in the ticket window
-- The schema reference has changed to 847 because db schema changes have been made.
-- replaced Vector by ArrayList in Ticket and Category
-- renamed getCategories to getSubcategories
-- renamed childs to children
-- fixed imports in TicketLine
-- added type to TicketLine iterator
-- adapted log4j settings
-- removed (hopefully) unused dependencies from pom.xml
-- changed connection pool from c3p0 to DriverManagerConnectionProvider
- (layzy initialization problem with web service printing)
-- reconfigured logging, set JUL logging (jersey) to WARNING
-- workaround for +/- ticketline changes not updateing ticket version
-- added ehcache configuration, which passed testing fine. I've
- switched caching off again, though, because other Hibernate probelms
- (see previous item) might have been caused or at least influenced
- by caching.
-- fixed typos and minor layout issues
-- fixed gastro mask default assignment in modifiers template
-- When a ticket that contains topup lines is being edited or deleted, the
- payment server will be sent a request to cancel the topup.
- If the server cannot perform the cancellation a message is issued and the operation
- is cancelled.
-- In PaymentGatewayMembercard a locally assigned error message will be overwritten
- with a message sent by the server, if any. The first parameter returned by
- the server is interpreted as message key which then will be looked up in
- messages.properties.
-- fixed syntax error in cash count discount collection query
-- audit ticket operations that result in a dimminished value
-- audit deletions of open tickets
-- fixed JNumberListener to insert digits respecting the cursor position
-- add Modifiers#getCustomerMask and Modifiers#getCustomerGroupMask (not used until customers can be assigned)
-
-Important: The following db changes have to be made when an existing db shall be upgraded from schema rev 762:
-
-- add the column modifiers, integer, default = 0 to posper_customergroup
-- add the column comment, varchar(255) to posper_ticketline
-- eventually change the type of posper_ticketline.orderPrinted to float
- This is due to a change that will be made to allow kitchen receipts to print lines where the amount has changed.
-
-
-
Added: 1.00/readme-851-2010-10-11.txt
===================================================================
--- 1.00/readme-851-2010-10-11.txt (rev 0)
+++ 1.00/readme-851-2010-10-11.txt 2010-10-14 21:53:10 UTC (rev 851)
@@ -0,0 +1,119 @@
+posper-1.0-851-2010-10-11
+=========================
+
+This is mainly a maintenance release covering the latest snapshots and
+some new changes as listed below.
+
+Important notes:
+
+The password editor has been changed to only return digits.
+Although there was an SMS like mimic this was hardly recognized by users and
+resulted in unexpected strings (no problem in a pure POSper environment but it
+clashes with other clients used on the POSper DB).
+To migrate an existing database with user passwords, please delete at least the
+admin password before upgrading to this POSper release. Then you can delete/change
+other user passwords from there.
+
+We have made schema changes which makes it necessary that you manually upgrade your
+existing database. We have also migrated Hibernate to hibenate-annotations 3.4.0 GA,
+hibernate 3.3.2 GA and added slf4j (needed by Hibernate)which makes it necessary that you
+upgrade your libs directory to that of the current release.
+
+Changes since the latest release (more details see CHANGELOG)
+
+Changes since rev 1.0-844
+=========================
+
+Major features
+==============
+- migrated Hibernate to hibenate-annotations 3.4.0 GA, hibernate 3.3.2 GA
+- added REST server (Mobile Server) for ticket printing
+- new option panel for Mobile Server. The server base address must include the
+ port number and end with a /.
+- new modifier function addComProducts(codes). The argument string takes a semicolon separated list
+ of product codes (property code), optionally with an amount (as double) as a multiplier, which must
+ be separated from the code by a comma. The string quotes must be escaped in the xml template.
+ Example: addComProducts("DEPOSITBOTTLE,12;DEPOSITCARRIER&qout;)
+ This would add two lines, one with 12 times bottle deposit and one with 1 carrier deposit.
+- A global modifier now works as expected. Defining a global mask is no more interferingD
+ with naming of the discount buttons. A global modifier is always activated when a product is newly added
+ or a modifier button is being pressed (does not work with the plus and minus keys!).
+ The evaluated mask is now written back to the ticketline to keep the modifier in the same state
+ as it was when the line has first been created or a modified with a function key.
+- new logger 'audit' to log critical user activities in audit.log. The following activities are being logged:
+ performing cash count
+ all activities on ticketlines that result in a lesser value
+ deletion of open tickets and ticketlines
+
+Minor features
+==============
+- Edit Floors: ID has been renamed to Order Nr and can be edited. The number now determines
+ the sort order of floors in the restaurant map.
+- new templates for Payment.Types
+- added slf4j (needed by Hibernate)
+- configured ehcache (with second level cache on)
+- added printsXXX() methods to formatters, PaymentsModel, and PaymentsInfo to allow
+ formatting without currency sign
+- restrict passwords to digits (there are misconceptions in the virtual keyboard behaviour
+ which come up when a normal keyboard is used)
+- changed logging strategy: runtime switching of logging levels only affects
+ org.hibernate. org.posper will always be logged with the defined level (default info)
+- Log level list is now OFF by default instead of ALL when a new properties file is created
+- issue a message when no ticket exists for editing
+- add customergroup modifier (not yet evaluated)
+- added void setItemsPrinted(double amount) and double getItemsPrinted() to TicketLineFormatter
+ to facilitate printing correct kitchen receipts when the amount of a line has changed.
+ The templates have to be adapted individually.
+ Note, that we still cannot detect if a line has been deleted.
+- change com products amounts accordingly when the base product is incremented, decremented or set
+ to an new absolute amount
+- changed trigger incrementProductReference on posper_product to start with 100.000. This results
+ in correctly sorted records even if no numeric sort is used. This can easily be changed. Actually, the idea
+ is to create customer specific product id's which could e.g. also resemble a customer owned barcode. If no
+ real barcode is available for a product, the reference could serve as a replacement. The barcode could then
+ be scanned from a printed template.
+
+Bug fixes and cleanup
+=====================
+
+- fixed single quote being displayed as ' in product description in the ticket window
+- The schema reference has changed to 847 because db schema changes have been made.
+- replaced Vector by ArrayList in Ticket and Category
+- renamed getCategories to getSubcategories
+- renamed childs to children
+- fixed imports in TicketLine
+- added type to TicketLine iterator
+- adapted log4j settings
+- removed (hopefully) unused dependencies from pom.xml
+- changed connection pool from c3p0 to DriverManagerConnectionProvider
+ (layzy initialization problem with web service printing)
+- reconfigured logging, set JUL logging (jersey) to WARNING
+- workaround for +/- ticketline changes not updateing ticket version
+- added ehcache configuration, which passed testing fine. I've
+ switched caching off again, though, because other Hibernate probelms
+ (see previous item) might have been caused or at least influenced
+ by caching.
+- fixed typos and minor layout issues
+- fixed gastro mask default assignment in modifiers template
+- When a ticket that contains topup lines is being edited or deleted, the
+ payment server will be sent a request to cancel the topup.
+ If the server cannot perform the cancellation a message is issued and the operation
+ is cancelled.
+- In PaymentGatewayMembercard a locally assigned error message will be overwritten
+ with a message sent by the server, if any. The first parameter returned by
+ the server is interpreted as message key which then will be looked up in
+ messages.properties.
+- fixed syntax error in cash count discount collection query
+- audit ticket operations that result in a dimminished value
+- audit deletions of open tickets
+- fixed JNumberListener to insert digits respecting the cursor position
+- add Modifiers#getCustomerMask and Modifiers#getCustomerGroupMask (not used until customers can be assigned)
+
+Important: The following db changes have to be made when an existing db shall be upgraded from schema rev 762:
+
+- add the column modifiers, integer, default = 0 to posper_customergroup
+- add the column comment, varchar(255) to posper_ticketline
+- eventually change the type of posper_ticketline.orderPrinted to float
+ This is due to a change that will be made to allow kitchen receipts to print lines where the amount has changed.
+
+
Modified: 1.00/src/main/java/net/adrianromero/tpv/inventory/ProductsEditor.java
===================================================================
--- 1.00/src/main/java/net/adrianromero/tpv/inventory/ProductsEditor.java 2010-10-11 13:16:18 UTC (rev 850)
+++ 1.00/src/main/java/net/adrianromero/tpv/inventory/ProductsEditor.java 2010-10-14 21:53:10 UTC (rev 851)
@@ -1378,15 +1378,16 @@
//make sure that "categories" has "main category" turned on, and set it
//non-editable.
NamesAndChecksModel mod = (NamesAndChecksModel) m_jCategoriesTable.getModel();
+ String curr_cat = evt.getItem().toString();
switch (evt.getStateChange()) {
case java.awt.event.ItemEvent.DESELECTED:
mod.unlock();
- mod.setAssociation(evt.getItem().toString(), false);
+ mod.setAssociation(curr_cat, false);
break;
case java.awt.event.ItemEvent.SELECTED:
- mod.setAssociation(evt.getItem().toString(), true);
- mod.lock(evt.getItem().toString());
+ mod.setAssociation(curr_cat, true);
+ mod.lock(curr_cat);
break;
}
}//GEN-LAST:event_m_jCategoryItemStateChanged
Modified: 1.00/src/main/java/net/adrianromero/tpv/panelsales/JPanelTicket.java
===================================================================
--- 1.00/src/main/java/net/adrianromero/tpv/panelsales/JPanelTicket.java 2010-10-11 13:16:18 UTC (rev 850)
+++ 1.00/src/main/java/net/adrianromero/tpv/panelsales/JPanelTicket.java 2010-10-14 21:53:10 UTC (rev 851)
@@ -801,22 +801,22 @@
}
} else {
// otro caracter
- // Esto es para el cidigo de barras...
+ // Esto es para el cidigo de barras... - This is for the barcode
m_sBarcode.append(cTrans);
- // Esto es para el los productos normales...
+ // Esto es para el los productos normales... - This is for normal products
if (cTrans == '\u007f') {
stateToZero();
} else if ((cTrans == '0') && (m_iNumberStatus == NUMBER_INPUTZERO)) {
m_jPrice.setText("0");
} else if ((cTrans == '1' || cTrans == '2' || cTrans == '3' || cTrans == '4' || cTrans == '5' || cTrans == '6' || cTrans == '7' || cTrans == '8' || cTrans == '9') && (m_iNumberStatus == NUMBER_INPUTZERO)) {
- // Un numero entero
+ // Un numero entero - an integer
m_jPrice.setText(Character.toString(cTrans));
m_iNumberStatus = NUMBER_INPUTINT;
m_iNumberStatusInput = NUMBERVALID;
} else if ((cTrans == '0' || cTrans == '1' || cTrans == '2' || cTrans == '3' || cTrans == '4' || cTrans == '5' || cTrans == '6' || cTrans == '7' || cTrans == '8' || cTrans == '9') && (m_iNumberStatus == NUMBER_INPUTINT)) {
- // Un numero entero
+ // Un numero entero - an integer
m_jPrice.setText(m_jPrice.getText() + cTrans);
} else if (cTrans == '.' && m_iNumberStatus == NUMBER_INPUTZERO) {
@@ -827,10 +827,10 @@
m_iNumberStatus = NUMBER_INPUTDEC;
} else if ((cTrans == '0') && (m_iNumberStatus == NUMBER_INPUTZERODEC || m_iNumberStatus == NUMBER_INPUTDEC)) {
- // Un numero decimal
+ // Un numero decimal - a decimal number
m_jPrice.setText(m_jPrice.getText() + cTrans);
} else if ((cTrans == '1' || cTrans == '2' || cTrans == '3' || cTrans == '4' || cTrans == '5' || cTrans == '6' || cTrans == '7' || cTrans == '8' || cTrans == '9') && (m_iNumberStatus == NUMBER_INPUTZERODEC || m_iNumberStatus == NUMBER_INPUTDEC)) {
- // Un numero decimal
+ // Un numero decimal- a decimal number
m_jPrice.setText(m_jPrice.getText() + cTrans);
m_iNumberStatus = NUMBER_INPUTDEC;
m_iNumberStatusInput = NUMBERVALID;
@@ -920,7 +920,7 @@
Toolkit.getDefaultToolkit().beep();
}
- // Anadimos un producto mas a la linea seleccionada
+ // Anadimos un producto mas a la linea seleccionada - add 1 to the selected product
} else if (cTrans == '+' && m_iNumberStatusInput == NUMBERZERO && m_iNumberStatusPor == NUMBERZERO) {
int i = m_ticketlines.getSelectedIndex();
if (i < 0) {
@@ -928,10 +928,12 @@
} else {
// Sumamos uno a la seleccionada...
TicketLine oLine = m_oTicket.getLines().get(i);
- double newamnt = oLine.getAmount() +1;
- audit(oLine, newamnt);
- oLine.setAmount(newamnt);
+ double oldamnt = oLine.getAmount();
+ audit(oLine, oldamnt + 1);
+ oLine.setAmount(oldamnt + 1);
paintTicketLine(i, oLine);
+ // increment associated com lines
+ incComLines(i, (oldamnt +1)/oldamnt, 0);
incVersion(m_oTicket);
saveTicket(m_oTicket);
}
@@ -944,14 +946,16 @@
} else {
// Restamos uno a la seleccionada...
TicketLine oLine = m_oTicket.getLines().get(i);
- double newamnt = oLine.getAmount() - 1;
- audit(oLine,newamnt);
- oLine.setAmount(newamnt);
+ double oldamnt = oLine.getAmount();
+ audit(oLine,oldamnt -1);
+ oLine.setAmount(oldamnt - 1);
if (oLine.getAmount() <= 0) {
removeTicketLine(i); // elimino la linea
} else {
paintTicketLine(i, oLine);
}
+ // increment associated com lines
+ incComLines(i, (oldamnt - 1)/oldamnt, 0);
incVersion(m_oTicket);
saveTicket(m_oTicket);
}
@@ -969,6 +973,8 @@
oLine.setAmount(dPor);
oLine.setPriceSell(Math.abs(oLine.getPriceSell()));
paintTicketLine(i, oLine);
+ // increment associated com lines
+ incComLines(i, dPor/amount, 1);
incVersion(m_oTicket);
saveTicket(m_oTicket);
}
@@ -981,17 +987,20 @@
} else {
double dPor = getPorValue();
TicketLine oLine = m_oTicket.getLines().get(i);
+ double oldamnt = oLine.getAmount();
audit(oLine,(oLine.getPriceSell() > 0) ? -dPor : dPor);
oLine.setAmount(dPor);
oLine.setPriceSell(-Math.abs(oLine.getPriceSell()));
paintTicketLine(i, oLine);
+ // increment associated com lines
+ incComLines(i, dPor/oldamnt, -1);
incVersion(m_oTicket);
saveTicket(m_oTicket);
}
-
- // Anadimos 1 producto
+ // The following cases all occur when a line is added without a product assigned
+ // Anadimos 1 producto - add a lin
} else if (cTrans == '+' && m_iNumberStatusInput == NUMBERVALID && m_iNumberStatusPor == NUMBERZERO) {
- addTicketLine(m_TaxModel.getSelectedItem(), 1.0, includeTaxes(getInputValue()));
+ addTicketLine(m_TaxModel.getSelectedItem(), 1.0, includeTaxes(getInputValue()));
// Anadimos 1 producto con precio negativo
} else if (cTrans == '-' && m_iNumberStatusInput == NUMBERVALID && m_iNumberStatusPor == NUMBERZERO) {
@@ -1223,6 +1232,7 @@
}
private void addComLines(TicketLine line) {
+ int currentLineIndex = m_ticketlines.getSelectedIndex();
String codestr = line.getComProducts();
if (codestr == null) {
return;
@@ -1243,8 +1253,32 @@
}
incProductByCode(codevec[0], line.getAmount() * amount);
}
+ m_ticketlines.setSelectedIndex(currentLineIndex);
}
+ private void incComLines(int lineindex, double factor, int priceFactor) {
+ double newamnt;
+ int i = lineindex;
+ List<TicketLine> lines = m_oTicket.getLines();
+ int nlines = lines.size();
+ if (!lines.get(lineindex).isProductCom()) {
+ i++;
+ while (i < nlines && lines.get(i).isProductCom()) {
+
+ newamnt = lines.get(i).getAmount() * factor;
+
+ audit(lines.get(i), newamnt);
+ lines.get(i).setAmount(newamnt);
+ if (priceFactor != 0) {
+ lines.get(i).setPriceSell(priceFactor * Math.abs(lines.get(i).getPriceSell()));
+ }
+ paintTicketLine(i, lines.get(i));
+ i++;
+ }
+ m_ticketlines.setSelectedIndex(lineindex);
+ }
+ }
+
private void visorTicketLine(TicketLine oLine) {
if (oLine == null || m_oTicket.getDateClose() != null) {
m_App.getDeviceTicket().clearVisor();
Modified: 1.00/src/main/java/org/posper/hibernate/TicketLine.java
===================================================================
--- 1.00/src/main/java/org/posper/hibernate/TicketLine.java 2010-10-11 13:16:18 UTC (rev 850)
+++ 1.00/src/main/java/org/posper/hibernate/TicketLine.java 2010-10-14 21:53:10 UTC (rev 851)
@@ -62,7 +62,7 @@
private String description = "";
private DiscountReason discountReason;
private Integer modifiers;
- private boolean orderPrinted;
+ private double orderPrinted;
private String comProducts;
/** Creates a new instance of TicketLine */
@@ -364,6 +364,16 @@
* @return boolean print state
*/
public boolean getOrderPrinted() {
+ return (orderPrinted > 0) ? true : false;
+ }
+
+ /**
+ * Retrieve the number of items with which the line has been printed
+ * to a kitchen order receipt. Used via TicketlineFormatter.
+ * @return double printed amount of items
+ */
+ @Transient
+ public double getItemsPrinted() {
return orderPrinted;
}
@@ -373,9 +383,18 @@
* @param orderPrinted set to true when printing the line.
*/
public void setOrderPrinted(boolean orderPrinted) {
- this.orderPrinted = orderPrinted;
+ this.orderPrinted = orderPrinted ? 1 : 0;
}
+ /**
+ * Set an amount to determine for how many items the line has been printed
+ * to a kitchen order receipt. Used via TicketlineFormatter.
+ * @param orderPrinted set to true when printing the line.
+ */
+ public void setItemsPrinted(double amount) {
+ this.orderPrinted = amount;
+ }
+
@Transient
public String getComProducts() {
return comProducts;
Modified: 1.00/src/main/java/org/posper/hibernate/formatters/TicketLineFormatter.java
===================================================================
--- 1.00/src/main/java/org/posper/hibernate/formatters/TicketLineFormatter.java 2010-10-11 13:16:18 UTC (rev 850)
+++ 1.00/src/main/java/org/posper/hibernate/formatters/TicketLineFormatter.java 2010-10-14 21:53:10 UTC (rev 851)
@@ -295,6 +295,15 @@
}
/**
+ * Use this method to filter unprinted ticket lines when
+ * printing a kitchen order receipt.
+ * @return true if the line has already been printed.
+ */
+ public double getItemsPrinted() {
+ return line.getItemsPrinted();
+ }
+
+ /**
* Use this method to flag ticket lines as printed when
* printing a kitchen order receipt. This method is altering the original
* ticketline in the database.
@@ -307,4 +316,17 @@
Logger.getLogger(TicketLine.class.getName()).log(Level.ERROR, "TicketLine save failed", ex);
}
}
+ /**
+ * Use this method to flag ticket lines as printed with an amount of tiems when
+ * printing a kitchen order receipt. This method is altering the original
+ * ticketline in the database.
+ */
+ public void setItemsPrinted(double amount) {
+ line.setItemsPrinted(amount);
+ try {
+ line.save();
+ } catch (BasicException ex) {
+ Logger.getLogger(TicketLine.class.getName()).log(Level.ERROR, "TicketLine save failed", ex);
+ }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|