This topic is locked
[SOLVED]

 About Code Customization rules in PHPRUNNER

7/7/2010 12:14:45 AM
PHPRunner General questions
romaldus author



[size="3"]Look at the screenshot for example[/size]


As you see from the screenshot, i put two custom codes there :

$values["ExtendedPrice"] = ($values["UnitPrice"] * $values["Quantity"]) - (($values["Discount"]/100)*($values["UnitPrice"] * $values["Quantity"]));

return true;


and

$sql="select max(substr(OrderID,9)) as mx from BANGKE where substr(OrderID,7,2)=month(now()) order by mx";

$rs=CustomQuery($sql);

$data=db_fetch_array($rs);

$str="SO";

$str2=date("Ym");

$str3=($data["mx"]+1);

$values["OrderID"]="$str$str2".str_pad($str3, 5, 0, STR_PAD_LEFT);

return true;


The first custom code dosn't works..

If it is possible to add more the one custom code, how i configure it in PHPRUNNER?[/b]

Sergey Kornilov admin 7/7/2010

You can add as much custom code as you need. Just make sure "return true;" appears once in your code at the very end.

romaldus author 7/7/2010



You can add as much custom code as you need. Just make sure "return true;" appears once in your code at the very end.


It works!!! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=51033&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' /> <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=51033&image=2&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' /> <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=51033&image=3&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />

I put the "return true;" in the end of custom code