harry-g / fairpos

Automatically exported from code.google.com/p/fairpos
0 stars 0 forks source link

Commission sale #39

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Registered Customers can buy on Commission. 
That means they can give items back later that they did not sell and only then 
pay for the sold items.
Therefore we need:
* payment types "Commission" and "on account" to distinguish this; only allowed 
for registered customers (a customer must be selected)
* on account, print account as a report and in parallel send via email to 
account manager
* on Commission, print a special report with emty fields to fill out how much 
of an item is returned; print 2 times
* on Commission, use ticket return function, but let pay the difference between 
original ticket and return

Original issue reported on code.google.com by harald.g...@gmail.com on 12 Mar 2012 at 10:08

GoogleCodeExporter commented 8 years ago

Original comment by harald.g...@gmail.com on 13 Mar 2012 at 9:33

GoogleCodeExporter commented 8 years ago

Original comment by harald.g...@gmail.com on 21 Jun 2012 at 8:00

GoogleCodeExporter commented 8 years ago

Original comment by harald.g...@gmail.com on 22 Jun 2012 at 9:19

GoogleCodeExporter commented 8 years ago
account is already there (called "Debt") - it is only for registered customers, 
it just doesn't send email 
...so we hijack this payment type or do we need "Debt" also for non-commission 
payment? Maybe we can have "Debt" for both non-commission debt & "commission 
debt" - I suggest just adding another "OK" button in current debt payment: "OK 
- Commission"... 

returning & paying what they sold:
- ticket return - you mean ticket refund?
- we probably want to link "commission" tickets from Customers window? - ie. 
have there a button besides "Pay account" which will be "Commission return" and 
will trigger search in ticket journal (==? Edit sales) with only tickets for 
that customer && maybe somehow flagged as commission 

Original comment by benes.vi...@gmail.com on 26 Jun 2012 at 10:53

GoogleCodeExporter commented 8 years ago
Some more requirements as mentioned:
* we must distinguish between "Commission" (bring back partially later) and "on 
account" (write an invoice immediately)
* when commission is returned, customer immediately wants to pay (usual payment)

Ideas for this:
* maybe we can just use debt for commission and cheque payment for invoice
* put a "pay account" button in ticket refund panel, when a customer is 
selected (the other way round, not in customers panel)

Hint: ticket refund was translated "Bonjournal", i.e. ticket journal in german. 
Buttons "refund" are translated "Rückgabe", i.e. "return". This caused the 
confusion.

Original comment by harald.g...@gmail.com on 27 Jun 2012 at 9:37

GoogleCodeExporter commented 8 years ago
Had a deeper look.

For invoice, the cheque payments fits fine, but it must be changed to be only 
possible with customer selected (like already implemented in debt).

The debt payment can directly be used for commission. Only thing to change 
there is the pay debt on returning things directly.

Texts for commission and invoice can be changed in localization.

Original comment by harald.g...@gmail.com on 7 Jul 2012 at 9:56

GoogleCodeExporter commented 8 years ago
Tried out the debt: I found no possibility to refund on debt! Only thing would 
be to edit the ticket (which again could be confusing).

Original comment by harald.g...@gmail.com on 10 Jul 2012 at 9:35

GoogleCodeExporter commented 8 years ago
fixed (r83): cheque possible without customer selected 
...renamed also cheque tab to "Invoice"

Original comment by benes.vi...@gmail.com on 10 Jul 2012 at 9:51

GoogleCodeExporter commented 8 years ago
in works:
* JTicketsBagTicket.java - new button m_jCommission copied from (ie. analogical 
to) m_jRefund - but setting RECEIPT_COMMISSION ticket type
* JPanelTicket.java - closeTicket(): use newly defined paymentdialogcommission 
(derived from JPaymentSelectCustomer) when ticket is of (newly defined) type 
TicketInfo.RECEIPT_COMMISSION

Original comment by benes.vi...@gmail.com on 11 Jul 2012 at 2:14

GoogleCodeExporter commented 8 years ago
r87: proto-implementation of commission sale:
 * in Edit sales (Ticket journal) - ticket can be selected
 * as ticket is selected, "Commision" button is available
 * Commision button leads to refund functionality (2 lists, returning from bottom to top) - but with RECEIPT_REFUNDCOMMISSION type of ticket
 * when paying - debt of given customer is added to total value of the ticket
 * if paying was ok, in saveTicket, customer debt is set to 0.0

FIXME: Commission can be selected also for tickets without customer
FIXME: Exploit - One item can be returned infinitely-many times
FIXME: Commission can be entered for tickets with no customer (payment cannot 
be finished in this case)

