debugger
form = ALL_FORMS[0].Form.FormTemplate;
c_BuyNumber = form.GetControl("c_BuyNumber").GetValue();
c_SupplierMontakhab = form.GetControl("c_SupplierMontakhab").GetValue().split(";#")[1];
c_EstelamBestPrice = form.GetControl("c_EstelamBestPrice").GetValue();
c_NoteEstelam = form.GetControl("c_NoteEstelam").GetValue();
c_StepOrder = form.GetControl("c_StepOrder").GetValue();
c_Moaven = form.GetControl("username_Moaven").GetValue();
if(c_Moaven == undefined) c_Moaven = ""
c_ImgMoaven = form.GetControl("c_ImgMoaven").GetValue()
if (c_ImgMoaven.includes("DocLib") && c_StepOrder > 112) {c_ImgTagMoaven = '
'} else {c_ImgTagMoaven = '
'}
c_ManagerBazargani = form.GetControl("username_ManagerBazargani").GetValue();
if(c_ManagerBazargani == undefined) c_ManagerBazargani = ""
c_ImgManager = form.GetControl("c_ImgManager").GetValue()
if (c_ImgManager.includes("DocLib") && c_StepOrder > 110) {c_ImgTagManager = '
'} else {c_ImgTagManager = ''}
c_CEOBazargani = form.GetControl("username_CEOBazargani").GetValue();
if(c_CEOBazargani == undefined) c_CEOBazargani = ""
c_ImgCEO = form.GetControl("c_ImgCEO").GetValue()
if (c_ImgCEO.includes("DocLib") && c_StepOrder > 100) {c_ImgTagCEO = '
'} else {c_ImgTagCEO = ''}
c_ExpertUser = form.GetControl("username_ExpertUser").GetValue();
if(c_ExpertUser == undefined) c_ExpertUser = ""
c_ImgExpert = form.GetControl("c_ImgExpert").GetValue()
if (c_ImgExpert.includes("DocLib") && c_StepOrder >= 100) {c_ImgTagExpert = '
'} else {c_ImgTagExpert = ''}
// Date
var date = new Date();
var dateObject = farvardin.gregorianToSolar(date.getFullYear() , date.getMonth() + 1 , date.getDate() , "object");
var year = dateObject.year;
var month = dateObject.month;
var day = dateObject.day;
var mywindow = window.open('', 'PRINT', 'height=1000,width=800','paddingLeft:50px');
var keepColors = '';
mywindow.document.write('' + keepColors + '' + document.title +'');
mywindow.document.write('');
mywindow.document.write('');
mywindow.document.write(''+
''+
'جدول مقایسه ای قیمت استعلام | '+
'
'+
''+
'درخواست خرید '+ c_BuyNumber +' | '+
'
'+
'
');
//Price Table
var priceGrid = form.GetControl("dg_Price").InputControl.GetAllItems();
var priceTable = ''+
''+
'ردیف | '+
'نام تامین کننده | '+
'ارز | '+
'قیمت | '+
'
';
Row = 1;
for(var i=0; i'+
''+ Row +' | '+
''+ Supplier +' | '+
''+ Currency +' | '+
''+ Price +' | '+
''
Row++;
}
}
mywindow.document.write(priceTable + '
')
mywindow.document.write(''+
''+
'تامین کننده منتخب: | '+
''+ c_SupplierMontakhab +' | '+
' | '+
'
'+
''+
'قیمت برنده منتخب: | '+
''+ c_EstelamBestPrice +''+ wordifyfa(c_EstelamBestPrice) +' | '+
'
'+
'
');
mywindow.document.write(''+
'توضیحات: | '+ c_NoteEstelam +' |
'+
'
');
mywindow.document.write(''+
''+
'کارشناس بازرگانی | '+
''+ c_ImgTagExpert + c_ExpertUser +' | '+
'رئیس مربوطه | '+
''+ c_ImgTagCEO +c_CEOBazargani +' | '+
'
'+
'
');
mywindow.document.write(''+
''+
'مدیر بازرگانی | '+
''+ c_ImgTagManager +c_ManagerBazargani +' | '+
'معاونت بازرگانی | '+
''+ c_ImgTagMoaven +c_Moaven +' | '+
'
'+
'
');
mywindow.document.write('');
mywindow.document.close();
mywindow.focus();
mywindow.print();