Hi Everyone,
Don't say I didn't try because I did 😛
I got a interactive button in Sales Op where it only shows up when a add-on record is attached (this part is working) 🙂
Now when I push the button, I would like it to go away.
This is what I have done but it's still there until I click it one more time.
{
$id = $data['id'];
$get_billing = DB::Execute("SELECT * FROM billing_data_1 WHERE f_sales_op = $id");
if($get_billing->EOF)
{
return 0;
}
else
{
$sync = $get_billing->fields['f_items_ready'];
if($mode == "view" && $sync != 1)
{
Base_ActionBarCommon::add('settings', "Sync Sales", Module::create_href(array('sync'=>true))); //Create the button
if(isset($_REQUEST['sync'])) //if button been pressed
{
DB::Execute("UPDATE samco_billing_data_1 SET f_items_ready = 1 WHERE id = ".$get_billing->fields['id']); //update tables
Module::create_href(array('done'=>true)); //refresh page (or at least tried :P)
}
}
}
what should I try instead?
Thanks,
jjjj12212