partial #3644
This commit is contained in:
parent
cbb4ad2f7b
commit
88d7783b09
@ -867,16 +867,16 @@ console.log('order',order);
|
|||||||
}
|
}
|
||||||
service._autotip = function () {
|
service._autotip = function () {
|
||||||
var subtotal = service.totalbreakdown().subtotal;
|
var subtotal = service.totalbreakdown().subtotal;
|
||||||
var autotipValue
|
|
||||||
if (subtotal === 0) {
|
if (subtotal === 0) {
|
||||||
autotipValue = 0;
|
autotipValue = 0;
|
||||||
} else {
|
} else {
|
||||||
// autotip formula - see github/#940
|
// autotip formula - see github/#940
|
||||||
autotipValue = Math.ceil(4 * (subtotal * 0.107 + 0.85)) / 4;
|
autotipValue = Math.ceil( 2 * (subtotal * 0.11 + 0.95 ) ) / 2;
|
||||||
if( !isNaN( autotipValue ) ){
|
if( !isNaN( autotipValue ) ){
|
||||||
autotipValue = autotipValue.toFixed( 2 );
|
autotipValue = autotipValue.toFixed( 2 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log('autotipValue',autotipValue);
|
||||||
service.form.autotip = autotipValue;
|
service.form.autotip = autotipValue;
|
||||||
}
|
}
|
||||||
service._autotipText = function () {
|
service._autotipText = function () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user