mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
12 lines
387 B
JavaScript
12 lines
387 B
JavaScript
export const decrementCalc = ({ quantity_on_hand, type }, e) => {
|
|
if (type == 'decrement') {
|
|
return parseInt(quantity_on_hand, 10) - parseInt(e.currentTarget.value, 10);
|
|
} else {
|
|
return e.currentTarget.value - quantity_on_hand;
|
|
}
|
|
};
|
|
|
|
export const incrementCalc = ({ quantity_on_hand, quantity }, e) => {
|
|
return parseInt(quantity_on_hand, 10) + parseInt(quantity, 10);
|
|
};
|