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KO}ӽmSşذqsOy?\[,d@'73'j%kOe`1.g2"e =YIzS2|zŐƄa\U,dP;jhhhaxǶ?КZ՚.q SE+XrbOu%\GتX(H,N^~]JyEZQKceTQ]VGYqnah;y$cQahT&QPZ*iZ8UQQM.qo/T\7X"u?Mttl2Xq(IoW{R^ ux*SYJ! 4S.Jy~ BROS[V|žKNɛP(L6V^|cR7i7nZW1Fd@ Ara{詑|(T*dN]Ko?s=@ |_EvF]׍kR)eBJc" MUUbY6`~V޴dJKß&~'d3i WWWWWW
Current Directory: /home/u588966950/domains/vtsinfotech.online/public_html/duroplast
Viewing File: /home/u588966950/domains/vtsinfotech.online/public_html/duroplast/add_sales.php
<?php include "header.php"; $sql_per = mysql_fetch_array(mysql_query("select `sale` from `admin_permission` where `admin_id` = '".$_SESSION['login_type_id']."'")); if($sql_per['sale']== "N") { echo "<script>location.href='error.php'</script>"; } include("image.class.php"); ?> <?php function send_sms($base_url,$post_fields) { $ch = curl_init(); //echo $sms_massage; curl_setopt($ch, CURLOPT_URL,$base_url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$post_fields); // receive server response ... curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec ($ch); //echo $server_output; curl_close ($ch); } if($_REQUEST['flag'] == "1") { $query_sms = mysql_fetch_array(mysql_query("select * from `soft_sms_settings` where `sms_settings_id` = '1'")); $emp = explode(" - ",$_REQUEST['emp_code']); $emp1 = mysql_fetch_array(mysql_query("select * from `emp` where `emp_code` = '".trim($emp[0])."'")); $emp_id = $emp1['emp_id']; if($_REQUEST['cust_dob'] != "") { $cust_dob = strtotime($_REQUEST['cust_dob']); } $chkcustomer = mysql_query("select `cust_id` from `soft_customer` where `cust_mobile` = '".substr(trim($_REQUEST['cust_mobile']), -10, 10)."'"); $chknumcustomer = mysql_num_rows($chkcustomer); if($chknumcustomer > 0) { $rowchkcustomer = mysql_fetch_array($chkcustomer); mysql_query("UPDATE `soft_customer` SET `cust_name` = '".strtoupper($_REQUEST['cust_name'])."', `cust_add` = '$_REQUEST[cust_add]', `cust_mobile` = '".substr(trim($_REQUEST['cust_mobile']), -10, 10)."', `cust_ph` = '$_REQUEST[cust_ph]', `cust_fax` = '$_REQUEST[cust_fax]', `cust_email` = '$_REQUEST[cust_email]', `cust_dob` = '$cust_dob', `sex` = '$_REQUEST[sex]' where `cust_id` = '".$rowchkcustomer['cust_id']."'"); $cust_id = $rowchkcustomer['cust_id']; } else { mysql_query("INSERT INTO `soft_customer` SET `cust_name` = '".strtoupper($_REQUEST['cust_name'])."', `cust_add` = '$_REQUEST[cust_add]', `cust_mobile` = '".substr(trim($_REQUEST['cust_mobile']), -10, 10)."', `cust_ph` = '$_REQUEST[cust_ph]', `cust_fax` = '$_REQUEST[cust_fax]', `cust_email` = '$_REQUEST[cust_email]', `cust_dob` = '$cust_dob', `sex` = '$_REQUEST[sex]', `category1` = '', `category2` = ''"); $cust_id = mysql_insert_id(); if($query_sms['registration_sms_on_sale'] == "Y"){ $query_msg = mysql_fetch_array(mysql_query("select * from `soft_sms_content` where `sms_type` = '3'")); //$mobile_no = substr(trim($_REQUEST['cust_mobile']), -10, 10); $MsgeTxt = str_replace("|#VAL1|",$_REQUEST['cust_name'],$query_msg['sms_content']); $phone=$_REQUEST['cust_fax'].$_REQUEST['cust_mobile']; /*$base_url="http://icfai.info/smsapi/pushsms.aspx"; $post_fields="user=rangotsav&pwd=123456&to=$mobile_no&sid=RNGTSV&msg=$message&fl=0"; send_sms($base_url,$post_fields);*/ if($_POST['notify_sms']=='yes') { //------- SMS Code Start----------------- //Please Enter Your Details $user="RANGOTSAV"; //your username $password="rangotsav01"; //your password $mobilenumbers=$phone; //enter Mobile numbers comma seperated $message = $MsgeTxt; //enter Your Message //$message = $_GET["message"]; //enter Your Message $senderid="SMSCountry"; //Your senderid $messagetype="N"; //Type Of Your Message $DReports="Y"; //Delivery Reports //$url="http://www.smscountry.com/SMSCwebservice_Bulk.aspx"; $url="http://sms.bulkssms.com/submitsms.jsp"; $message = urlencode($message); $ch = curl_init(); if (!$ch){die("Couldn't initialize a cURL handle");} $ret = curl_setopt($ch, CURLOPT_URL,$url); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); //curl_setopt ($ch, CURLOPT_POSTFIELDS,"User=$user&passwd=$password&mobilenumber=$mobilenumbers&message=$message&sid=$senderid&mtype=$messagetype&DR=$DReports"); curl_setopt ($ch, CURLOPT_POSTFIELDS,"user=RNGTSV&key=6f1c99c89bXX&mobile=$mobilenumbers&message=$message&senderid=INFOSM&accusage=1"); $ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //If you are behind proxy then please uncomment below line and provide your proxy ip with port. // $ret = curl_setopt($ch, CURLOPT_PROXY, "PROXY IP ADDRESS:PORT"); $curlresponse = curl_exec($ch); // execute if(curl_errno($ch)) echo 'curl error : '. curl_error($ch); if (empty($ret)) { // some kind of an error happened die(curl_error($ch)); curl_close($ch); // close cURL handler } else { $info = curl_getinfo($ch); curl_close($ch); // close cURL handler //echo ""; //echo $curlresponse; //echo "Message Sent Succesfully" ; } } //------------------------------------ if($_POST['notify_mail']=='yes') { $message = $MsgeTxt; $subject = "Order Details"; $headers = "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\n"; $headers.= 'From:<'.$emailTo.'>' . "\r\n" . 'Reply-To:<'.$emailTo.'>' . 'NoReply'; mail($emailTo, $subject,$message, $headers); //mail('mrinmay.vts@gmail.com', $subject,$message, $headers); } } } $purno = mysql_fetch_array(mysql_query("select `sl_no` from `invoice_sl` where `type` = 'S' order by `sl_id` desc limit 1")); $purchaseno = sprintf("%06d",($purno['sl_no'] + 1)); mysql_query("insert into `invoice_sl` SET `sl_no` = '$purchaseno', `type` = 'S'"); $invoice_no = $purchaseno; $invoice_date = strtotime($_REQUEST['invoice_date']); if($_REQUEST['gift_voucher_code'] != ""){ $sql_promo = mysql_query("select * from `soft_promotion` where `voucher_code` = '".trim(strtoupper($_REQUEST['gift_voucher_code']))."' AND `cust_id` = '$cust_id' AND `status` = 'Y' AND `issue_date` <= '$invoice_date' AND `expiry_date` >= '$invoice_date' AND `use_status` = 'UN'"); $num_promo = mysql_num_rows($sql_promo); if($num_promo > 0){ $promo_code = mysql_fetch_array($sql_promo); if($_REQUEST['total_sale_price'] > $promo_code['minimum_amt']){ $gift_voucher_code = trim(strtoupper($_REQUEST['gift_voucher_code'])); mysql_query("UPDATE `soft_promotion` set `use_status` = 'U' WHERE `voucher_id` = '$promo_code[voucher_id]'"); }else{ $gift_voucher_code = ""; } } } mysql_query("INSERT INTO `soft_sale` SET `invoice_no` = '$invoice_no', `invoice_date` = '$invoice_date', `cust_id` = '$cust_id', `emp_id` = '$emp_id', `total_sale_price` = '$_REQUEST[total_sale_price]', `disc_per` = '$_REQUEST[disc_per]', `disc_amt` = '$_REQUEST[disc_amt]', `tax_per` = '$_REQUEST[tax_per]', `tax` = '$_REQUEST[tax]', `net_price` = '$_REQUEST[net_price]', `paid_amt` = '$_REQUEST[paid_amt]', `due_amt` = '$_REQUEST[due_amt]', `ex_charges` = '$_REQUEST[ex_charges]', `gift_point_add` = '$_REQUEST[gift_point_add]', `promo_code` = '$_REQUEST[promo_code]', `gift_voucher_code` = '$gift_voucher_code', `sale_type` = 'R', `discount_remarks` = '".addslashes($_REQUEST['discount_remarks'])."', `gift_generation_status` = '$_REQUEST[gift_generation_status]'"); $sale_id = mysql_insert_id(); $purchaseno = sprintf("%06d",$sale_id); mysql_query("update `soft_sale` set `invoice_no` = '".$purchaseno."' where `sale_id` = '".$sale_id."'"); $invoice_no = $purchaseno; if($gift_voucher_code != ""){ mysql_query("INSERT INTO `soft_coupon_sale` SET `promotion_id` = '$promo_code[voucher_id]', `sale_id` = '$sale_id', `cust_id` = '$cust_id', `desc_type` = '$promo_code[coupon_type]', `coupon_desc` = '$promo_code[disc_percent]'"); } $reward_point = 0; foreach($_REQUEST['product_code'] as $k=>$val) { if($val != "" || $val > 0) { $product = mysql_fetch_array(mysql_query("select `stock_out`, `stock_rem`, `product_id` from `soft_product_details` where `product_code` = '".trim($val)."'")); mysql_query("INSERT INTO `soft_sale_details` SET `sale_id` = '$sale_id', `invoice_no` = '$invoice_no', `invoice_date` = '$invoice_date', `cust_id` = '$cust_id', `product_id` = '".$product['product_id']."', `qty` = '".$_REQUEST['qty'][$k]."', `price` = '".$_REQUEST['price'][$k]."', `disc` = '".$_REQUEST['disc'][$k]."', `total_price` = '".$_REQUEST['total_price'][$k]."'"); mysql_query("update `soft_product_details` SET `status` = 'N' where `product_id` = '".$product['product_id']."'"); $stock_out = $product['stock_out'] + $_REQUEST['qty'][$k]; $stock_rem = $product['stock_rem'] - $_REQUEST['qty'][$k]; mysql_query("update `soft_product_details` SET `stock_out` = '$stock_out', `stock_rem` = '$stock_rem' where `product_id` = '".$product['product_id']."'"); if($_REQUEST['gift_point_add'] == "Y"){ //echo "select `cat_id` from `soft_product_details` where `product_id` = '".$product['product_id']."'"; $chk_procust = mysql_fetch_array(mysql_query("select `cat_id` from `soft_product_details` where `product_id` = '".$product['product_id']."'")); $chk_cat_reward = mysql_fetch_array(mysql_query("select `reward_percent`, `reward_amount` from `soft_product_category` where `category_id` = '$chk_procust[cat_id]'")); $proactpric = $_REQUEST['total_price'][$k] - (($_REQUEST['total_price'][$k] * $_REQUEST['disc_per'])/100); if($chk_cat_reward['reward_percent'] > 0){ $rewardpointern = intval($proactpric * $chk_cat_reward['reward_percent'] / 100) * $chk_cat_reward['reward_amount']; $reward_point = $reward_point + $rewardpointern; } } } } foreach($_REQUEST['pay_amt'] as $key => $value) { if($value > 0) { mysql_query("INSERT INTO `soft_sale_pay_details` SET `sale_id` = '$sale_id', `cust_id` = '$cust_id', `pay_date` = '$invoice_date', `pay_amt` = '$value', `pay_method` = '".$_REQUEST['pay_method'][$key]."', `tran_id` = '".$_REQUEST['tran_id'][$key]."', `receipt_no` = '$invoice_no'"); if($_REQUEST['pay_method'][$key] == "R") { $custmid = mysql_fetch_array(mysql_query("select `gift_point_redem` from `soft_customer` where `cust_id` = '$cust_id'")); $gift_point_redem = $custmid['gift_point_redem'] + $value; mysql_query("update `soft_customer` set `gift_point_redem` = '$gift_point_redem' where `cust_id` = '$cust_id'"); $gift_point_redeemed = $value; } if($_REQUEST['pay_method'][$key] == "SR") { mysql_query("update `soft_sale_return` set `status` = 'Y' where `return_no` = '".$_REQUEST['tran_id'][$key]."'"); } } } if($_REQUEST['gift_point_add'] == "Y") { $custmid = mysql_fetch_array(mysql_query("select `gift_point` from `soft_customer` where `cust_id` = '$cust_id'")); $totreward = $reward_point; $gift_point = intval($totreward + $custmid['gift_point'] - $gift_point_redeemed); mysql_query("update `soft_customer` set `gift_point` = '$gift_point' where `cust_id` = '$cust_id'"); if($totreward > 0) { mysql_query("INSERT INTO `soft_gift_details` SET `cust_id` = '$cust_id', `sale_id` = '$sale_id', `gift_point_earned` = '$totreward', `gift_point_redeemed` = '$gift_point_redeemed', `trun_date` = '$invoice_date'"); } } if($query_sms['retail_sale_sms_status'] == "Y"){ $query_msg = mysql_fetch_array(mysql_query("select * from `soft_sms_content` where `sms_type` = '1'")); $custmid = mysql_fetch_array(mysql_query("select `gift_point` from `soft_customer` where `cust_id` = '$cust_id'")); $array_rep = array('0' => '|#VAL1|','2' => '|#VAL2|','3' => '|#VAL3|','4' => '|#VAL4|'); $array_cur = array('0' => $_REQUEST['cust_name'],'2' => $invoice_no,'3' => $_REQUEST['net_price'],'4' => $custmid['gift_point']); //$mobile_no = substr(trim($_REQUEST['cust_mobile']), -10, 10); $MsgeTxt = str_replace($array_rep,$array_cur,$query_msg['sms_content']); $phone=$_REQUEST['cust_fax'].$_REQUEST['cust_mobile']; /*$VAL1=$_REQUEST['cust_name']; $VAL2=$_POST['slipno']; $VAL3=$_REQUEST['net_price']; $VAL4=$custmid['gift_point']; $phone=$_REQUEST['cust_fax'].$_REQUEST['cust_mobile'];*/ //$MsgeTxt=$message; if($_POST['notify_sms']=='yes') { //------- SMS Code Start----------------- //Please Enter Your Details $user="RANGOTSAV"; //your username $password="rangotsav01"; //your password $mobilenumbers=$phone; //enter Mobile numbers comma seperated $message = $MsgeTxt; //enter Your Message //$message = $_GET["message"]; //enter Your Message $senderid="SMSCountry"; //Your senderid $messagetype="N"; //Type Of Your Message $DReports="Y"; //Delivery Reports //$url="http://www.smscountry.com/SMSCwebservice_Bulk.aspx"; $url="http://sms.bulkssms.com/submitsms.jsp"; $message = urlencode($message); $ch = curl_init(); if (!$ch){die("Couldn't initialize a cURL handle");} $ret = curl_setopt($ch, CURLOPT_URL,$url); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); //curl_setopt ($ch, CURLOPT_POSTFIELDS,"User=$user&passwd=$password&mobilenumber=$mobilenumbers&message=$message&sid=$senderid&mtype=$messagetype&DR=$DReports"); curl_setopt ($ch, CURLOPT_POSTFIELDS,"user=RNGTSV&key=6f1c99c89bXX&mobile=$mobilenumbers&message=$message&senderid=INFOSM&accusage=1"); $ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //If you are behind proxy then please uncomment below line and provide your proxy ip with port. // $ret = curl_setopt($ch, CURLOPT_PROXY, "PROXY IP ADDRESS:PORT"); $curlresponse = curl_exec($ch); // execute if(curl_errno($ch)) echo 'curl error : '. curl_error($ch); if (empty($ret)) { // some kind of an error happened die(curl_error($ch)); curl_close($ch); // close cURL handler } else { $info = curl_getinfo($ch); curl_close($ch); // close cURL handler //echo ""; //echo $curlresponse; //echo "Message Sent Succesfully" ; } } //------------------------------------ if($_POST['notify_mail']=='yes') { $message = $MsgeTxt; $subject = "Order Details"; $headers = "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\n"; $headers.= 'From:<'.$emailTo.'>' . "\r\n" . 'Reply-To:<'.$emailTo.'>' . 'NoReply'; mail($emailTo, $subject,$message, $headers); //mail('mrinmay.vts@gmail.com', $subject,$message, $headers); } } if($_REQUEST['category2']=='Yes') { if($query_sms['promotional_sms_status'] == "Y"){ $query_msg = mysql_fetch_array(mysql_query("select * from `soft_sms_content` where `sms_type` = '6'")); $custmid = mysql_fetch_array(mysql_query("select `gift_point` from `soft_customer` where `cust_id` = '$cust_id'")); $array_rep = array('0' => '|#VAL1|','2' => '|#VAL2|','3' => '|#VAL3|','4' => '|#VAL4|'); $array_cur = array('0' => $_REQUEST['cust_name'],'2' => $invoice_no,'3' => $_REQUEST['net_price'],'4' => $custmid['gift_point']); //$mobile_no = substr(trim($_REQUEST['cust_mobile']), -10, 10); $phone=$_REQUEST['cust_fax'].$_REQUEST['cust_mobile']; $MsgeTxt = str_replace($array_rep,$array_cur,$query_msg['sms_content']); if($_POST['notify_sms']=='yes') { //------- SMS Code Start----------------- //Please Enter Your Details $user="RANGOTSAV"; //your username $password="rangotsav01"; //your password $mobilenumbers=$phone; //enter Mobile numbers comma seperated $message = $MsgeTxt; //enter Your Message //$message = $_GET["message"]; //enter Your Message $senderid="SMSCountry"; //Your senderid $messagetype="N"; //Type Of Your Message $DReports="Y"; //Delivery Reports //$url="http://www.smscountry.com/SMSCwebservice_Bulk.aspx"; $url="http://sms.bulkssms.com/submitsms.jsp"; $message = urlencode($message); $ch = curl_init(); if (!$ch){die("Couldn't initialize a cURL handle");} $ret = curl_setopt($ch, CURLOPT_URL,$url); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); //curl_setopt ($ch, CURLOPT_POSTFIELDS,"User=$user&passwd=$password&mobilenumber=$mobilenumbers&message=$message&sid=$senderid&mtype=$messagetype&DR=$DReports"); curl_setopt ($ch, CURLOPT_POSTFIELDS,"user=RNGTSV&key=6f1c99c89bXX&mobile=$mobilenumbers&message=$message&senderid=INFOSM&accusage=1"); $ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //If you are behind proxy then please uncomment below line and provide your proxy ip with port. // $ret = curl_setopt($ch, CURLOPT_PROXY, "PROXY IP ADDRESS:PORT"); $curlresponse = curl_exec($ch); // execute if(curl_errno($ch)) echo 'curl error : '. curl_error($ch); if (empty($ret)) { // some kind of an error happened die(curl_error($ch)); curl_close($ch); // close cURL handler } else { $info = curl_getinfo($ch); curl_close($ch); // close cURL handler //echo ""; //echo $curlresponse; //echo "Message Sent Succesfully" ; } } //------------------------------------ if($_POST['notify_mail']=='yes') { $message = $MsgeTxt; $subject = "Order Details"; $headers = "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\n"; $headers.= 'From:<'.$emailTo.'>' . "\r\n" . 'Reply-To:<'.$emailTo.'>' . 'NoReply'; mail($emailTo, $subject,$message, $headers); //mail('mrinmay.vts@gmail.com', $subject,$message, $headers); } } } echo "<script>window.open('print_invoice.php?invno=$sale_id','PrintInvoice','width=750,height=900,scrollbars=1,menubar=1,resizable=1')</script>"; } if($_REQUEST['flag'] == "2"){ $purno = mysql_fetch_array(mysql_query("select `sl_no` from `invoice_sl` where `type` = 'F' order by `sl_id` desc limit 1")); $purchaseno = sprintf("%06d",($purno['sl_no'] + 1)); $slip_no = $purchaseno; mysql_query("insert into `invoice_sl` SET `sl_no` = '$slip_no', `type` = 'F'"); $sale = mysql_fetch_array(mysql_query("select `cust_id`, `invoice_date` from `soft_sale` where `sale_id` = '$_REQUEST[sale_id]'")); mysql_query("INSERT INTO `soft_sale_fall` SET `sale_id` = '$_REQUEST[sale_id]', `no_of_saree` = '$_REQUEST[no_of_saree]', `picco_desc` = '$_REQUEST[picco_desc]', `fall_picco` = '$_REQUEST[fall_picco]', `polish` = '$_REQUEST[polish]', `packing` = '$_REQUEST[packing]', `wash_polish` = '$_REQUEST[wash_polish]', `delivery_status` = '$_REQUEST[delivery_status]', `delivery_date` = '$_REQUEST[delivery_date]', `dev_add` = '$_REQUEST[dev_add]', `slip_no` = '$slip_no', `cust_id` = '$sale[cust_id]', `recv_date` = '$sale[invoice_date]'"); $fall_picco_id = mysql_insert_id(); $slip_no = sprintf("%06d",($fall_picco_id)); mysql_query("update `soft_sale_fall` set `slip_no` = '".$slip_no."' where `fall_picco_id` = '".$fall_picco_id."'"); echo "<script>location.href='add_sales.php?msg=1&invno=$_REQUEST[sale_id]'</script>"; } ?> <script language="javascript" type="text/javascript"> $(document).keypress(function(e) { if(e.which == 13) { e.preventDefault(); } }); function chk_customer() { if($('#cust_mobile').val() == "") { alert("Please insert customer mobile No"); $('#cust_mobile').focus(); } else if(isNaN($('#cust_mobile').val())) { alert("Customer mobile No should be numeric"); $('#cust_mobile').focus(); } else if($('#cust_mobile').val().length != 10) { alert("Customer mobile No should be of 10 digit"); $('#cust_mobile').focus(); } else { $('#load_wait_sup').show(); $.post("load_customer.php", { mobile : $('#cust_mobile').val()}, function(data) { var brokenstring = data.split('@||@'); if(brokenstring[0] > 0) { var brost = brokenstring[1].split('||'); $('#sex'+brost[0]).attr('checked','checked'); $('#cust_name').val(brost[1]); $('#cust_add').val(brost[2]); $('#cust_ph').val(brost[3]); $('#cust_email').val(brost[4]); $('#cust_fax').val(brost[5]); $('#cust_id').val(brost[6]); $('#disc_per').val(brost[7]); $('#reward').val(brost[8]); $('#cust_dob').val(brost[9]); $('#rewardpoint').val(brost[10]); $('#category2'+brost[11]).attr('checked','checked'); $("input").removeAttr('disabled',''); $("input[name=sex]:radio").attr('disabled','disabled'); $("#cust_name").attr('readonly','readonly'); $("#cust_add").removeAttr('disabled',''); $("#cust_ph").attr('readonly','readonly'); $("#cust_fax").attr('readonly','readonly'); $("#cust_email").attr('readonly','readonly'); $("#cust_dob").attr('readonly','readonly'); $("#load_cust").removeAttr('disabled',''); $("#cust_mobile").removeAttr('disabled',''); $("#discount_remarks").removeAttr('disabled',''); $("#add_new").show(); $('#emp_code').focus(); } else { var r=confirm("Sorry! We cant find any customer with this mobile no. Please add customer"); if (r==true) { $("input").removeAttr('disabled',''); $("#add,#product_details1").removeAttr("disabled",""); $("#cust_add").removeAttr('disabled',''); $("#discount_remarks").removeAttr('disabled',''); $("#add_new").show(); $('#cust_name').focus(); } } $('#load_wait_sup').hide(); }); } } function chk_product(id) { var proid = $('#product_code'+id).val().replace(/-/gi,"0"); $('#product_code'+id).val(proid); var productcodechk = new Array(); var chkvalpresent = 0; $("input[name='product_code[]']").each(function() { if (!isNaN(this.value) && this.value.length != 0) { if(productcodechk.indexOf( this.value ) > -1 ){ chkvalpresent = 1; }else{ productcodechk.push(this.value); } } }); if(chkvalpresent == 0){ if($('#product_code'+id).val() != "") { $.post("load_product.php", { product_code : $('#product_code'+id).val()}, function(data) { var brokenstring = data.split('@||@'); if(brokenstring[0] > 0) { var brost = brokenstring[1].split('||'); $('#pro_details'+id).html(brost[0]); $('#color'+id).html(brost[1]); $('#size'+id).html(brost[2]); $('#style'+id).html(brost[3]); $('#pro_price'+id).html(brost[4]+"&nbsp;&nbsp;"); $('#pro_disc'+id).html(brost[5]); $('#product_id'+id).val(brost[6]); $('#price'+id).val(brost[4]); $('#disc'+id).val(brost[5]); $('#pro_qty'+id).html('1'); $('#qty'+id).val('1'); if($('#coupon_type').val() == "AMT"){ cal('s'); }else{ cal('p'); } addElement(); } else { alert("Sorry! No product found with this code. Please insert correctly"); $('#product_code'+id).val(''); } }); } }else{ alert('Sorry! You have already added this product in this invoice'); $('#product_code'+id).val(''); } } function addElement() { var sl = 0; var ni = document.getElementById('myDiv'); var numi = $('.theValue'); var num = ($('.theValue').val() -1)+ 2; numi.val(num); var newdiv = document.createElement('div'); var divIdName = 'my'+num+'Div'; newdiv.setAttribute('id',divIdName); sl = parseInt(num) + 1; //newdiv.innerHTML = 'Element Number '+num+' has been added! <a href=\'#\' onclick=\'removeElement('+divIdName+')\'>Remove the div "'+divIdName+'"</a>'; newdiv.innerHTML ='<table width="100%" border="0" cellspacing="0" cellpadding="0" class="theValue" style="border:#333333 1px solid; border-top:0;"><tr><td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:140px;"><input name="product_code[]" id="product_code'+sl+'" type="text" style="width:100px;" onblur="chk_product('+sl+')" /><input name="product_id[]" id="product_id'+sl+'" type="hidden" /><input name="price[]" id="price'+sl+'" type="hidden" /><input name="disc[]" id="disc'+sl+'" type="hidden" /><input name="qty[]" class="qty" id="qty'+sl+'" type="hidden" style="width:60px;" value="0"/></td><td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:190px;" id="pro_details'+sl+'">&nbsp;</td><td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:110px;" id="color'+sl+'">&nbsp;</td><td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:110px;" id="size'+sl+'">&nbsp;</td><td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:140px;" id="style'+sl+'">&nbsp;</td><td height="30" align="right" valign="middle" style="border-right:#333333 1px solid; width:110px;" id="pro_price'+sl+'">&nbsp;</td><td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:80px;" id="pro_disc'+sl+'">&nbsp;</td><td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:80px;" id="pro_qty'+sl+'">&nbsp;</td><td height="30" align="right" valign="middle" style="width:110px;"><input name="total_price[]" id="total_price'+sl+'" type="text" style="width:100px; text-align:right" readonly="readonly" />&nbsp;&nbsp;</td><td height="30" align="center" valign="middle" style="width:15px;"><img src="images/cross.gif" onclick="removeElement('+num+')" width="15"></td></tr></table>'; ni.appendChild(newdiv); $('#product_code'+sl).focus(); var tot_quanty = 0; $(".qty").each(function() { if (!isNaN(this.value) && this.value.length != 0) { tot_quanty += parseFloat(this.value); } $('#tot_quanty').html('No of Sarees : '+tot_quanty); }); } function removeElement(num) { $('#my'+num+'Div').remove(); cal('p'); var tot_quanty = 0; $(".qty").each(function() { if (!isNaN(this.value) && this.value.length != 0) { tot_quanty += parseFloat(this.value); } $('#tot_quanty').html('No of Sarees : '+tot_quanty); }); } function cal(kaus) { var a = 0; var num = ($('.theValue').val() -1)+ 2; a = parseInt(num) + 1; var price = 0; var qty = 0; var disc = 0; var total_price = 0; var total_sale_price = 0; var disc_per = 0; var disc_amt = 0; var net_price = 0; var ex_charges = 0; var i =1; for(i = 1; i<=a; i++) { if(parseFloat($('#price'+i).val()) > 0){ price = parseFloat($('#price'+i).val()); }else{ price = 0; } if(parseFloat($('#disc'+i).val()) > 0){ disc = parseFloat($('#disc'+i).val()); }else{ disc = 0; } if(parseFloat($('#qty'+i).val()) > 0){ qty = parseFloat($('#qty'+i).val()); }else{ qty = 0; } total_price = (parseFloat(price) - (parseFloat(price) * parseFloat(disc) / 100)) * parseFloat(qty); $('#total_price'+i).val(parseFloat(total_price)); total_sale_price = parseFloat(total_sale_price) + parseFloat(total_price); } if(kaus == 'p') { if(parseFloat($('#disc_per').val()) > 0){ disc_per = parseFloat($('#disc_per').val()); }else{ disc_per = 0; } disc_amt = parseFloat(total_sale_price) * parseFloat(disc_per) / 100; $('#disc_amt').val(parseFloat(disc_amt).toFixed(2)); } else if(kaus == 's') { if(parseFloat($('#disc_amt').val()) > 0){ disc_amt = parseFloat($('#disc_amt').val()); }else{ disc_amt = 0; } if(parseFloat(total_sale_price) > 0){ disc_per = (parseFloat(disc_amt) / parseFloat(total_sale_price)) * 100; }else{ disc_per = 0; } $('#disc_per').val(parseFloat(disc_per).toFixed(2)); } if(parseFloat($('#ex_charges').val()) > 0){ ex_charges = parseFloat($('#ex_charges').val()); }else{ ex_charges = 0; } /*if(parseFloat($('#tax_per').val()) > 0){ tax_per = parseFloat($('#tax_per').val()); }else{ tax_per = 0; }*/ //tax = parseFloat(net_sale_price) * parseFloat(tax_per) / 100; net_price = ((parseFloat(total_sale_price) + parseFloat(ex_charges)) - parseFloat(disc_amt)); $('#total_sale_price').val(parseFloat(total_sale_price).toFixed(2)); //$('#disc_amt').val(parseFloat(disc_amt).toFixed(2)); //$('#tax').val(parseFloat(tax).toFixed(2)); $('#net_price').val(parseFloat(net_price).toFixed(2)); //$('#pay_amtch').val(parseFloat(net_price).toFixed(2)); cal_pay(); } function cal_pay() { var net_price = 0; var paid_amt = 0; var due_amt = 0; if(parseFloat($('#net_price').val()) > 0){ net_price = parseFloat($('#net_price').val()); }else{ net_price = 0; } $(".pay_amt").each(function() { if (!isNaN(this.value) && this.value.length != 0) { paid_amt += parseFloat(this.value); } }); due_amt = parseFloat(net_price) - parseFloat(paid_amt); $('#due_amt').val(parseFloat(due_amt).toFixed(2)); $('#paid_amt').val(parseFloat(paid_amt).toFixed(2)); if(parseFloat(paid_amt) > parseFloat(net_price)) { alert("Please check payment amount correctly"); return false; } } function chk_return() { $.post("load_return.php", { sale_return_no : $('#sale_return_no').val()}, function(data) { $('#sale_return_value').val(parseFloat(data)); cal_pay(); }); } function chk_blankform() { //chk_promo(); //chk_promo_code(); if($('#cust_mobile').val() == "") { alert("Please insert customer mobile No"); $('#cust_mobile').focus(); return false; } if(isNaN($('#cust_mobile').val())) { alert("Customer mobile No should be numeric"); $('#cust_mobile').focus(); return false; } if($('#emp_code').val() == "") { alert("Please insert agent name"); $('#emp_code').focus(); return false; } /*if($('#cust_dob').val() == "") { alert("Please insert customer date of birth"); $('#cust_dob').focus(); return false; }*/ if(parseFloat($('#rewardpay').val()) > parseFloat($('#rewardpoint').val())) { alert("Sorry you dont have so much reward point to redeemed"); $('#rewardpay').focus(); return false; } if(parseFloat($('#net_price').val()) == 0) { alert("Please check amount correctly"); $('#net_price').focus(); return false; } if(parseFloat($('#paid_amt').val()) > parseFloat($('#net_price').val())) { alert("Please check payment amount correctly"); $('#paid_amt').focus(); return false; } } function chk_promo() { var disc_per = 0; $.post("load_promo.php", { promo_code : $('#gift_voucher_code').val(), cust_mobile : $('#cust_mobile').val(), total_sale_price : $('#total_sale_price').val()}, function(data) { var brokenstring = data.split('@||@'); if(brokenstring[0] > 0){ if(brokenstring[1] == "AMT"){ $('#disc_amt').val(parseFloat(brokenstring[2])); $('#coupon_type').val(brokenstring[1]); cal('s'); }else{ $('#disc_per').val(parseFloat(brokenstring[2])); $('#coupon_type').val(brokenstring[1]); cal('p'); } $('#promo_code').val(''); }else{ if(brokenstring[1] == 0 ){ alert(brokenstring[3]); /*$('#disc_amt').val(parseFloat(brokenstring[2])); $('#disc_per').val(parseFloat(brokenstring[2]));*/ $('#coupon_type').val(''); $('#gift_voucher_code').val(''); return false; }else{ /*alert(brokenstring[3]); $('#disc_amt').val(parseFloat(brokenstring[2])); $('#disc_per').val(parseFloat(brokenstring[2]));*/ $('#coupon_type').val(''); $('#gift_voucher_code').val(''); return false; } } }); } function chk_promo_code() { var disc_per = 0; $.post("load_promo_code.php", { promo_code : $('#promo_code').val(), total_sale_price : $('#total_sale_price').val()}, function(data) { var brokenstring = data.split('@||@'); if(brokenstring[0] > 0){ if(brokenstring[1] == "AMT"){ $('#disc_amt').val(parseFloat(brokenstring[2])); $('#coupon_type').val(brokenstring[1]); cal('s'); }else{ $('#disc_per').val(parseFloat(brokenstring[2])); $('#coupon_type').val(brokenstring[1]); cal('p'); } $('#gift_voucher_code').val(''); }else{ if(brokenstring[1] == 0 ){ alert(brokenstring[3]); $('#promo_code').val(''); }else{ //alert(brokenstring[3]); $('#promo_code').val(''); } } }); } </script> <?php $show=mysql_fetch_array(mysql_query("select * from `soft_purchase` where purchase_id = '$_REQUEST[edit_id]'")); ?> <div class="section"> <div class="title_wrapper"> <h2>Manage Sales</h2> <span class="title_wrapper_left"></span> <span class="title_wrapper_right"></span> </div> <div class="section_content"> <!--[if !IE]>start section content top<![endif]--> <div class="sct"> <div class="sct_left"> <div class="sct_right"> <div class="sct_left"> <div class="sct_right"> <?php if($_REQUEST['msg'] == "2") { $sale = mysql_fetch_array(mysql_query("select * from `soft_sale` where `sale_id` = '$_REQUEST[invno]'")); $cust = mysql_fetch_array(mysql_query("select * from `soft_customer` where `cust_id` = '$sale[cust_id]'")); $emp = mysql_fetch_array(mysql_query("select * from `emp` where `emp_id` = '$sale[emp_id]'")); ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" class="search_form general_form" method="post" enctype="multipart/form-data"> <input type="hidden" name="sale_id" value="<?php echo $sale['sale_id']; ?>"/> <input type="hidden" name="flag" value="2"/> <fieldset> <div class="forms"> <div class="row" style="background:#888888; padding:5px; color:#FFFFFF; margin-bottom:10px;"> <strong>Fall Picco Slip</strong> </div> <div class="row"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="6%" height="30" align="left" valign="top">Invoice Date</th> <td width="8%" height="30" align="left" valign="top">&nbsp;<?php echo date('d M, Y',$sale['invoice_date']); ?></td> <th width="7%" height="30" align="left" valign="top">Invoice No</th> <td width="11%" height="30" align="left" valign="top">&nbsp;<?php echo $sale['invoice_no']; ?></td> <th width="4%" height="30" align="left" valign="top">Agent</th> <td width="11%" height="30" align="left" valign="top">&nbsp;<?php echo $emp['emp_code']." - ".ucwords(strtolower($emp['emp_name'])); ?></td> <th width="11%" height="30" align="left" valign="top">Promotion Code</th> <td width="13%" height="30" align="left" valign="top">&nbsp;<?php echo trim(strtoupper($sale['promo_code'])); ?></td> <th width="12%" height="30" align="left" valign="top">Gift Voucher Code</th> <td width="17%" height="30" align="left" valign="top">&nbsp;<?php echo $sale['gift_voucher_code']; ?></td> </tr> </table> </div> <div class="row" style="background:#888888; padding:5px; color:#FFFFFF; margin-bottom:10px;"> <strong>Customer Details</strong> </div> <div class="row"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="8%" height="30" align="left" valign="top">Mobile No</th> <td width="24%" height="30" align="left" valign="top">&nbsp; <?php echo $cust['cust_mobile'];?></td> <th width="11%" height="30" align="left" valign="top">Customer Name</th> <td width="19%" height="30" align="left" valign="top">&nbsp;<?php if($cust['sex']=="M"){echo "Mr.";}elseif($cust['sex']=="F"){echo "Mrs.";}else{echo "Ms.";}?>&nbsp;<?php echo ucwords(strtolower($cust['cust_name']));?></td> <th height="30" align="left" valign="top" colspan="2">&nbsp;</th> </tr> <tr> <th height="30" align="left" valign="top">Address</th> <td height="30" rowspan="2" align="left" valign="top">&nbsp;<?php echo ucwords(strtolower($cust['cust_add']));?></td> <th height="30" align="left" valign="top">Ph No</th> <td height="30" align="left" valign="top">&nbsp;<?php echo $cust['cust_ph'];?></td> <th width="8%" height="30" align="left" valign="top">Country Code</th> <td width="30%" height="30" align="left" valign="top">&nbsp;<?php echo $cust['cust_fax'];?></td> </tr> <tr> <th height="30" align="left" valign="top">&nbsp;</th> <th height="30" align="left" valign="top">Email</th> <td height="30" align="left" valign="top">&nbsp;<?php echo $cust['cust_email'];?></th> <th height="30" align="left" valign="top">DOB</th> <td height="30" align="left" valign="top">&nbsp;<?php if($cust['cust_dob'] != ""){echo date('d M, Y',$cust['cust_dob']);}?></td> </tr> </table> </div> <div class="row"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th height="30" align="left" valign="top">Slip No</th> <td height="30" align="left" valign="top">&nbsp;<?php //$purno = mysql_fetch_array(mysql_query("select `sl_no` from `invoice_sl` where `type` = 'F' order by `sl_id` desc limit 1")); $purno = mysql_fetch_array(mysql_query("select `fall_picco_id` from `soft_sale_fall` where 1 order by `fall_picco_id` desc limit 1")); $purchaseno = sprintf("%06d",($purno['fall_picco_id'] + 1)); ?> <input type="text" class="text" name="slip_no" id="slip_no" value="<?php echo $purchaseno; ?>" style="width:200px;" readonly="readonly"/></td> </tr> </table> </div> <div class="row"> <?php $nos = mysql_fetch_array(mysql_query("select count(*) as num from `soft_sale_details` where `sale_id` = '$sale[sale_id]'")); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:#000000 1px solid;"> <tr> <th width="20%" height="25" align="left" valign="middle">&nbsp;&nbsp;Quantity</th> <th width="19%" height="25" align="left" valign="middle">Description</th> <th width="11%" height="25" align="left" valign="middle">&nbsp;</th> <th width="12%" height="25" align="left" valign="middle">&nbsp;</th> <th width="14%" height="25" align="left" valign="middle">Delivery Status</th> <th width="24%" height="25" align="left" valign="middle">Delivery Date</th> </tr> <tr> <td align="left" valign="middle">&nbsp;&nbsp; <input name="no_of_saree" id="no_of_saree" type="text" style="width:200px;" value="<?php echo $nos['num'] ?>"/></td> <td align="left" valign="middle"><textarea name="picco_desc" cols="30" rows="2"></textarea></td> <td align="left" valign="middle"><input name="fall_picco" type="checkbox" value="Y" />&nbsp;Fall Picco<br /> <input name="polish" type="checkbox" value="Y" />&nbsp;Polish</td> <td align="left" valign="middle"><input name="packing" type="checkbox" value="Y" />&nbsp;Packing<br /> <input name="wash_polish" type="checkbox" value="Y" />&nbsp;Wash Polish</td> <td align="left" valign="middle"><input name="delivery_status" type="radio" value="U" />&nbsp;Urgent<br /> <input name="delivery_status" type="radio" value="H" />&nbsp;Hand Delivery</td> <td align="left" valign="middle"><input name="delivery_date" id="delivery_date" type="text" style="width:200px;" value="<?php echo date('d-m-Y',strtotime(date('d-m-Y').' + 3 days')); ?>"/></td> </tr> <tr> <th width="20%" height="25" align="left" valign="middle">&nbsp;&nbsp;Delivery Address</th> <td align="left" valign="middle" colspan="5"><textarea name="dev_add" id="dev_add" rows="3" style="width:200px;"></textarea></td> </tr> </table> </div> <div class="row"> <div class="buttons"> <ul style="list-style-type:none;"> <?php if($_REQUEST['flag'] == "2") { ?> <li><img src="images/loader.gif" /></li> <?php } else { ?> <li><span class="button send_form_btn"><span><span>SAVE & PRINT</span></span> <input name="" type="submit" /></span></li> <?php } ?> <li><span class="button cancel_btn"><span><span>CANCEL</span></span> <input name="" type="button" onclick="location.href='add_sales.php?msg=1&invno=<?php echo $sale[sale_id];?>'"/></span></li> </ul> </div> </div> </div> </fieldset> </form> <?php } elseif($_REQUEST['msg'] == "1") { $sale = mysql_fetch_array(mysql_query("select * from `soft_sale` where `sale_id` = '$_REQUEST[invno]'")); $cust = mysql_fetch_array(mysql_query("select * from `soft_customer` where `cust_id` = '$sale[cust_id]'")); $emp = mysql_fetch_array(mysql_query("select * from `emp` where `emp_id` = '$sale[emp_id]'")); ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" class="search_form general_form" method="post" enctype="multipart/form-data"> <fieldset> <div class="forms"> <div class="row"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="6%" height="30" align="left" valign="top">Invoice Date</th> <td width="8%" height="30" align="left" valign="top">&nbsp;<?php echo date('d M, Y',$sale['invoice_date']); ?></td> <th width="7%" height="30" align="left" valign="top">Invoice No</th> <td width="11%" height="30" align="left" valign="top">&nbsp;<?php echo $sale['invoice_no']; ?></td> <th width="4%" height="30" align="left" valign="top">Agent</th> <td width="11%" height="30" align="left" valign="top">&nbsp;<?php echo $emp['emp_code']." - ".ucwords(strtolower($emp['emp_name'])); ?></td> <th width="11%" height="30" align="left" valign="top">Promotion Code</th> <td width="13%" height="30" align="left" valign="top">&nbsp;<?php echo trim(strtoupper($sale['promo_code'])); ?></td> <th width="12%" height="30" align="left" valign="top">Gift Voucher Code</th> <td width="17%" height="30" align="left" valign="top">&nbsp;<?php echo trim(strtoupper($sale['gift_voucher_code'])); ?></td> </tr> </table> </div> <div class="row" style="background:#888888; padding:5px; color:#FFFFFF; margin-bottom:10px;"> <strong>Customer Details</strong> </div> <div class="row"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="8%" height="30" align="left" valign="top">Mobile No</th> <td width="24%" height="30" align="left" valign="top">&nbsp; <?php echo $cust['cust_mobile'];?></td> <th width="11%" height="30" align="left" valign="top">Customer Name</th> <td width="19%" height="30" align="left" valign="top">&nbsp;<?php if($cust['sex']=="M"){echo "Mr.";}elseif($cust['sex']=="F"){echo "Mrs.";}else{echo "Ms.";}?>&nbsp;<?php echo ucwords(strtolower($cust['cust_name']));?></td> <th height="30" align="left" valign="top" colspan="2">&nbsp;</td> </tr> <tr> <th height="30" align="left" valign="top">Address</th> <td height="30" rowspan="2" align="left" valign="top">&nbsp;<?php echo ucwords(strtolower($cust['cust_add']));?></td> <th height="30" align="left" valign="top">Ph No</th> <td height="30" align="left" valign="top">&nbsp;<?php echo $cust['cust_ph'];?></td> <th width="8%" height="30" align="left" valign="top">Country Code</th> <td width="30%" height="30" align="left" valign="top">&nbsp;<?php echo $cust['cust_fax'];?></td> </tr> <tr> <th height="30" align="left" valign="top">&nbsp;</th> <th height="30" align="left" valign="top">Email</th> <td height="30" align="left" valign="top">&nbsp;<?php echo $cust['cust_email'];?></td> <th height="30" align="left" valign="top">DOB</th> <td height="30" align="left" valign="top">&nbsp;<?php if($cust['cust_dob'] != ""){echo date('d M, Y',$cust['cust_dob']);}?></td> </tr> </table> </div> <div class="row" style="background:#888888; padding:5px; color:#FFFFFF; margin-bottom:10px;"> <strong>Product Details</strong> </div> <div class="row"> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:#333333 1px solid"> <tr style="background:#CCCCCC; "> <th style="border-right:#333333 1px solid; width:50px;">Sl No.</th> <th style="border-right:#333333 1px solid; width:140px;">Code</th> <th style="border-right:#333333 1px solid; width:190px;">Details</th> <th style="border-right:#333333 1px solid; width:110px;">Color</th> <th style="border-right:#333333 1px solid; width:110px;">Category</th> <th style="border-right:#333333 1px solid; width:140px;">Style</th> <th style="border-right:#333333 1px solid; width:110px;">Price (per/unit)</th> <th style="border-right:#333333 1px solid; width:80px;">Discount (%)</th> <th style="border-right:#333333 1px solid; width:80px;">Qty.</td> <th style="width:110px;">Total Price</th> </tr> <?php $count = 1; $sql_product = mysql_query("select * from `soft_sale_details` where `sale_id` = '$sale[sale_id]' order by `details_id`"); while($row_product = mysql_fetch_array($sql_product)) { $product = mysql_fetch_array(mysql_query("select * from `soft_product_details` where `product_id` = '$row_product[product_id]'")); $cat = mysql_fetch_array(mysql_query("select * from `soft_product_category` where `category_id` = '$product[cat_id]'")); ?> <tr> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; border-top:#333333 1px solid; width:50px;"><strong><?php echo $count; ?>.</strong></td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; border-top:#333333 1px solid; width:140px;"><?php echo $product['product_code']; ?></td> <td height="30" align="left" valign="middle" style="border-right:#333333 1px solid; border-top:#333333 1px solid; width:190px;">&nbsp;<?php echo $product['details']; ?></td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; border-top:#333333 1px solid; width:110px;">&nbsp;<?php echo $product['color']; ?></td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; border-top:#333333 1px solid; width:110px;">&nbsp;<?php echo $cat['category_name']; ?></td> <td height="30" align="left" valign="middle" style="border-right:#333333 1px solid; border-top:#333333 1px solid; width:140px;">&nbsp;<?php echo $product['style']; ?></td> <td height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-top:#333333 1px solid; width:110px;"><?php echo sprintf("%01.2f",$row_product['price']); ?>&nbsp;&nbsp;</td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; border-top:#333333 1px solid; width:80px;">&nbsp;<?php echo $row_product['disc'] ?></td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; border-top:#333333 1px solid; width:80px;">&nbsp;<?php echo $row_product['qty'] ?></td> <td height="30" align="right" valign="middle" style="width:110px; border-top:#333333 1px solid;"><?php echo sprintf("%01.2f",$row_product['total_price']); ?>&nbsp;&nbsp;</td> </tr> <?php $count++; } ?> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="theValue" style="border:#333333 1px solid; border-top:0;"> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong>Total Sale Price.</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><?php echo sprintf("%01.2f",$sale['total_sale_price']); ?>&nbsp;&nbsp;</td> </tr> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong>Discount (%).</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><?php echo $sale['disc_per']; ?>&nbsp;&nbsp;</td> </tr> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong><strong>Discount Amount</strong>.</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><?php echo sprintf("%01.2f",$sale['disc_amt']); ?>&nbsp;&nbsp;</td> </tr> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong>Extra Charges.</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><?php echo sprintf("%01.2f",$sale['ex_charges']); ?>&nbsp;&nbsp;</td> </tr> <?php /*?><tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong>Tax (%).</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><?php echo $sale['tax_per']; ?></td> </tr> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong>Total Tax.</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><?php echo sprintf("%01.2f",$sale['tax']); ?></td> </tr><?php */?> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong>Net .</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><?php echo sprintf("%01.2f",$sale['net_price']); ?>&nbsp;&nbsp;</td> </tr> <tr> <th width="87%" height="30" align="left" valign="middle" style="border-right:#333333 1px solid; padding-right:10px;" colspan="2"><strong>Remarks .</strong><?php echo stripslashes($sale['discount_remarks']); ?></td> </tr> </table> </div> <div class="row" style="background:#888888; padding:5px; color:#FFFFFF; margin-bottom:10px;"> <strong>Payment Details</strong> </div> <div class="row"> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:#000000 1px solid;"> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid;">&nbsp;&nbsp;Payment Mode</th> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid;">&nbsp;&nbsp;Payment Details</th> <th height="30" align="right" valign="middle">&nbsp;&nbsp;Payment Amount&nbsp;&nbsp;</th> </tr> <?php $payc = mysql_fetch_array(mysql_query("select * from `soft_sale_pay_details` where `sale_id` = '$sale[sale_id]' AND `pay_method` = 'C'")); ?> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp;<strong>Cash</strong></th> <td height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo $payc['tran_id']; ?></td> <td height="30" align="right" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo sprintf("%01.2f",$payc['pay_amt']); ?>&nbsp;&nbsp;</td> </tr> <?php $paycc = mysql_fetch_array(mysql_query("select * from `soft_sale_pay_details` where `sale_id` = '$sale[sale_id]' AND `pay_method` = 'CC'")); ?> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp;<strong>Card</strong></th> <td height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo $paycc['tran_id']; ?></td> <td height="30" align="right" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo sprintf("%01.2f",$paycc['pay_amt']); ?>&nbsp;&nbsp;</td> </tr> <?php $paych = mysql_fetch_array(mysql_query("select * from `soft_sale_pay_details` where `sale_id` = '$sale[sale_id]' AND `pay_method` = 'CH'")); ?> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp;<strong>Cheque</strong></th> <td height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo $paych['tran_id']; ?></td> <td height="30" align="right" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo sprintf("%01.2f",$paych['pay_amt']); ?>&nbsp;&nbsp;</td> </tr> <?php $payR = mysql_fetch_array(mysql_query("select * from `soft_sale_pay_details` where `sale_id` = '$sale[sale_id]' AND `pay_method` = 'R'")); ?> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp;<strong>Gift Point</strong></th> <td height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo $payR['tran_id']; ?></td> <td height="30" align="right" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo sprintf("%01.2f",$payR['pay_amt']); ?>&nbsp;&nbsp;</td> </tr> <?php $paySR = mysql_fetch_array(mysql_query("select * from `soft_sale_pay_details` where `sale_id` = '$sale[sale_id]' AND `pay_method` = 'SR'")); ?> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp;<strong>Sale Return</strong></th> <td height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo $paySR['tran_id']; ?></td> <td height="30" align="right" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo sprintf("%01.2f",$paySR['pay_amt']); ?>&nbsp;&nbsp;</td> </tr> <tr> <th height="30" colspan="2" align="right" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">Payment Due&nbsp;&nbsp;</th> <td height="30" align="right" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo sprintf("%01.2f",$sale['due_amt']); ?>&nbsp;&nbsp;</td> </tr> <tr> <th height="30" colspan="2" align="right" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">Total Amount&nbsp;&nbsp;</th> <td height="30" align="right" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp;<?php echo sprintf("%01.2f",$sale['paid_amt']); ?>&nbsp;&nbsp;</td> </tr> </table> </div> <?php $num_fall_picco = mysql_fetch_array(mysql_query("select count(*) as num from `soft_sale_fall` where `sale_id` = '$_REQUEST[invno]'")); if($num_fall_picco['num'] > 0) { ?> <div class="row" style="background:#888888; padding:5px; color:#FFFFFF; margin-bottom:10px;"> <strong>Fall Picco Slip</strong> </div> <div class="row"> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:#000000 1px solid;"> <tr> <th width="16%" height="25" align="left" valign="middle">&nbsp;&nbsp;No of Saree</th> <th width="18%" height="25" align="left" valign="middle">Description</th> <th width="10%" height="25" align="left" valign="middle">&nbsp;</th> <th width="9%" height="25" align="left" valign="middle">&nbsp;</th> <th width="17%" height="25" align="left" valign="middle">Delivery Status</th> <th width="30%" height="25" align="left" valign="middle">Delivery Date</th> </tr> <?php $fall_picco = mysql_fetch_array(mysql_query("select * from `soft_sale_fall` where `sale_id` = '$_REQUEST[invno]'")); ?> <tr> <td align="left" valign="middle">&nbsp;&nbsp;<?php echo $fall_picco['no_of_saree']; ?></td> <td align="left" valign="middle"><?php echo $fall_picco['picco_desc']; ?></td> <td align="left" valign="middle"><input name="fall_picco" <?php if($fall_picco['fall_picco'] == "Y"){?>checked="checked"<?php } ?> type="checkbox" value="Y" disabled="disabled" />&nbsp;Fall Picco<br /> <input name="polish" type="checkbox" value="Y" <?php if($fall_picco['polish'] == "Y"){?>checked="checked"<?php } ?> disabled="disabled" />&nbsp;Polish</td> <td align="left" valign="middle"><input name="packing" type="checkbox" value="Y" <?php if($fall_picco['packing'] == "Y"){?>checked="checked"<?php } ?> disabled="disabled"/>&nbsp;Packing<br /> <input name="wash_polish" type="checkbox" value="Y" <?php if($fall_picco['wash_polish'] == "Y"){?>checked="checked"<?php } ?> disabled="disabled" />&nbsp;Wash Polish</td> <td align="left" valign="middle"><input name="delivery_status" type="radio" value="U" <?php if($fall_picco['delivery_status'] == "U"){?>checked="checked"<?php } ?> disabled="disabled"/>&nbsp;Urgent<br /> <input name="delivery_status" type="radio" value="H" <?php if($fall_picco['delivery_status'] == "H"){?>checked="checked"<?php } ?> disabled="disabled"/>&nbsp;Hand Delivery</td> <td align="left" valign="middle"><?php echo $fall_picco['delivery_date']; ?></td> </tr> <tr> <th width="20%" height="25" align="left" valign="middle">&nbsp;&nbsp;Delivery Address</th> <td align="left" valign="middle" colspan="5"><?php echo $fall_picco['dev_add']; ?></td> </tr> </table> </div> <?php } ?> <div class="row"> <div class="buttons"> <ul style="list-style-type:none;"> <li><span class="button send_form_btn"><span><span>Print Invoice</span></span> <input name="" type="button" onclick="window.open('print_invoice.php?invno=<?php echo $_REQUEST['invno']; ?>','PrintInvoice','width=750,height=900,scrollbars=1,menubar=1,resizable=1');"/></span></li> <?php if($num_fall_picco['num'] > 0) { ?> <li><span class="button send_form_btn"><span><span>Print Fall-Picco Slip</span></span> <input name="" type="button" onclick="window.open('print_fall_picco.php?fall_picco_id=<?php echo $fall_picco['fall_picco_id']; ?>','PrintFall','width=750,height=900,scrollbars=1,menubar=1,resizable=1');"/></span></li> <?php } ?> <li><span class="button send_form_btn"><span><span>Add New Sale</span></span> <input name="" type="button" onclick="location.href='add_sales.php'"/></span></li> <li><span class="button send_form_btn"><span><span>View All Sale</span></span> <input name="" type="button" onclick="location.href='view_sale.php'"/></span></li> </ul> </div> </div> </div> </fieldset> </form> <?php } else { ?> <script language="javascript"> $(function() { $( "#purchase_date" ).datepicker({ changeMonth: true, changeYear: true, dateFormat: "dd-mm-yy" }); $( "#cust_dob" ).datepicker({ changeMonth: true, changeYear: true, dateFormat: "dd-mm-yy" }); $("input").attr('disabled','disabled'); $("#cust_add,#product_details1").attr("disabled","disabled"); $("#load_cust").removeAttr('disabled',''); $("#cust_mobile").removeAttr('disabled',''); }); </script> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" class="search_form general_form" method="post" enctype="multipart/form-data" onsubmit="return chk_blankform();"> <input type="hidden" name="sale_id" value="<?php echo $show['purchase_id']; ?>"/> <input type="hidden" name="flag" value="1"/> <fieldset> <div class="forms"> <div class="row" style="background:#888888; padding:5px; color:#FFFFFF; margin-bottom:10px;"> <strong>Customer Details</strong> </div> <div class="row"> <input type="hidden" name="cust_id" id="cust_id" value=""/> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th height="30" align="left" valign="top">Mobile No</th> <td height="30" align="left" valign="top">&nbsp; <div style="float:left"><input type="text" class="text" name="cust_mobile" id="cust_mobile" value="" maxlength="10" style="width:200px;" onblur="chk_customer()"/></div><div style="float:left; display:none;" id="load_wait_sup"><img src="images/loader.gif" alt="loader" /></div></td> <th height="30" align="left" valign="top" colspan="2"><input name="sex" id="sexM" type="radio" value="M" />&nbsp;Mr.&nbsp;&nbsp;<input name="sex" id="sexF" type="radio" value="F" />&nbsp;Mrs.&nbsp;&nbsp;<input name="sex" id="sexS" type="radio" value="S" checked/>&nbsp;Ms.</td> <th height="30" align="left" valign="top">Customer Name</th> <td height="30" align="left" valign="top">&nbsp; <input type="text" class="text" name="cust_name" id="cust_name" value="" style="width:200px;"/></td> </tr> <tr> <th height="30" align="left" valign="top">Address</th> <td height="30" rowspan="2" align="left" valign="top">&nbsp; <textarea name="cust_add" id="cust_add" rows="3" style="width:200px;"></textarea></td> <th height="30" align="left" valign="top">Ph No</th> <td height="30" align="left" valign="top">&nbsp; <input type="text" class="text" name="cust_ph" id="cust_ph" value="" style="width:200px;"/></td> <th height="30" align="left" valign="top">Country Code</th> <td height="30" align="left" valign="top">&nbsp; <!-- <input type="text" class="text" name="cust_fax" id="cust_fax" value="" style="width:200px;"/>--> <select name="cust_fax" id="cust_fax" style="width: 200px;" required> <option value=""> --- Please Select --- </option> <?php include("country.php"); ?> </select> </td> </tr> <tr> <th height="30" align="left" valign="top">&nbsp;</th> <th height="30" align="left" valign="top">Email</th> <td height="30" align="left" valign="top">&nbsp; <input type="text" class="text" name="cust_email" id="cust_email" value="" style="width:200px;"/></td> <th height="30" align="left" valign="top">DOB</th> <td height="30" align="left" valign="top">&nbsp; <input type="text" class="text" name="cust_dob" id="cust_dob" value="" style="width:200px;"/></td> </tr> </table> </div> <div class="row" style="background:#888888; padding:5px; color:#FFFFFF; margin-bottom:10px;"> <strong>Product Details</strong> </div> <div class="row"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th height="30" align="left" valign="top">Invoice Date</th> <th height="30" align="left" valign="top">Invoice No</th> <th height="30" align="left" valign="top">Agent</th> <th height="30" align="left" valign="top">Promotion Code</th> <th height="30" align="left" valign="top">Gift Voucher Code</th> </tr> <tr> <td height="30" align="left" valign="top"><input type="text" class="text" name="invoice_date" id="invoice_date" value="<?php echo date('d-m-Y'); ?>" style="width:200px;" readonly="readonly" /></td> <td height="30" align="left" valign="top"><?php //$purno = mysql_fetch_array(mysql_query("select `sl_no` from `invoice_sl` where `type` = 'S' order by `sl_id` desc limit 1")); $purno = mysql_fetch_array(mysql_query("select `sale_id` from `soft_sale` where 1 order by `sale_id` desc limit 1")); $purchaseno = sprintf("%06d",($purno['sale_id'] + 1)); ?><input type="text" class="text" name="invoice_no" id="invoice_no" value="<?php echo $purchaseno; ?>" style="width:200px;" readonly="readonly"/></td> <td height="30" align="left" valign="top"><input type="text" class="text" name="emp_code" id="emp_code" value="" style="width:200px;"/> <script> $(document).ready(function() { $('#emp_code').autocomplete({ source: function(request, response) { $.ajax({ url: "chk_employee.php", data: {term : request.term , search_field : $('#emp_code').val() }, dataType: "json", type: "POST", success: function(data){response(data);} }); }, select: function( event, ui ) { $( "#emp_id" ).val( ui.item.data1 ); } }); }); </script> </td> <td height="30" align="left" valign="top"><input type="text" class="text" name="promo_code" id="promo_code" value="" style="width:200px;" onblur="chk_promo_code();"/> <input type="hidden" class="text" name="coupon_type" id="coupon_type" value="" style="width:200px;"/></td> <td height="30" align="left" valign="top"><input type="text" class="text" name="gift_voucher_code" id="gift_voucher_code" value="" style="width:200px;" onblur="chk_promo();"/></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background:#CCCCCC; border:#333333 1px solid"> <tr> <!--<th style="border-right:#333333 1px solid; width:50px;">Sl No.</th>--> <th style="border-right:#333333 1px solid; width:140px;">Code</th> <th style="border-right:#333333 1px solid; width:190px;">Details</th> <th style="border-right:#333333 1px solid; width:110px;">Color</th> <th style="border-right:#333333 1px solid; width:110px;">Category.</th> <th style="border-right:#333333 1px solid; width:140px;">Style</th> <th style="border-right:#333333 1px solid; width:110px;">Price (per/unit)</th> <th style="border-right:#333333 1px solid; width:80px;">Discount (%)</th> <th style="border-right:#333333 1px solid; width:80px;">Qty.</td> <th style="width:110px;">Total Price</th> <th style="width:15px;">&nbsp;</th> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="theValue" style="border:#333333 1px solid; border-top:0;"> <tr> <!--<td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:50px;"><strong>1.</strong></td>--> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:140px;"><input name="product_code[]" id="product_code1" type="text" style="width:100px;" onblur="chk_product(1);" /><input name="product_id[]" id="product_id1" type="hidden" /><input name="price[]" id="price1" type="hidden" /><input name="disc[]" id="disc1" type="hidden" /><input name="qty[]" id="qty1" class="qty" type="hidden" style="width:60px;" value="1" /></td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:190px;" id="pro_details1">&nbsp;</td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:110px;" id="color1">&nbsp;</td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:110px;" id="size1">&nbsp;</td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:140px;" id="style1">&nbsp;</td> <td height="30" align="right" valign="middle" style="border-right:#333333 1px solid; width:110px;" id="pro_price1">&nbsp;</td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:80px;" id="pro_disc1">&nbsp;</td> <td height="30" align="center" valign="middle" style="border-right:#333333 1px solid; width:80px;" id="pro_qty1">&nbsp;</td> <td height="30" align="right" valign="middle" style="width:110px;"><input name="total_price[]" id="total_price1" type="text" style="width:100px; text-align:right" readonly="readonly" />&nbsp;&nbsp;</td> <td height="30" align="right" valign="middle" style="width:15px;">&nbsp;</td> </tr> </table> <div id="myDiv"></div> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="theValue" style="border:#333333 1px solid; border-top:0;"> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong>Total Sale Price.</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><input name="total_sale_price" id="total_sale_price" type="text" style="width:120px; text-align:right;" readonly="readonly"/></td> </tr> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong>Discount (%).</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><input name="disc_per" id="disc_per" type="text" style="width:120px; text-align:right;" onkeyup="cal('p')"/></td> </tr> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong>Discount Amount.</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><input name="disc_amt" id="disc_amt" type="text" style="width:120px; text-align:right;" onkeyup="cal('s')"/></td> </tr> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><strong>Extra Charges.</strong></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><input name="ex_charges" id="ex_charges" type="text" style="width:120px; text-align:right;" onkeyup="cal('s')"/></td> </tr> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; border-bottom:#333333 1px solid; padding-right:10px;"><div style="float:left; padding-left:5px;" id="tot_quanty">No of Sarees : 0</div><div style="float:right;"><strong>Net .</strong></div></td> <td width="13%" height="30" align="right" valign="middle" style="border-bottom:#333333 1px solid;"><input name="net_price" id="net_price" type="text" style="width:120px; text-align:right;" readonly="readonly"/></td> </tr> <tr> <th width="87%" height="30" align="right" valign="middle" style="border-right:#333333 1px solid; padding-right:10px;" colspan="2"><div style="float:left; padding-left:5px;" id="tot_quanty">Remarks :</div><div style="float:left; padding-left:15px;"><textarea name="discount_remarks" id="discount_remarks" cols="100" rows="2" disabled="disabled"></textarea></div></td> </tr> </table> <div style="float:right; display:none;" id="add_new"><p><a href="javascript:;" onclick="addElement();" class="button add_new"><span><span>Add New Field</span></span></a></p></div> </div> <div class="row" style="background:#888888; padding:5px; color:#FFFFFF; margin-bottom:10px;"> <strong>Payment Details</strong> </div> <div class="row"> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:#000000 1px solid;"> <tr> <th width="23%" height="30" align="left" valign="middle" style="border-right:#000000 1px solid;">&nbsp;&nbsp;Payment Mode</th> <th width="34%" height="30" align="left" valign="middle" style="border-right:#000000 1px solid;">&nbsp;&nbsp;Payment Details</th> <th width="43%" height="30" align="left" valign="middle">&nbsp;&nbsp;Payment Amount</th> </tr> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="pay_method[]" class="pay_method" type="hidden" style="width:200px;" value="C" />Cash</th> <td height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="tran_id[]" class="tran_id" type="text" style="width:200px;" /></td> <td height="30" align="left" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="pay_amt[]" class="pay_amt" id="pay_amtch" type="text" style="width:200px; text-align:right" onkeyup="cal_pay()" /></td> </tr> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="pay_method[]" class="pay_method" type="hidden" style="width:200px;" value="CC" />Card</th> <td height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="tran_id[]" class="tran_id" type="text" style="width:200px;" /></td> <td height="30" align="left" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="pay_amt[]" class="pay_amt" type="text" style="width:200px; text-align:right" onkeyup="cal_pay()" /></td> </tr> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="pay_method[]" class="pay_method" type="hidden" style="width:200px;" value="CH" />Cheque</th> <td height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="tran_id[]" class="tran_id" type="text" style="width:200px;" /></td> <td height="30" align="left" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="pay_amt[]" class="pay_amt" type="text" style="width:200px; text-align:right" onkeyup="cal_pay()" /></td> </tr> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="pay_method[]" class="pay_method" type="hidden" style="width:200px;" value="R" /> Reward Point</th> <td height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="rewardpoint" class="rewardpoint" id="rewardpoint" type="hidden" value="" /> <input name="tran_id[]" class="tran_id" id="reward" type="text" style="width:350px;" readonly="readonly" value="" /></td> <td height="30" align="left" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="pay_amt[]" class="pay_amt" id="rewardpay" type="text" value="0" style="width:200px; text-align:right" onkeyup="cal_pay()" /></td> </tr> <tr> <th height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="pay_method[]" class="pay_method" type="hidden" style="width:200px;" value="SR" /> Sale Return</th> <td height="30" align="left" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="tran_id[]" class="tran_id" id="sale_return_no" type="text" style="width:350px;" value="" onblur="chk_return();" /></td> <td height="30" align="left" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="pay_amt[]" class="pay_amt" id="sale_return_value" type="text" value="0" style="width:200px; text-align:right" onkeyup="cal_pay()" /></td> </tr> <tr> <th height="30" colspan="2" align="right" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">Payment Due&nbsp;&nbsp;</th> <td height="30" align="left" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="due_amt" id="due_amt" type="text" style="width:200px; text-align:right" readonly="readonly" /></td> </tr> <tr> <th height="30" align="left" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp;Reward Point Add&nbsp;&nbsp; <input name="gift_point_add" type="radio" value="Y" checked="checked" />&nbsp;Yes&nbsp;&nbsp;<input name="gift_point_add" type="radio" value="N" />&nbsp;No<br /> &nbsp;&nbsp;Gift Voucher Generation&nbsp;&nbsp; <input name="gift_generation_status" type="radio" value="Y" checked="checked" />&nbsp;Yes&nbsp;&nbsp;<input name="gift_generation_status" type="radio" value="N" />&nbsp;No</th> <th height="30" align="right" valign="middle" style="border-right:#000000 1px solid; border-top:#000000 1px solid;">Total Amount&nbsp;&nbsp;</th> <td height="30" align="left" valign="middle" style="border-top:#000000 1px solid;">&nbsp;&nbsp; <input name="paid_amt" id="paid_amt" type="text" style="width:200px; text-align:right" readonly="readonly" /></td> </tr> <tr> <th style="border-top:#000000 1px solid;border-right:#000000 1px solid; ">&nbsp;&nbsp;Notify Customer</th> <th style="border-top:#000000 1px solid;"><input type="checkbox" id="notify_mail" name="notify_mail" value="yes" checked="checked"/> MAIL &nbsp;&nbsp;<input type="checkbox" id="notify_sms" name="notify_sms" value="yes" checked="checked"/> SMS </th> <th style="border-top:#000000 1px solid;" align="left">Promotion Offer&nbsp;&nbsp;<input name="category2" id="category2Yes" type="radio" value="Yes" />&nbsp;Yes&nbsp;&nbsp;<input name="category2" type="radio" id="category2No" value="No" />&nbsp;No</th> </tr> </table> </div> <div class="row"> <div class="buttons"> <ul style="list-style-type:none;"> <?php if($_REQUEST['flag'] == "1") { ?> <li><img src="images/loader.gif" /></li> <?php } else { ?> <li><span class="button send_form_btn"><span><span>SAVE & PRINT</span></span> <input name="" type="submit" /></span></li> <?php } ?> <li><span class="button cancel_btn"><span><span>CANCEL</span></span> <input name="" type="button" onclick="location.href='add_sale.php'"/></span></li> </ul> </div> </div> </div> </fieldset> </form> <?php } ?> </div> </div> </div> </div> </div> <span class="scb"><span class="scb_left"></span><span class="scb_right"></span></span> </div> </div> <?php ?> <?php include "footer.php"; ?>