GetFieldValue('locations',"loccode='".$_REQUEST['site']."'",'prefix'); if($_SESSION['dealerid']) { $prefSql="select prefix_code from prefix_tbl where prefix_name = 'Quotes Management'"; $resultPrfx = DB_query($prefSql,$db); $Prefxrow=DB_Fetch_array($resultPrfx); $prefixcode=$Prefxrow['prefix_code']; $sql="select quotationNo from quotation where site = '".$_REQUEST['site']."' and dealerid='".$_SESSION['dealerid']."' and CompanyId='".$_SESSION['ACGCompanyId']."' and INSTR(`quotationNo`, '$financial') > 0 order by id DESC LIMIT 0,1"; $result = DB_query($sql,$db); $numrows = DB_num_rows($result); if($numrows>0) { $myrow=DB_Fetch_array($result); $ExplBill=explode("/",$myrow['quotationNo']); $maxval = $ExplBill[3]; } else {$maxval=0;} } else { $prefSql="select prefix_code from prefix_tbl where prefix_name = 'Quotes Management'"; $resultPrfx = DB_query($prefSql,$db); $Prefxrow=DB_Fetch_array($resultPrfx); $prefixcode=$Prefxrow['prefix_code']; $sql="select quotationNo from quotation where site = '".$_REQUEST['site']."' and dealerid='".$_SESSION['dealerid']."' and CompanyId='".$_SESSION['ACGCompanyId']."' and INSTR(`quotationNo`, '$financial') > 0 order by id DESC LIMIT 0,1"; $result = DB_query($sql,$db); $numrows = DB_num_rows($result); if($numrows>0) { $myrow=DB_Fetch_array($result); $ExplBill=explode("/",$myrow['quotationNo']); $maxval = $ExplBill[3]; } else {$maxval=0;} } $strChar=$_REQUEST['site']."/".$prefixcode."/".$financial."/"; $strFinal = $maxval+1; $strBothFinal = $strChar.str_pad($strFinal,5,"0",STR_PAD_LEFT); $data['site']=$_REQUEST['site']; $data['quotationNo']=$strBothFinal; $data['quotationDate']=FormatDateForSQL($_REQUEST['quotationDate']); $data['party']=$_REQUEST['party']; $data['quotationType']=$_REQUEST['quotationType']; //$data['quotation_funnel']=$_REQUEST['quotation_funnel']; $data['quotation_stage']=$_REQUEST['quotation_stage']; $data['contactPerson']=$_REQUEST['ContactPerson']; $data['partyContact']=$_REQUEST['partyContact2']; $data['validTill']=ConvertSQLDate($_REQUEST['validTill']); //$data['pack_forward']=$_REQUEST['pack_forward']; $data['delivery']=$_REQUEST['delivery']; $data['validity']=$_REQUEST['validity']; $data['basicAmount']=$_REQUEST['basicAmount']; $data['totalDiscountedPrice']=$_REQUEST['totalDiscountedPrice']; $data['exciseDuty']=$_REQUEST['EDBillRate']; $data['exciseValue']=$_REQUEST['exciseValue']; $data['ECessPercentage']=$_REQUEST['ECessPercentage']; $data['ECessValue']=$_REQUEST['ECessValue']; $data['SAHCessPercentage']=$_REQUEST['SAHCessPercentage']; $data['SAHCessValue']=$_REQUEST['SAHCessValue']; $data['taxableAmount']=$_REQUEST['taxableAmount']; $data['VatCst']=$_REQUEST['VatCst']; $data['VatCstValue']=$_REQUEST['VatCstValue']; $data['freightValue']=$_REQUEST['freightValue']; $data['packagingCharges']=$_REQUEST['packagingCharges']; $data['additionalCharges']=$_REQUEST['additionalCharges']; $data['order_type']=$_REQUEST['order_type']; $data['our_ref_no']=$_REQUEST['our_ref_no']; $data['subject']=$_REQUEST['subject']; $data['grandTotal']=$_REQUEST['grandTotal']; $data['billing_address']=$_REQUEST['address1']; $data['billing_city']=$_REQUEST['city']; $data['billing_state']=$_REQUEST['zipcode']; $data['billing_country']=$_REQUEST['country']; $data['shipping_address']=$_REQUEST['Shipping_address']; $data['shipping_city']=$_REQUEST['Shipping_city']; $data['shipping_state']=$_REQUEST['Shipping_zipcode']; $data['shipping_country']=$_REQUEST['Shipping_country']; $data['process_quote_type']='Direct'; $data['CompanyId']=$_SESSION['ACGCompanyId']; $data['created_by']=$_SESSION['UserID']; $data['created_date']=date('Y-m-d'); $data['dealerid']=trim($_SESSION['dealerid']); $s->RecordInsert('quotation', $data); $masterId=DB_Last_Insert_ID($db,'quotation','id'); if($masterId!='') { for($cnt=0;$cntRecordInsert('quotation_details', $data_array); } } } $_SESSION['success_msg']="Inserted Successfully"; $s->pageLocation("index.php?route=CRM/ViewQuotes".$rurl); } if($_REQUEST['Save']!='' && $_REQUEST['action']=='Edit') { $insert2="update quotation set quotationDate='".FormatDateForSQL($_REQUEST['quotationDate'])."', partyContact='".$_REQUEST['partyContact2']."', quotationType='".$_REQUEST['quotationType']."', quotation_stage='".$_REQUEST['quotation_stage']."', validTill='".FormatDateForSQL($_REQUEST['validTill'])."' where id='".$_REQUEST['QID']."' "; $query1=DB_query($insert2,$db); unset($_SESSION['qutotation_itemcode']); unset($_SESSION['itemcode']); $s->pageLocation("index.php?route=CRM/ViewQuotes".$rurl); } ?>

Quote Management

General Information

Branch* Quotation No. Date*
Client* Consignee Format
Contact Person Mobile No.
Our Ref No.
Type of Quotation* Quote Stage Valid Till
Quote Type  
Subject

Account Billing & shipping Address Information (Check if Same)

Billing Address Shipping Address
Billing city shipping City
Billing State Shipping State
Billing Country Shipping Country

Item Details

 

Item Details
Sr. No. Item Code Item Name Qty Price Total Amt Excise Duty Rate ED Amt


Amount And Taxes
Value Of Goods
Excise Duty
E-Cess
SHE Cess
Taxable Amount
VAT/CST
Grand Total