Exemplo n.º 1
0
        $_POST['description'] = $myrow["description"];
        $_POST['order_no'] = $myrow["order_no"];
        $_POST['debtor_no'] = $myrow["debtor_no"];
        $_POST['group_no'] = $myrow["group_no"];
        $_POST['days'] = $myrow["days"];
        $_POST['monthly'] = $myrow["monthly"];
        $_POST['begin'] = sql2date($myrow["begin"]);
        $_POST['end'] = sql2date($myrow["end"]);
        $_POST['last_sent'] = $myrow['last_sent'] == "0000-00-00" ? "" : sql2date($myrow["last_sent"]);
    }
    hidden("selected_id", $selected_id);
}
text_row_ex(_("Description:"), 'description', 50);
templates_list_row(_("Template:"), 'order_no');
customer_list_row(_("Customer:"), 'debtor_no', null, " ", true);
if ($_POST['debtor_no'] > 0) {
    customer_branches_list_row(_("Branch:"), $_POST['debtor_no'], 'group_no', null, false);
} else {
    sales_groups_list_row(_("Sales Group:"), 'group_no', null, " ");
}
small_amount_row(_("Days:"), 'days', 0, null, null, 0);
small_amount_row(_("Monthly:"), 'monthly', 0, null, null, 0);
date_row(_("Begin:"), 'begin');
date_row(_("End:"), 'end', null, null, 0, 0, 5);
if ($selected_id != -1 && $_POST['last_sent'] != "") {
    date_row(_("Last Created"), 'last_sent');
}
end_table(1);
submit_add_or_update_center($selected_id == -1, '', 'both');
end_form();
end_page();
Exemplo n.º 2
0
    label_cell($myrow["name"]);
    label_cell(percent_format($myrow["rate"]), "align=right");
    label_cell($myrow["sales_gl_code"] . " " . $myrow["SalesAccountName"]);
    label_cell($myrow["purchasing_gl_code"] . " " . $myrow["PurchasingAccountName"]);
    edit_link_cell("selected_id=" . $myrow["id"]);
    delete_link_cell("selected_id=" . $myrow["id"] . "&delete=1");
    end_row();
}
end_table();
//-----------------------------------------------------------------------------------
hyperlink_no_params($_SERVER['PHP_SELF'], tr("New Tax Type"));
//-----------------------------------------------------------------------------------
start_form();
start_table($table_style2);
if (isset($selected_id)) {
    //editing an existing status code
    $myrow = get_tax_type($selected_id);
    $_POST['name'] = $myrow["name"];
    $_POST['rate'] = percent_format($myrow["rate"]);
    $_POST['sales_gl_code'] = $myrow["sales_gl_code"];
    $_POST['purchasing_gl_code'] = $myrow["purchasing_gl_code"];
    hidden('selected_id', $selected_id);
}
text_row_ex(tr("Description:"), 'name', 50);
small_amount_row(tr("Default Rate:"), 'rate', '', "", "%", user_percent_dec());
gl_all_accounts_list_row(tr("Sales GL Account:"), 'sales_gl_code', null);
gl_all_accounts_list_row(tr("Purchasing GL Account:"), 'purchasing_gl_code', null);
end_table(1);
submit_add_or_update_center(!isset($selected_id));
end_form();
end_page();
Exemplo n.º 3
0
         $_POST['dimension2_id'] = $myrow["dimension2_id"];
     }
 }
 quick_actions_list_row(_("Posted") . ":", 'actn', null, true);
 if (list_updated('actn')) {
     $Ajax->activate('edit_line');
 }
 $actn = strtolower(substr($_POST['actn'], 0, 1));
 if ($actn == 't') {
     //item_tax_types_list_row(_("Item Tax Type").":",'dest_id', null);
     tax_types_list_row(_("Tax Type") . ":", 'dest_id', null);
 } else {
     gl_all_accounts_list_row(_("Account") . ":", 'dest_id', null, $_POST['type'] == QE_DEPOSIT || $_POST['type'] == QE_PAYMENT);
     if ($actn != '=') {
         if ($actn == '%') {
             small_amount_row(_("Part") . ":", 'amount', price_format(0), null, "%", user_exrate_dec());
         } else {
             amount_row(_("Amount") . ":", 'amount', price_format(0));
         }
     }
 }
 if ($dim >= 1) {
     dimensions_list_row(_("Dimension") . ":", 'dimension_id', null, true, " ", false, 1);
 }
 if ($dim > 1) {
     dimensions_list_row(_("Dimension") . " 2:", 'dimension2_id', null, true, " ", false, 2);
 }
 end_table(1);
 if ($dim < 2) {
     hidden('dimension2_id', 0);
 }
