<?php

/* $Id: index.php 6941 2014-10-26 23:18:08Z daintree $*/

error_reporting(E_ALL & ~E_NOTICE);

ob_start();

$PageSecurity=0;



include('includes/session.inc');

$Title=_('ERP Home');

include('includes/newheader.php');

include('includes/SQL_CommonFunctions.inc');


if (isset($_GET['projectid'])) {
		$_SESSION['projectid'] = stripslashes($_GET['projectid']);
	}
	$projectid= $_SESSION['projectid'];

if (isset($_GET['id'])) {
		$_SESSION['id'] = stripslashes($_GET['id']);
	}
	$worksheetid = $_SESSION['id'];

if (isset($_GET['date'])) {
		$_SESSION['date'] = stripslashes($_GET['date']);
	}
	$date= $_SESSION['date'];

if (isset($_GET['remark'])) {
		$_SESSION['remark'] = stripslashes($_GET['remark']);
	}
	$remark = $_SESSION['remark'];

$SQL = "SELECT project_name,account_number
		                            FROM projectdetails
									
									WHERE projectid = '".$projectid."'";
						
						
						$result=DB_query($SQL);
						$myrow=DB_fetch_array($result);

$projectname = $myrow['project_name'];
	$accountnumber=$myrow['account_number'];


?>



	 <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

  <link rel="stylesheet" href="/resources/demos/style.css">

  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>

  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

  <link href='jquery-ui.min.css' type='text/css' rel='stylesheet' >

    <script src="jquery-3.2.1.min.js" type="text/javascript"></script>

    <script src="jquery-ui.min.js" type="text/javascript"></script>

  <script type="text/javascript" src="simple.money.format.js"></script>

  <script type="text/javascript" src="scripts/jquery.formatCurrency-1.4.0.js"></script>


   <script type="text/javascript" src="asset/jquery.signature.min.js"></script>
    <link rel="stylesheet" type="text/css" href="asset/jquery.signature.css">
  
    <style>
        .kbw-signature { width: 400px; height: 200px;}
        #sig canvas{
            width: 100% !important;
            height: auto;
        }
    </style> 
<script type="text/javascript">
    var sig = $('#sig').signature({syncField: '#signature64', syncFormat: 'PNG'});
    $('#clear').click(function(e) {
        e.preventDefault();
        sig.signature('clear');
        $("#signature64").val('');
    });
</script>
        

 <div class="container-fluid">

     <?

     echo '<form method="post" id= "invoice_form" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">';

	

	echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';?>

        <div class="table-responsive">

          <table class="table table-responsive">

            <tr>

              <td colspan="2" align="center"><h2 style="margin-top:10.5px">Technician Worksheet Form</h2></td>

            </tr>

            <tr>

                <td colspan="2">

                  <div class="row">

                    <div class="col-sm-6">

                     <table class="table-responsive">
                          <tr>

                      <th ></th>

                      <th ></th>
						 </tr>
						 
						 <tr>

                      <td> <b>Worksheet ID:</b></td>
					  <td><?php echo $worksheetid; ?></td>
						</tr>
						 <tr>
						  <td><b>Project ID/JobNo:</b></td>
						  <td> <?php echo $projectid; ?></td>
						 </tr>
					 
						 <tr>
						  <td><b>Project Name:</b></td>
						  <td> <?php echo $projectname; ?></td>
						 </tr>
						 <tr>
						  <td><b>Account Number:</b></td>
						  <td> <?php echo $accountnumber; ?></td>
						 </tr>
					  <tr>
						  <td><b>Date:</b></td>
						  <td> <?php echo $date; ?></td>
						 </tr>
						 <tr>
						  <td><b>Remarks:</b></td>
						  <td> <?php echo $remark; ?></td>
						 </tr>
					  
		

                         </table>

                    </div>
					 
                   
                  <br />

                  <table id="invoice-item-table" class="table table-bordered">

                    <tr>

                      <th >stockid</th>

                   

                      <th >Narrative</th>

                      <th >Qty/Hrs</th>

                   
                    </tr>

                    <tr>

                      <th></th>

                    

                      <th></th>

                      <th></th>

                    

                    
                    </tr>
					  
					   <?php 
					  
					  //pull materials and labour and populate below
	
