[ic] Backend UI Suggestion

Steve Graham icdev at mrlock.com
Wed Feb 15 13:36:59 EST 2006


Hello List,

This code might apply if you accept orders without verifying inventory.
It will add a red asterisk after the order number in order.html
and a red asterisk after each item qty in order_view which does not 
have enough inventory to fill the order.
This might help order processing to notice these orders as soon as 
they come in.


edit the following files in  ../lib/Vend/UI/pages/admin/

order.html
order_view.html


order_view.html changes:

[query list=1 table=orderline sql="select * from orderline where 
order_number = '[loop-code]'" ignore_undefined=1]
+[seti tt_qoh][data table=inventory
  +                 col=quantity
  +                 key="[sql-param sku]"]
+[/seti]
+[seti tt_red_flg]0[/seti]
+[if type=explicit
+    condition="[calc]$Scratch->{tt_qoh} < [sql-data orderline 
quantity][/calc]"]
+ [seti tt_red_flg]1[/seti]
+[/if]


further down in code where the sku order quantity is displayed:

                <td align=right style="padding: 5px">[sql-param quantity]
+[if scratch tt_red_flg]<font color="red">*</font>[/if]
+</td>


order.html changes:

+[seti tt_red_flg]0[/seti]
+[query list=1 table=orderline sql="select * from orderline where 
order_number = '[item-code]'" ignore_undefined=1]
+[seti tt_qoh][data table=inventory
+                   col=quantity
+                  key="[sql-param sku]"]
+[/seti]
+[if type=explicit
+    condition="[calc]$Scratch->{tt_qoh} < [sql-data orderline 
quantity][/calc]"]
+ [seti tt_red_flg]1[/seti]
+[/if]
+[/query]
<TD>[page href=__UI_BASE__/order_view form="order=[item-code]"][item-code]</A>
+[if scratch tt_red_flg]<font color="red">*</font>[/if]
</td>

-Steve





More information about the interchange-users mailing list