コード例 #1
0
require_once "../data/person.data.php";
require_once '../../staff/class/staff.class.php';
require_once '../class/staff_tax.class.php';
require_once inc_dataGrid;
$staffInfo = new manage_staff($_POST['Q0']);
$staffTaxHistory = new manage_staff_tax($staffInfo->staff_id);
$dg = new sadaf_datagrid("TaxHistory", $js_prefix_address . "../data/staff_tax.data.php?task=selectTaxHistory&PID=" . $_POST['Q0'], "TaxHistoryGRID");
$dg->addColumn("", "staff_id", "", true);
$dg->addColumn("", "tax_history_id", "", true);
$dg->addColumn("", "personid", "", true);
$col = $dg->addColumn("نوع شخص", "person_type", "int");
$col->width = 90;
$col = $dg->addColumn("شماره شناسایی", "staff_id", "int");
$col->width = 90;
$col = $dg->addColumn("جدول مالیاتی", "tax_table_type_id", GridColumn::ColumnType_string);
$col->editor = ColumnEditor::ComboBox(manage_domains::getAll_TaxType($staffInfo->person_type), "tax_table_type_id", "title");
$col = $dg->addColumn("تاريخ شروع", "start_date", GridColumn::ColumnType_date);
$col->editor = ColumnEditor::SHDateField();
$col->width = 150;
$col = $dg->addColumn("تاريخ پايان", "end_date", GridColumn::ColumnType_date);
$col->editor = ColumnEditor::SHDateField(true);
$col->width = 150;
$dg->width = 700;
$dg->height = 200;
$dg->DefaultSortField = "start_date";
$dg->EnableSearch = false;
$dg->EnablePaging = false;
$dg->title = "سابقه مالیاتی";
$dg->autoExpandColumn = "tax_table_type_id";
$col = $dg->addColumn("حذف", "", "string");
$col->renderer = " function(v,p,r){ return StaffTaxObject.opDelRender(v,p,r); }";