$SQL1 = "SELECT *
		                            FROM technician_worksheet_materials
									
									
									WHERE id = '".$worksheetid."'";
						
						
						$result1=DB_query($SQL1);
						while ($myrow1=DB_fetch_array($result1)){
							
							
							
							
							
							
						

	
					  
					  
					  ?>

                    <tr>

                      <td><?php echo  $myrow1['stockid'];?></td>

                    

                      <td><?php echo  $myrow1['narrative']; ?></td>

                      <td><?php echo $myrow1['qty']; ?></td>

                     </tr>

                    <?php  } 
					  
					  
					  $SQL2 = "SELECT *
		                            FROM technician_worksheet_labourcost
									
									
									WHERE id = '".$worksheetid."'";
						
						
						$result2=DB_query($SQL2);
						while ($myrow2=DB_fetch_array($result2)){
					  
					  
					  
					  ?>

                   <tr>

                      <td></td>

                      <td><?php echo $myrow2['description']; ?></td>

                     
                      <td><?php echo $myrow2['billable_hrs']; ?></td>

                     </tr>
					  
					   <?php  } ?>
					  

                  </table>

                 

                </td>

              </tr>

            

                    </div>

                    <tr ><td>

                  
            <label class="" for="">Client Signature:</label>
            <br/>
            <div id="sig" ></div>
            <br/>
            <button id="clear" class="btn btn-warning" >Clear Signature</button>
            <textarea id="signature64" name="signed" style="display: none" ></textarea>
     

               </td>

              </tr>

              
              <tr>

                <td >

               

                  <input type="submit" name="create_worksheet" id="create_worksheet" class="btn btn-info" value="Print Worksheet" />

					

              

                </td>

              </tr>

          </table>

        </div>

      </form>

     

     

		



   



 									

									<?php

//this is where you paste. Below paste it:



