Example #1
0
function handle_submit()
{
    global $selected_id;
    if (!check_data()) {
        return false;
    }
    if ($selected_id != "") {
        update_currency($_POST['Abbreviation'], $_POST['Symbol'], $_POST['CurrencyName'], $_POST['country'], $_POST['hundreds_name']);
    } else {
        add_currency($_POST['Abbreviation'], $_POST['Symbol'], $_POST['CurrencyName'], $_POST['country'], $_POST['hundreds_name']);
    }
    return true;
}
Example #2
0
function handle_submit()
{
    global $selected_id, $Mode;
    if (!check_data()) {
        return false;
    }
    if ($selected_id != "") {
        update_currency($_POST['Abbreviation'], $_POST['Symbol'], $_POST['CurrencyName'], $_POST['country'], $_POST['hundreds_name'], check_value('auto_update'));
        display_notification(_('Selected currency settings has been updated'));
    } else {
        add_currency($_POST['Abbreviation'], $_POST['Symbol'], $_POST['CurrencyName'], $_POST['country'], $_POST['hundreds_name'], check_value('auto_update'));
        display_notification(_('New currency has been added'));
    }
    $Mode = 'RESET';
}
Example #3
0
 case 'modify_order':
     modify_order();
     list_order();
     break;
 case 'list_comment':
     list_comment();
     break;
 case 'modify_comment':
     modify_comment();
     list_comment();
     break;
 case 'list_currencies':
     list_currencies();
     break;
 case 'add_currency':
     add_currency();
     break;
 case 'edit_currency':
     edit_currency();
     break;
 case 'del_currency':
     del_currency();
     list_currencies();
     break;
 case 'options':
     options();
     break;
 case 'urls':
     urls();
     break;
 case 'automation':
Example #4
0
     $result = db_query($sql, "item code could not be retrieved");
     $row = db_fetch_row($result);
     if (!$row) {
         add_item_code($code, $id, $description, $cat, 1);
     } else {
         update_item_code($row[0], $code, $id, $description, $cat, 1);
     }
 }
 if ($type == 'ITEM' || $type == 'KIT' || $type == 'PRICE') {
     if (isset($price) && $price != "") {
         if ($currency == "") {
             $currency = get_company_pref("curr_default");
         } else {
             $row = get_currency($currency);
             if (!$row) {
                 add_currency($currency, "", "", "", "");
             }
         }
         $sql = "SELECT * FROM " . TB_PREF . "prices\tWHERE stock_id='{$code}' AND sales_type_id={$_POST['sales_type_id']} AND\n\t\t\t\t\tcurr_abrev='{$currency}'";
         $result = db_query($sql, "price could not be retrieved");
         $row = db_fetch_row($result);
         if (!$row) {
             add_item_price($code, $_POST['sales_type_id'], $currency, $price);
         } else {
             update_item_price($row[0], $_POST['sales_type_id'], $currency, $price);
         }
         $pr++;
     }
 }
 if ($type == 'BUY') {
     $code = db_escape($code);