Closed (outdated)
Project:
erp
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
27 Oct 2011 at 12:19 UTC
Updated:
9 Apr 2017 at 23:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
burningdog commentedWow, big patch! Can you detail a bit more of how you did this and what changes you've made?
Your patch won't apply for anyone else - please read the Advanced patch contributor guide for how to patch with git so that the rest of us can play with your code :)
Comment #2
leenx commentedBuilding with drush make and this patch works, but I see that there has been a change with the git migration - http://drupal.org/node/745224
I have re-tested with patch -p1 and posting my new patch.
As for explaining what I did ...
Quotes/Invoices and Cash Sales
Added two fields, one for the transaction discount and the other in the data for each line, for item discount.
Also setup a conf items, to enable these options as well as been able to label the transaction discount, ie, Discount/Excess
Also added a total for the transaction, which I wish I knew how to align up nicely, but that can come later.
Also tried to add a recalc [+] button on each line, so the forms look a little more balanced, but the don't always work, needs more work.
For Items, I started with an option to disable discounts on item, the DB has been built, but I have not yet added the logic.
Thanks, enjoy.
LeeT
Comment #3
singularoInteresting patch.
This would give the ability to do a discount per line item, which is just like what MYOB retail manager does.
How we do it at the moment is with a single service item called DISCOUNT, which you simply put 1 in the qty, and -20 or whatever in the amount column.
You don't really need individual recalc buttons, clicking add line does the same thing.
Does it add a setting that allows enabling/disabling the discount functionality?
Comment #4
leenx commentedThanks, I hope it makes as much sense to everybody else as it does to us.
The reason for discount per line, is that you might not want the original price changed. Something I have been thinking of, is making it so that people can't mess with the item price. Later you would be able to see how much discounts you have been giving and stuff like that. Currently set as a percent, but if I can work out the AJax/DAHAH stuff, would be nice to be a fixed figure, which could work out the percent or if the figure put in had a percent, then work out the other way around.
Sorry, I think i did not explain the extra recalc [+] button. The items end with [X], but the insert form, looks odd, without a similar button, so I added a button [+] there, so it looked a little more balanced, but it does not always work, which I don't understand. Hope to fix it in future.
Yes, there are two options. One to disable/enable transaction discount and another to disable/enable line discounts. And a label, so that transaction discounts can be called what ever the company using it might want to call it. In our sponsors cases, they wanted it as Excess, not discount.
Enjoy
LeeT
Comment #5
singularo