if(isset($_POST["create_worksheet"])){

	

	

	//security check

		$userid = $_SESSION['UserID'];

	
$folderPath = "upload/";
  
    $image_parts = explode(";base64,", $_POST['signed']);
        
    $image_type_aux = explode("image/", $image_parts[0]);
      
    $image_type = $image_type_aux[1];
      
    $image_base64 = base64_decode($image_parts[1]);
      
    $file = $folderPath . uniqid() . '.'.$image_type;
      
    file_put_contents($file, $image_base64);

	

$PaperSize = 'A4_Landscape';// PDFStarter.php: $Page_Width=842; $Page_Height=595; $Top_Margin=30; $Bottom_Margin=30; $Left_Margin=40; $Right_Margin=30;
include('includes/PDFStarter.php');
$pdf->addInfo('Title', _('Technician Worksheet') );
$pdf->addInfo('Subject', _('Jobsheet') );
$FontSize = 12;
$line_height = 12;// Recommended: $line_height = $x * $FontSize.
		
		include('includes/PDFTechnicianWorksheetheader.inc');


	
$SQL1 = "SELECT *
		                            FROM technician_worksheet_materials
									
									
									
									WHERE id = '".$worksheetid."'";
						
						
						$result1=DB_query($SQL1);
						while ($myrow1=DB_fetch_array($result1)){
							
							  $ListCount ++;
				

		$YPos -= $line_height;// Increment a line down for the next line item.
				

		if ((mb_strlen($myrow1['narrative']) >200 AND $YPos-$line_height <= 75)
			OR (mb_strlen($myrow1['narrative']) >1 AND $YPos-$line_height <= 62)
			OR $YPos-$line_height <= 50){
		/* We reached the end of the page so finsih off the page and start a newy */
			include ('includes/PDFTechnicianWorksheetheader.inc');
		} //end if need a new page headed up

			
							
							$FontSize = 10;// Font size for the line item.

		$LeftOvers = $pdf->addText($Left_Margin, $YPos+$FontSize, $FontSize,$myrow1['stockid']);
		$LeftOvers = $pdf->addText(145, $YPos+$FontSize, $FontSize, $myrow1['narrative']);
	
		//$LeftOvers = $pdf->addTextWrap(420, $YPos,85,$FontSize,$myrow1['narrative'],'right');
					$LeftOvers = $pdf->addTextWrap(500, $YPos,85,$FontSize,$myrow1['qty'],'right');
		
							
							
							
										// Prints salesorderdetails.narrative:
		$FontSize2 = $FontSize*0.8;// Font size to print salesorderdetails.narrative.
		$Width2 = $Page_Width-$Right_Margin-145;// Width to print salesorderdetails.narrative.
		$LeftOvers = trim($myrow1['narrative']);
		//**********
		$LeftOvers = str_replace('\n', ' ', $LeftOvers);// Replaces line feed character.
		$LeftOvers = str_replace('\r', '', $LeftOvers);// Delete carriage return character
		$LeftOvers = str_replace('\t', '', $LeftOvers);// Delete tabulator character
			
		

				
				
							
							
						}
	
	
	
	 $SQL2 = "SELECT *
		                            FROM technician_worksheet_labourcost
									
									
									WHERE id = '".$worksheetid."'";
						
						
						$result2=DB_query($SQL2);
						while ($myrow2=DB_fetch_array($result2)){
							
							 $ListCount ++;
				

		$YPos -= $line_height;// Increment a line down for the next line item.
				

		
			
							
							$FontSize = 10;// Font size for the line item.

		$LeftOvers = $pdf->addText($Left_Margin, $YPos+$FontSize, $FontSize,_(' '));
		$LeftOvers = $pdf->addText(145, $YPos+$FontSize, $FontSize, $myrow2['description']);
	
		$LeftOvers = $pdf->addTextWrap(420, $YPos,85,$FontSize,_(' '),'right');
					$LeftOvers = $pdf->addTextWrap(500, $YPos,85,$FontSize,$myrow2['billable_hrs'],'right');
		
							
							
							
							
						}
	
	while (mb_strlen($LeftOvers) > 1) {
			$YPos -= $FontSize2;
			if ($YPos < ($Bottom_Margin)) {// Begins new page.
				include ('includes/PDFTechnicianWorksheetheader.inc');
			}
			$LeftOvers = $pdf->addTextWrap(145, $YPos, $Width2, $FontSize2, $LeftOvers);
		}
			
				// Print salesorders.comments:
	$YPos -= $FontSize*3;
	$pdf->addText($XPos+550, $YPos+$FontSize, $FontSize, _('Client Signature:'));
    $pdf->addText($XPos+650, $YPos+$FontSize, $FontSize, _('------------------------'));

	
	
$pdf->line($Page_Width-$Right_Margin-222, $YPos+$FontSize*-1,$Page_Width-$Right_Margin,$YPos+$FontSize*-1);


	$pdf->addText($XPos+550, $YPos+$FontSize*-2, $FontSize, _('Name:'));
    $pdf->addText($XPos+650, $YPos+$FontSize*-2, $FontSize, $authorized_by);
$pdf->line($Page_Width-$Right_Margin-222, $YPos+$FontSize*-3.5,$Page_Width-$Right_Margin,$YPos+$FontSize*-3.5);



$pdf->addText($XPos+550, $YPos+$FontSize*-8, $FontSize, _('Date Received'));
  $pdf->addText($XPos+650, $YPos+$FontSize*-8, $FontSize, $fijitimeR);


	$pdf->addText($XPos, $YPos+$FontSize-45, $FontSize, _('Remarks').':');
	$Width2 = $Page_Width-$Right_Margin-120;// Width to print salesorders.comments.
$LeftOvers =	$pdf->addText($XPos, $YPos+$FontSize-55, $FontSize, $remark);
	//$LeftOvers = trim($quoteterms);
	//**********
	$LeftOvers = str_replace('\n', ' ', $LeftOvers);// Replaces line feed character.
	$LeftOvers = str_replace('\r', '', $LeftOvers);// Delete carriage return character
	$LeftOvers = str_replace('\t', '', $LeftOvers);// Delete tabulator character
	//**********
	while(mb_strlen($LeftOvers) > 1) {
		$YPos -= $FontSize;
		if ($YPos < ($Bottom_Margin)) {// Begins new page.
			include ('includes/PDFTechnicianWorksheetheader.inc');
		$LeftOvers = $pdf->addTextWrap(40, $YPos, $Width2, $FontSize, $LeftOvers);
	}

	
	
	
	
	
}





			
ob_end_clean();
		$pdf->OutputD('Technician' . $worksheetid. date('d-m-Y').'.pdf');
	$pdf->__destruct();

		

			

		

}

		

		

		

			    

		

	

//echo 'Quotation Created Successfully'. $jobno.'!';

//header("location:Invoicing.php");







//echo 'Quotation Created Successfully'. $jobno.'!';

echo '</div>';

echo '</div>';











			  

 	echo '</div >';

	?>

						



		

					</div>

				</div>

			</div>

					

					



						<!--end:: Widgets/Stats-->



						<!--Begin::Section-->

						



		<!-- end::Quick Sidebar -->



		<!-- begin::Scroll Top -->

		<div id="m_scroll_top" class="m-scroll-top">

			<i class="la la-arrow-up"></i>

		</div>



		<!-- end::Scroll Top -->



		<!-- begin::Quick Nav -->

		



		<!-- begin::Quick Nav -->

<script src="includes/vendors/owl.carousel/dist/owl.carousel.js" type="text/javascript"></script>



		<!--end::Page Scripts -->

	</body>



	<!-- end::Body -->

</html>

 

      

<?php







/*The module link codes are hard coded in a switch statement below to determine the options to show for each tab */

include('includes/MainMenuLinksArray.php');



if (isset($SupplierLogin) AND $SupplierLogin==1){

	echo '<table class="table_index">

			<tr>

			<td class="menu_group_item">

				<p>&bull; <a href="' . $RootPath . '/SupplierTenders.php?TenderType=1">' . _('View or Amend outstanding offers') . '</a></p>

			</td>

			</tr>

			<tr>

			<td class="menu_group_item">

				<p>&bull; <a href="' . $RootPath . '/SupplierTenders.php?TenderType=2">' . _('Create a new offer') . '</a></p>

			</td>

			</tr>

			<tr>

			<td class="menu_group_item">

				<p>&bull; <a href="' . $RootPath . '/SupplierTenders.php?TenderType=3">' . _('View any open tenders without an offer') . '</a></p>

			</td>

			</tr>

		</table>';

	include('includes/footer.inc');

	exit;

} elseif (isset($CustomerLogin) AND $CustomerLogin==1){

	echo '<table class="table_index">

			<tr>

			<td class="menu_group_item">

				<p>&bull; <a href="' . $RootPath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Account Status') . '</a></p>

			</td>

			</tr>

			<tr>

			<td class="menu_group_item">

				<p>&bull; <a href="' . $RootPath . '/SelectOrderItems.php?NewOrder=Yes">' . _('Place An Order') . '</a></p>

			</td>

			</tr>

			<tr>

			<td class="menu_group_item">

				<p>&bull; <a href="' . $RootPath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Status') . '</a></p>

			</td>

			</tr>

		</table>';



	include('includes/footer.inc');

	exit;

}



if (isset($_GET['Application'])){ /*This is sent by this page (to itself) when the user clicks on a tab */

	$_SESSION['Module'] = $_GET['Application'];

}

















//include('includes/footer.inc');