Exemplo n.º 4
0
function display_rate_edit()
{
    global $selected_id, $table_style2;
    start_table($table_style2);
    if (isset($_POST['get_rate'])) {
        $_POST['BuyRate'] = exrate_format(get_ecb_rate($_POST['curr_abrev']));
    }
    if ($selected_id != "") {
        //editing an existing exchange rate
        $myrow = get_exchange_rate($selected_id);
        $_POST['date_'] = sql2date($myrow["date_"]);
        $_POST['BuyRate'] = exrate_format($myrow["rate_buy"]);
        hidden('selected_id', $selected_id);
        hidden('date_', $_POST['date_']);
        hidden('curr_abrev', $_POST['curr_abrev']);
        label_row(tr("Date to Use From:"), $_POST['date_']);
    } else {
        date_row(tr("Date to Use From:"), 'date_');
    }
    small_amount_row(tr("Exchange Rate:"), 'BuyRate', null, '', submit('get_rate', tr("Get")), user_exrate_dec());
    end_table(1);
    submit_add_or_update_center($selected_id == "");
    display_note(tr("Exchange rates are entered against the company currency."), 1);
}
Exemplo n.º 5
0
    label_cell($myrow["curr_abrev"]);
    label_cell($myrow["sales_type"]);
    amount_cell($myrow["price"]);
    amount_cell($myrow["factor"]);
    edit_link_cell("PriceID=" . $myrow["id"] . "&Edit=1");
    delete_link_cell("PriceID=" . $myrow["id"] . "&delete=yes");
    end_row();
}
end_table();
//------------------------------------------------------------------------------------------------
if (db_num_rows($prices_list) == 0) {
    display_note(tr("There are no prices set up for this part."));
}
echo "<br>";
if (isset($_GET['Edit'])) {
    $myrow = get_stock_price($_GET['PriceID']);
    hidden('PriceID', $_GET['PriceID']);
    $_POST['curr_abrev'] = $myrow["curr_abrev"];
    $_POST['sales_type_id'] = $myrow["sales_type_id"];
    $_POST['price'] = price_format($myrow["price"]);
    $_POST['factor'] = price_format($myrow["factor"]);
}
start_table($table_style2);
currencies_list_row(tr("Currency:"), 'curr_abrev', null);
sales_types_list_row(tr("Sales Type:"), 'sales_type_id', null);
small_amount_row(tr("Price:"), 'price', null);
small_amount_row(tr("Factor:"), 'factor', null);
end_table(1);
submit_center('updatePrice', tr("Add/Update Price"));
end_form();
end_page();
Exemplo n.º 6
0
echo "<br>";
if ($Mode == 'Edit') {
    $myrow = get_stock_price($selected_id);
    $_POST['curr_abrev'] = $myrow["curr_abrev"];
    $_POST['sales_type_id'] = $myrow["sales_type_id"];
    $_POST['price'] = price_format($myrow["price"]);
}
hidden('selected_id', $selected_id);
if (@$_GET['popup']) {
    hidden('_tabs_sel', get_post('_tabs_sel'));
    hidden('popup', @$_GET['popup']);
}
div_start('price_details');
start_table(TABLESTYLE2);
currencies_list_row(_("Currency:"), 'curr_abrev', null, true);
sales_types_list_row(_("Sales Type:"), 'sales_type_id', null, true);
if (!isset($_POST['price'])) {
    $_POST['price'] = price_format(get_kit_price(get_post('stock_id'), get_post('curr_abrev'), get_post('sales_type_id')));
}
$kit = get_item_code_dflts($_POST['stock_id']);
small_amount_row(_("Price:"), 'price', null, '', _('per') . ' ' . $kit["units"]);
end_table(1);
if ($calculated) {
    display_note(_("The price is calculated."), 0, 1);
}
submit_add_or_update_center($selected_id == -1, '', 'both');
div_end();
if (!@$_GET['popup']) {
    end_form();
    end_page(@$_GET['popup'], false, false);
}