TODO (?): use TicketInfo.RECEIPT_COMMISSION ticket type - for normal tickets 
but that ones which were paid with "Commission" payment -> this ticket type can 
then be used to allow commision only for these (as it is now, "Commission" 
button can be used on any ticket in ticket journal)

Original comment by benes.vi...@gmail.com on 11 Jul 2012 at 8:36

GoogleCodeExporter commented 8 years ago
Looks good!
Open points IMHO:
* enable button Commission refund only for tickets of payment type debt (maybe 
then you don't need to save type RECEIPT_COMMISSION)
-> this would also solve the "ticket without customer", tickets with debt will 
always have a customer
* Mode "Commission refund" should be visible clearly somewhere - otherwise you 
cannot know in which mode you are, refund dialog looks exactly the same; 
especially if someone leaves the POS system in the middle of something and 
someone else comes there...

Background: I think we won't use debt for something else, so we can bind it 
completely to this.
Concerning Exploit: I don't see much danger; they could as well say, from 100 
pcs we return 99 while in fact they sold all. This has to be trusted or 
controlled (for unknown customers like Stephan).

Original comment by harald.g...@gmail.com on 11 Jul 2012 at 9:15

GoogleCodeExporter commented 8 years ago
fixed (r92): debt was not set to 0.0 on commission
added (r92): commission button enabled (and refund button disabled) if ticket 
has one payment: debt

FIXME: when returning all items on commission, payment dialog with $0.0 has 
'Ok' button disabled

----
Discussion:
>  otherwise you cannot know in which mode you are, refund dialog looks exactly 
the same; especially if someone leaves the POS system in the middle of 
something and someone else comes there...

IMHO - this poses no problem - the new shop keeper just marks what items are 
returned by the customer & finishes the transaction (lets customer pay the 
price displayed) - whether it was refund or commission is unimportant - 
everything will be ok

Original comment by benes.vi...@gmail.com on 12 Jul 2012 at 9:52

GoogleCodeExporter commented 8 years ago
I see the problem that the one function returns items and gives you the money 
for it, the other one returns items and lets you pay the difference.
So it's not unimportant. I'm sure my old ladies will be confused, becaus two 
different things lok the same...

Original comment by harald.g...@gmail.com on 12 Jul 2012 at 10:19

GoogleCodeExporter commented 8 years ago
> gives you the money for it, the other ... lets you pay the difference

yeah, but this is not about the refund screen (ticket on top, list of items to 
be given back on bottom) - this is about the payment screen after that... 
...and there, if you should give money to the customer - you have there: "Make 
the refund and press OK."

I can imagine, we can be also changing the title of this window which is now 
"Payment" in all cases to something like "Give money to the customer" or I 
don't know what... :) Or - how you think we should make the two things more 
distinct?

Original comment by benes.vi...@gmail.com on 12 Jul 2012 at 10:52

GoogleCodeExporter commented 8 years ago
Open: show the user in ticket what he pays.

Original comment by harald.g...@gmail.com on 13 Jul 2012 at 2:54

GoogleCodeExporter commented 8 years ago
You want the items what customer pay either: 
a) to appear on the *printed* ticket only (but nowhere else in the db etc.)? 
And somewhere else also? 
- or -
b)  to be on the new ticket actually? Ie. we would need to somehow discard the 
previous ticket so we do not substract the items from stock twice...

Original comment by benes.vi...@gmail.com on 24 Jul 2012 at 8:40

GoogleCodeExporter commented 8 years ago
I just noticed this in a short. 
We could on the ticket just show the debt to have something consistend.
But in fact, we will need a printed A4 report on a laser printer instead of the 
ticket. There we should show all items taken and returned.
Should be no big problem, but I did not start yet working on the reports in 
general. Theay are done with Jasper reports I think and you need some editor 
tool for it... Same fr printed invoice.

Original comment by harald.g...@gmail.com on 24 Jul 2012 at 9:11

GoogleCodeExporter commented 8 years ago
Additional Commission requests:
* reort with all customers with open commissions including total debt and last 
visit date -> create with monthly bookkeeping report
* Text on commission receipt: please bring back latest after xx weeks.
* Name "Kommissionsschein" in headline, visible good
* invoice with details (all articles) in DIN A4 print

Original comment by harald.g...@gmail.com on 31 Jul 2012 at 10:02

GoogleCodeExporter commented 8 years ago
Summary of status of this issue:

Placed in different issues
* for later: FIXME: Exploit - One item can be returned infinitely-many times
* for Harald: report with all customers, ticket layouts
* for Vilem: printed invoice DIN A4 sheet

Still open
* Mode "Commission refund" or "Ticket refund" must be visible above the refund 
dialog AND payment dialog
* FIXME: when returning all items on commission, payment dialog with $0.0 has 
'Ok' button disabled
* Payment after returning commission does not work at all for me (null pointer 
exception)
** it must be the difference between taken and returned articles
** it must be payment instead of refund, texts should be OK when payment dialog 
from sale is taken

Original comment by harald.g...@gmail.com on 18 Jan 2013 at 11:45

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
> * FIXME: when returning all items on commission, payment dialog with $0.0 has 
'Ok' button disabled
Fixed (r137): 'JPaymentSelectCommission' instead of 'JPaymentSelectCustomer'

Still open 

> * Payment after returning commission does not work at all for me (null 
pointer exception)
Cannot reproduce, could you please be more specific (repro steps, call stack, 
...)?

> ** it must be the difference between taken and returned articles
This is what it is - but not for one ticket, but from more commissions which 
took place (eventually in the history). Customer pays his debt (from all 
commissions since the last (commission return) payment) minus things returned 
from current ticket in 'Commission return'. 
...this was by design (see "addedValue" in JPanelTicket.java & 
"updateCustomerDebtToZero()" in DataLogicSales.java; also 'Commission return' 
with no returned products should be allowed IMHO - this will mean customer sold 
everything & is going to pay the whole debt ...the rationale behind this 
thinking is that 'Commission return' then could be the only place where 
commission needs to be handled by the shop keeper.

> ** it must be payment instead of refund, texts should be OK when payment 
dialog from sale is taken
I have it as "Payment" (window title) and "Cash/Invoice/Voucher/Card" (tabs) 
...Were you really trying commision and not refund? Do you have "clean" build 
from updated sources?

> * Mode "Commission refund" or "Ticket refund" must be visible above the 
refund dialog AND payment dialog
Could you, please, create some UI element for it (I do not know if it should be 
button or title bar or what)? 
I can then finish the logic for it...

Original comment by benes.vi...@gmail.com on 28 Jan 2013 at 11:56

GoogleCodeExporter commented 8 years ago
>Cannot reproduce, could you please be more specific (repro steps, call stack, 
...)?
Also cannot reproduce now - hope it was just my experimental DB...

>Could you, please, create some UI element for it (I do not know if it should 
be button or title bar or what)?
>I can then finish the logic for it...
I would say just a text.
For the first try, I added JPanelTicket.m_jLblTitle
We can make it nicer later if needed.

The rest is fine, maybe I really tested some scrub or  non-updated code...

(this comment already sent via e-mail)

Original comment by harald.g...@gmail.com on 2 Feb 2013 at 8:27

GoogleCodeExporter commented 8 years ago
Maybe I forgot to set this to you and you did not see it?
Open point was:

>Could you, please, create some UI element for it
I would say just a text.
For the first try, I added JPanelTicket.m_jLblTitle
>I can then finish the logic for it...
-->Yes, please!

Original comment by harald.g...@gmail.com on 12 Feb 2013 at 10:28

GoogleCodeExporter commented 8 years ago
r171 
Please test.

Original comment by benes.vi...@gmail.com on 16 Feb 2013 at 11:30

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
TODO (?): 
* search filter for commission & commission return tickets in Edit Sales (combo 
box) 

More detail:
=Situation:
Up to now, the options are only "Sales", "Refunds", "All" & it is not easy to 
do a search for all commission tickets (however - we can filter tickets by 
giving customer ...but still it is not nice - commission tickets cannot be 
recognized from ordinary tickets in the list (maybe just change icon? - see 
that 'Refund' tickets have different icon))

=Implementation:
'commission return' search is easy to implement (as commission return has its 
own ticket type 'RECEIPT_REFUNDCOMMISSION' - see TicketInfo.java class), 
implementation for 'commission' may be tricky (as it would involve changing 
ticket type for commission: 'RECEIPT_NORMAL' -> 'RECEIPT_COMMISSION' (which is 
not on many places, but there are also places using hardcoded value - eg. 
JTicketFinder.createValue() - "afilter[3]=" with "1" instead of 
'RECEIPT_REFUND')

Original comment by benes.vi...@gmail.com on 17 Feb 2013 at 12:33

GoogleCodeExporter commented 8 years ago
Please check/work on TODO in your latest comment...

Original comment by harald.g...@gmail.com on 24 May 2013 at 10:05