function GetRptLinks($GroupID) {

/*

This function retrieves the reports given a certain group id as defined in /reports/admin/defaults.php

in the acssociative array $ReportGroups[]. It will fetch the reports belonging solely to the group

specified to create a list of links for insertion into a table to choose a report. Two table sections will

be generated, one for standard reports and the other for custom reports.

*/

	global $db, $RootPath, $ReportList;

	require_once('reportwriter/languages/en_US/reports.php');

	require_once('reportwriter/admin/defaults.php');

	$GroupID=$ReportList[$GroupID];

	$Title= array(_('Custom Reports'), _('Standard Reports and Forms'));



	$sql= "SELECT id,

				reporttype,

				defaultreport,

				groupname,

				reportname

			FROM reports

			ORDER BY groupname,

					reportname";

	$Result=DB_query($sql,'','',false,true);

	$ReportList = '';

	while ($Temp = DB_fetch_array($Result)) $ReportList[] = $Temp;



	$RptLinks = '';

	for ($Def=1; $Def>=0; $Def--) {

        $RptLinks .= '<li class="menu_group_headers">';

        $RptLinks .= '<b>' .  $Title[$Def] . '</b>';

        $RptLinks .= '</li>';

		$NoEntries = true;

		if ($ReportList) { // then there are reports to show, show by grouping

			foreach ($ReportList as $Report) {

				if ($Report['groupname']==$GroupID AND $Report['defaultreport']==$Def) {

                    $RptLinks .= '<li class="menu_group_item">';

					$RptLinks .= '<p>&bull; <a href="' . $RootPath . '/reportwriter/ReportMaker.php?action=go&amp;reportid=' . $Report['id'] . '">' . _($Report['reportname']) . '</a></p>';

					$RptLinks .= '</li>';

					$NoEntries = false;

				}

			}

			// now fetch the form groups that are a part of this group (List after reports)

			$NoForms = true;

			foreach ($ReportList as $Report) {

				$Group=explode(':',$Report['groupname']); // break into main group and form group array

				if ($NoForms AND $Group[0]==$GroupID AND $Report['reporttype']=='frm' AND $Report['defaultreport']==$Def) {

                    $RptLinks .= '<li class="menu_group_item">';

					$RptLinks .= '<img src="' . $RootPath . '/css/' . $_SESSION['Theme'] . '/images/folders.gif" width="16" height="13" alt="" />&nbsp;';

					$RptLinks .= '<p>&bull; <a href="' . $RootPath . '/reportwriter/FormMaker.php?id=' . $Report['groupname'] . '"></p>';

					$RptLinks .= $FormGroups[$Report['groupname']] . '</a>';

					$RptLinks .= '</li>';

					$NoForms = false;

					$NoEntries = false;

				}

			}

		}

		if ($NoEntries) $RptLinks .= '<li class="menu_group_item">' . _('There are no reports to show!') . '</li>';

	}

	return $RptLinks;

}

	

?>

<!-- Modal HTML embedded directly into document -->

<div id="ex1" class="modal">

  <p>Thanks for clicking. That felt good.</p>

  <a href="#" rel="modal:close">Close</a>

</div>





<!-- Modal -->

 <div class="modal fade" id="getCodeModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

   <div class="modal-dialog modal-lg">

      <div class="modal-content">

       <div class="modal-header">

         <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>

         <h4 class="modal-title" id="myModalLabel"> API CODE </h4>

       </div>

       <div class="modal-body" id="getCode" style="overflow-x: scroll;">

       

          

          

       </div>

    </div>

   </div>

 </div>

<script>

