[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 /********************************************************************************* 2 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 3 * ("License"); You may not use this file except in compliance with the License 4 * The Original Code is: vtiger CRM Open Source 5 * The Initial Developer of the Original Code is vtiger. 6 * Portions created by vtiger are Copyright (C) vtiger. 7 * All Rights Reserved. 8 * 9 ********************************************************************************/ 10 document.write("<script type='text/javascript' src='modules/Products/multifile.js'></"+"script>"); 11 function updateListPrice(unitprice,fieldname, oSelect) 12 { 13 if(oSelect.checked == true) 14 { 15 document.getElementById(fieldname).style.visibility = 'visible'; 16 document.getElementById(fieldname).value = unitprice; 17 }else 18 { 19 document.getElementById(fieldname).style.visibility = 'hidden'; 20 } 21 } 22 23 function check4null(form) 24 { 25 var isError = false; 26 var errorMessage = ""; 27 if (trim(form.productname.value) =='') { 28 isError = true; 29 errorMessage += "\n Product Name"; 30 form.productname.focus(); 31 } 32 33 if (isError == true) { 34 alert("Missing required fields: " + errorMessage); 35 return false; 36 } 37 return true; 38 } 39 40 function set_return(product_id, product_name) { 41 window.opener.document.EditView.parent_name.value = product_name; 42 window.opener.document.EditView.parent_id.value = product_id; 43 } 44 function set_return_specific(product_id, product_name) { 45 //getOpenerObj used for DetailView 46 47 if(document.getElementById('from_link').value != '') 48 { 49 var fldName = window.opener.document.QcEditView.product_name; 50 var fldId = window.opener.document.QcEditView.product_id; 51 }else if(typeof(window.opener.document.DetailView) != 'undefined') 52 { 53 var fldName = window.opener.document.DetailView.product_name; 54 var fldId = window.opener.document.DetailView.product_id; 55 }else 56 { 57 var fldName = window.opener.document.EditView.product_name; 58 var fldId = window.opener.document.EditView.product_id; 59 } 60 fldName.value = product_name; 61 fldId.value = product_id; 62 } 63 64 function set_return_formname_specific(formname,product_id, product_name) { 65 window.opener.document.EditView1.product_name.value = product_name; 66 window.opener.document.EditView1.product_id.value = product_id; 67 } 68 function add_data_to_relatedlist(entity_id,recordid) { 69 70 opener.document.location.href="index.php?module={RETURN_MODULE}&action=updateRelations&smodule={SMODULE}&destination_module=Products&entityid="+entity_id+"&parid="+recordid; 71 } 72 73 function set_return_inventory(product_id,product_name,unitprice,qtyinstock,taxstr,row_id) { 74 curr_row = row_id; 75 76 window.opener.document.EditView.elements["productName"+curr_row].value = product_name; 77 window.opener.document.EditView.elements["hdnProductId"+curr_row].value = product_id; 78 window.opener.document.EditView.elements["listPrice"+curr_row].value = unitprice; 79 //getOpenerObj("unitPrice"+curr_row).innerHTML = unitprice; 80 getOpenerObj("qtyInStock"+curr_row).innerHTML = qtyinstock; 81 82 var tax_array = new Array(); 83 var tax_details = new Array(); 84 tax_array = taxstr.split(','); 85 for(var i=0;i<tax_array.length;i++) 86 { 87 tax_details = tax_array[i].split('='); 88 } 89 90 window.opener.document.EditView.elements["qty"+curr_row].focus() 91 } 92 93 function set_return_inventory_po(product_id,product_name,unitprice,taxstr,curr_row) { 94 window.opener.document.EditView.elements["productName"+curr_row].value = product_name; 95 window.opener.document.EditView.elements["hdnProductId"+curr_row].value = product_id; 96 window.opener.document.EditView.elements["listPrice"+curr_row].value = unitprice; 97 //getOpenerObj("unitPrice"+curr_row).innerHTML = unitprice; 98 99 var tax_array = new Array(); 100 var tax_details = new Array(); 101 tax_array = taxstr.split(','); 102 for(var i=0;i<tax_array.length;i++) 103 { 104 tax_details = tax_array[i].split('='); 105 } 106 107 window.opener.document.EditView.elements["qty"+curr_row].focus() 108 } 109 110 function set_return_product(product_id, product_name) { 111 window.opener.document.EditView.product_name.value = product_name; 112 window.opener.document.EditView.product_id.value = product_id; 113 } 114 function getImageListBody() { 115 if (browser_ie) { 116 var ImageListBody=getObj("ImageList") 117 } else if (browser_nn4 || browser_nn6) { 118 if (getObj("ImageList").childNodes.item(0).tagName=="TABLE") { 119 var ImageListBody=getObj("ImageList") 120 } else { 121 var ImageListBody=getObj("ImageList") 122 } 123 } 124 return ImageListBody; 125 } 126
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |