Refactor orderfooter and quantity display

* Unit, others_quantitiy and other_tolerance is now in orderfooter
* We display the missing units in the article row now.
This commit is contained in:
sandoz 2009-11-01 18:33:14 +01:00
parent 646a6b11f5
commit fd1eb8a1d7
5 changed files with 58 additions and 22 deletions

View file

@ -109,6 +109,13 @@ function update(item, quantity, tolerance) {
itemTotal[item] = price[item] * (Number(quantity));
}
$('price_' + item + '_display').update(asMoney(itemTotal[item]));
// update missing units
missing_units = unit[item] - (((quantityOthers[item] + Number(quantity)) % unit[item]) + Number(tolerance) + toleranceOthers[item])
if (missing_units < 0) {
missing_units = 0;
}
$('missing_units_' + item).update(String(missing_units));
// update balance
updateBalance();

View file

@ -81,6 +81,12 @@ option {
span.click-me {
cursor: pointer; }
.left {
float: left; }
.right {
float: right; }
.clear {
clear: both; }
@ -413,6 +419,7 @@ table#order {
padding-right: 10px; }
#order-footer, .article-info {
text-align: left;
z-index: 1;
position: fixed;
bottom: 0;
@ -435,7 +442,7 @@ table#order {
.article-info {
z-index: 2;
width: 30em;
width: 50em;
height: 8em;
border: none;
left: 30px; }

View file

@ -81,6 +81,12 @@ option {
span.click-me {
cursor: pointer; }
.left {
float: left; }
.right {
float: right; }
.clear {
clear: both; }
@ -413,6 +419,7 @@ table#order {
padding-right: 10px; }
#order-footer, .article-info {
text-align: left;
z-index: 1;
position: fixed;
bottom: 0;
@ -435,7 +442,7 @@ table#order {
.article-info {
z-index: 2;
width: 30em;
width: 50em;
height: 8em;
border: none;
left: 30px; }

View file

@ -90,7 +90,10 @@ option
span.click-me
cursor: pointer
.left
float: left
.right
float: right
.clear
clear: both
@ -454,6 +457,7 @@ table#order
td
:padding-right 10px
#order-footer, .article-info
text-align: left
z-index: 1
position: fixed
bottom: 0
@ -475,7 +479,7 @@ table#order
background-color: red
.article-info
z-index: 2
width: 30em
width: 50em
height: 8em
border: none
left: 30px