jQuery(document).ready(function($){



   // event must be delegated from .xcrud

	



	$( "select[name='customer']" ).change(function () {

    var debtorno = $(this).val();

  

	var userid = '<?php echo $userid; ?>';

		

			if (userid == 'schand'){

	var department =parseInt(6);

			var depart=parseInt(0)
			var depart=parseInt(25)

		}

			if (userid == 'stephanie'){

	var department =parseInt(6);

			var depart=parseInt(0)
			var depart=parseInt(25)

		}

		if (userid == 'waqa'){

	var department =parseInt(6);

			var depart=parseInt(0)
var depart=parseInt(25)
		}

		if (userid == 'nisha'){

	var department =parseInt(7);

			var depart=parseInt(0)
var depart=parseInt(25)
		}

		if (userid == 'lusi'){

	var department =parseInt(9);

			

			var depart=parseInt(10)

			

		}

			if (userid == 'rowen'){

	var department =parseInt(8);

			var department =parseInt(21);	


			

		}
				if (userid == 'rramlu'){

		var department =parseInt(8);

			var department =parseInt(21);	

			


			

		}
		
			if (userid == 'ragnesh'){

	var department =parseInt(3);

			


			

		}

		if (userid == 'ruth'){

	var department =parseInt(2);

			

			var depart=parseInt(3)

			

		}
	if (userid == 'vani'){

	var department =parseInt(2);

			

			var depart=parseInt(3)

			

		}
			if (userid == 'ilimo'){

	var department =parseInt(1);

			

			var depart=parseInt(0)

			

		}
	if (userid == 'salata'){

	var department =parseInt(1);

			

			var depart=parseInt(0)

			

		}
		 

    if(debtorno) {





        $.ajax({

            url: "invoice/accountnumber.php",

            dataType: 'Json',

            data: {'id':debtorno ,'department': department,'depart': depart },

            success: function(data) {

				

                $('select[name="account"]').empty();;

                $.each(data, function(key, value) {

                    $('select[name="account"]').append('<option value="'+ key +'">'+ value +'</option>');

                });

            }

        });





    }else{

        $('select[name="account"]').empty();

    }

});



	

		

		var final_total_amt = $('#final_total_amt').text();

        var count = 1;

        

        $(document).on('click', '#add_row', function(){

	

			

          count++;

          $('#total_item').val(count);

          var html_code = '';

          html_code += '<tr id="row_id_'+count+'">';

          html_code += '<td><input type="text"  name="item_id[]" id="itemid_'+count+'" class="form-control input-sm item_id" disabled /></td>';

          

          html_code += '<td><input type="text" name="item_name[]" id="itemname_'+count+'" class="form-control input-sm item_name" /></td>';

          

          html_code += '<td><input type="text" name="order_item_quantity[]" id="orderitemquantity_'+count+'" data-srno="'+count+'" class="form-control input-sm number_only order_item_quantity" /></td>';

          html_code += '<td><input type="text" name="order_item_price[]" id="orderitemprice_'+count+'" data-srno="'+count+'" class="form-control input-sm number_only order_item_price" /></td>';

          html_code += '<td><input type="text" name="order_item_actual_amount[]" id="orderitemactualamount_'+count+'" data-srno="'+count+'" class="form-control input-sm order_item_actual_amount" readonly /></td>';

          

          html_code += '<td><input type="text" name="order_item_final_amount[]" id="orderitemfinalamount_'+count+'" data-srno="'+count+'" readonly class="form-control input-sm order_item_final_amount" /></td>';

          html_code += '<td><button type="button" name="remove_row" id="'+count+'" class="btn btn-danger btn-xs remove_row">X</button></td>';

          html_code += '</tr>';

          $('#invoice-item-table').append(html_code);

        });

        

        $(document).on('click', '.remove_row', function(){

          var row_id = $(this).attr("id");

          var total_item_amount = $('#orderitemfinalamount_'+row_id).val();

          var final_amount = $('#final_total_amt').text();

          var result_amount = parseFloat(final_amount) - parseFloat(total_item_amount);

          $('#final_total_amt').text(result_amount);

          $('#row_id_'+row_id).remove();

          count--;

          $('#total_item').val(count);

        });



        function cal_final_total(count)

        {

          var final_item_total = 0;

          for(j=1; j<=count; j++)

          {

            var quantity = 0;

            var price = 0;

            var actual_amount = 0;

           
            var item_total = 0;

            quantity = $('#orderitemquantity_'+j).val();

            if(quantity > 0)

            {

              price = $('#orderitemprice_'+j).val();

              if(price > 0)

              { 

                actual_amount = parseFloat(quantity) * parseFloat(price);

                $('#orderitemactualamount_'+j).val(actual_amount);

                tax1_rate = $('#orderitemtax1rate_'+j).val();

               
                item_total = parseFloat(actual_amount) ;

                final_item_total = parseFloat(final_item_total) + parseFloat(item_total);

                $('#orderitemfinalamount_'+j).val(item_total);

              }

            }

          }

			

          $('#final_total_amt').text(final_item_total);

			

        }

		



	 $(document).on('blur', '.order_item_quantity', function(){

          cal_final_total(count);

        });



        $(document).on('blur', '.order_item_price', function(){

          cal_final_total(count);

        });





        $('#create_invoice').click(function(){

          



         



 

          for(var no=1; no<=count; no++)

          {

            if($.trim($('#itemname_'+no).val()).length == 0)

            {

              alert("Please Enter Item Name");

              $('#itemname_'+no).focus();

              return false;

            }



       



          }



          $('#invoice_form').submit();

			

			$('#create_invoice').hide();



        });





	

	 });

	

	

	

	



	

	

	

	

</script>



