projects
/
order_line_extra.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee3ba0c
)
Add db_prevoid
author
Maxime Bourget
<bmx007@gmail.com>
Wed, 5 Jun 2013 21:07:37 +0000
(22:07 +0100)
committer
Maxime Bourget
<bmx007@gmail.com>
Wed, 5 Jun 2013 21:07:37 +0000
(22:07 +0100)
hooks.php
patch
|
blob
|
history
diff --git
a/hooks.php
b/hooks.php
index 0bf5ad166e40b1e7181685d197d7fba70171e090..1773852a2b2f4cfe15db15141e71fb906794a901 100644
(file)
--- a/
hooks.php
+++ b/
hooks.php
@@
-92,5
+92,16
@@
class hooks_order_line_extra extends hooks {
}
}
+
+
+ function db_prevoid($cart, $trans_type) {
+ // Simple version, rebuild everything
+ $types = array(ST_CUSTCREDIT, ST_CUSTDELIVERY, ST_INVADJUST, ST_PURCHORDER, ST_WORKORDER, ST_MANUISSUE,
+ ST_SALESORDER, ST_SALESQUOTE, ST_MANURECEIVE);
+ if(in_array($trans_type, $types)) {
+ update_queue_quantities();
+ update_qoh_for_item();
+ }
+ }
}
?>