»
Tiếng AnhTiếng PhápTiếng Việt

In - Hóa đơn điện tử - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Ứng dụng » Hóa đơn điện tử
URL: https://www.javascriptbank.com/billing-invoice-form.html

Hóa đơn điện tử © JavaScriptBank.comHiệu ứng tạo một hóa đơn tính tiền bán hàng trên trang web, bạn có thể sử dụng kết hợp đoạn mã JavaScript này với các hàm gửi mail của các ngôn ngữ khác để gửi hóa đơn tới người mua hàng.

Phiên bản đầy đủ: jsB@nk » Ứng dụng » Hóa đơn điện tử
URL: https://www.javascriptbank.com/billing-invoice-form.html



JavaScript
<SCRIPT language=JavaScript><!-- Beginfunction fmtPrice(value) {result=+Math.floor(value)+".";var cents=100*(value-Math.floor(value))+0.5;result += Math.floor(cents/10);result += Math.floor(cents%10);return result;}<!--Rounding off Numbers-->function calclabor(){var labor1 = (document.forms[0].worked1.value*1)*(document.forms[0].labor_per_hour1.value*1);document.forms[0].labor1.value = labor1;var labor2 = (document.forms[0].worked2.value*1)*(document.forms[0].labor_per_hour2.value*1);document.forms[0].labor2.value = labor2;document.forms[0].cost1.value =(document.forms[0].labor1.value*1)+(document.forms[0].labor2.value*1)+(document.forms[0].trip_charge.value*1);}<!--Math Calculations-->function calcmaterial(){var cost2 = (document.forms[0].flat_rate.value*1)+(document.forms[0].p1.value*1)+(document.forms[0].p2.value*1)+(document.forms[0].p3.value*1)+(document.forms[0].p4.value*1)+(document.forms[0].p5.value*1)+(document.forms[0].p6.value*1)+(document.forms[0].p7.value*1)+(document.forms[0].p8.value*1)+(document.forms[0].rpl_cost1.value*1)+(document.forms[0].rpl_cost2.value*1);document.forms[0].cost2.value = cost2;}<!--Labor Cost Percentage--> function compute() {var unformatted1 = (document.forms[0].cost1.value)*(document.forms[0].tax1.value);document.forms[0].unformatted1.value=unformatted1;var formatted1 = fmtPrice(unformatted1);document.forms[0].formatted1.value=formatted1;var cost3= eval( document.forms[0].cost1.value );   cost3 += eval( (document.forms[0].cost1.value)*(document.forms[0].tax1.value) ); var labor_cost1 = fmtPrice(cost3);document.forms[0].labor_cost1.value=labor_cost1;<!--Materal Cost Percentage-->var unformatted2 = (document.forms[0].cost2.value)*(document.forms[0].tax2.value);document.forms[0].unformatted2.value=unformatted2;var formatted2 = fmtPrice(unformatted2);document.forms[0].formatted2.value=formatted2;var cost3= eval( document.forms[0].cost2.value );   cost3 += eval( (document.forms[0].cost2.value)*(document.forms[0].tax2.value) ); var material_cost2 = fmtPrice(cost3);document.forms[0].material_cost2.value=material_cost2;}function calctotal(){var total = (document.forms[0].material_cost2.value*1)+(document.forms[0].labor_cost1.value*1)-(document.forms[0].ded.value*1);document.forms[0].total.value = total;return result;}function resetIt() {document.forms[0].cost1.value="";document.forms[0].tax1.value="";document.forms[0].unformatted1.value="";document.forms[0].formatted1.value="";document.forms[0].labor_cost.value="";document.forms[0].total.value="";    }// End --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM action=MAILTO:your@email_address?subject=Billing method=post encType=text/plain><P><CENTER><FONT face=ARIAL size=5><B>Billing Invoice Form</B></FONT><BR><HR width=240 SIZE=2></CENTER><P><TABLE borderColor=#ccaf00 align=center bgColor=#cccc77 border=2>  <TBODY>  <TR>    <TD>      <TABLE cellSpacing=0 cellPadding=0 border=0><FONT face=ARIAL         size=2><B>Service Order Information</B></FONT>         <TBODY>        <TR>          <TD><INPUT size=12 value=" Tracking #" name=""> <INPUT tabIndex=1             size=18 name=tracking></TD>          <TD></TD>          <TD><INPUT size=32 value=" If over $175.00  (555) 000-0000"           name=""></TD></TR>        <TR>          <TD><INPUT size=17 value=" Service Order #" name=""> <INPUT             tabIndex=2 size=13 name=service_order></TD>          <TD></TD>          <TD><INPUT size=17 value=" Authorization #" name=""> <INPUT             tabIndex=7 size=13 name=authorization></TD></TR>        <TR>          <TD><INPUT size=10 value=" Product" name=""> <SELECT tabIndex=3             size=1 name=product> <OPTION value="" selected>---------- Select ----------<OPTION value=" appliance">Appliance<OPTION               value=" drywall">Drywall<OPTION value=heating>Heating<OPTION               value=a_c>Air Conditioning<OPTION               value=" plumbing">Plumbing<OPTION value=" pool_spa">Pool and Spa</OPTION></SELECT></TD>          <TD></TD>          <TD><INPUT size=18 value=" Was this a Recall ?" name=""> <SELECT             tabIndex=8 size=1 name=was_recall> <OPTION value=no               selected>No<OPTION value=yes>Yes</OPTION></SELECT> </TD>        <TR>          <TD><INPUT size=10 value=" Model #" name="">           <INPUT tabIndex=4             name=model size="20"></TD>          <TD></TD>          <TD><INPUT size=23 value=" If Yes, from what S/O # ?" name="">             <INPUT tabIndex=9 size=7 name=recall_so></TD></TR>        <TR>          <TD><INPUT size=10 value=" Serial #" name="">           <INPUT tabIndex=5             name=serial size="20"></TD></TR>        <TR>          <TD><INPUT size=12 value=" Year Made" name=""> <INPUT tabIndex=6             size=18 name=year></TD></TR>        <TR>          <TD>            <TABLE border=0><BR><FONT face=ARIAL size=2><B>Contractors Information</B></FONT>               <TBODY>              <TR>                <TD><INPUT size=10 value=" Name" name="">                 <INPUT tabIndex=10                   name=con_name size="20"></TD></TR>              <TR>                <TD><INPUT size=10 value=" Address" name="">                 <INPUT                   tabIndex=11 name=con_address size="20"></TD></TR>              <TR>                <TD><INPUT size=10 value=" City" name="">                 <INPUT tabIndex=12                   name=con_city size="20"></TD></TR>              <TR>                <TD><INPUT size=10 value=" State " name=""> <INPUT tabIndex=13                   size=2 name=con_state> <INPUT size=4 value=" Zip" name="">                   <INPUT tabIndex=14 size=7 name=con_zip></TD></TR>              <TR>                <TD><INPUT size=10 value=" Phone" name="">                 <INPUT tabIndex=15                   name=con_phone size="20"></TD></TR>              <TR>                <TD><INPUT size=10 value=" Fax" name="">                 <INPUT tabIndex=16                   name=con_fax size="20"></TD></TR>              <TR>                <TD><INPUT size=10 value=" Email" name="">                 <INPUT tabIndex=17                   name=con_email size="20"></TD></TR></TBODY></TABLE></TD>          <TD></TD>          <TD>            <TABLE cellSpacing=0 cellPadding=0 border=0>              <TBODY>              <TR><BR><FONT face=ARIAL size=2><B>Customers Information</B></FONT>                 <TD><INPUT size=10 value=" Name" name="">                 <INPUT tabIndex=18                   name=cust_name size="20"></TD></TR>              <TR>                <TD><INPUT size=10 value=" Address" name="">                 <INPUT                   tabIndex=19 name=cust_address size="20"></TD></TR>              <TR>                <TD><INPUT size=10 value=" City" name="">                 <INPUT tabIndex=20                   name=cust_city size="20"></TD></TR>              <TR>                <TD><INPUT size=10 value=" State " name=""> <INPUT tabIndex=21                   size=2 name=cust_state> <INPUT size=4 value=" Zip" name="">                   <INPUT tabIndex=22 size=7 name=cust_zip></TD></TR>              <TR>                <TD><INPUT size=10 value=" Phone" name="">                 <INPUT tabIndex=23                   name=cust_phone size="20"></TD></TR>              <TR>                <TD><INPUT size=10 value=" Alt. Phone" name="">                 <INPUT                   tabIndex=24 name=cust_alt_phone size="20"></TD></TR>              <TR>                <TD><INPUT size=10 value=" Cell Phone" name="">                 <INPUT                   tabIndex=25       name=cust_cell size="20"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR><BR><FONT face=ARIAL size=2><B>Flat Rate :</B></FONT> <FONT           face=ARIAL size=-3>( If using Flat Rate don&#39;t fill in the &quot;Hourly Rate&quot; or any &quot;Material Costs&quot;)</FONT>           <TD><INPUT size=59 value=" What is the Flat Rate Amount ? "             name=""><INPUT tabIndex=26 size=10 value=" "         name=flat_rate></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR><FONT face=ARIAL size=2><B>Hourly Rate :</B></FONT> <FONT           face=ARIAL size=-3>( If using Hourly Rate don&#39;t fill in &quot;Flat Rate&quot; )</FONT>           <TD><INPUT size=59             value=" (Senior Tech) How long did it take to complete this Job ?"             name=""><INPUT tabIndex=27 size=10 value=" "         name=worked1></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59             value=" Enter the total amount per hour for the Senior Tech/s"             name=""><INPUT tabIndex=28 size=10 value=" "         name=labor_per_hour1></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR><!--In a number of places, this string will NOT allow user input or make any changes. "this.blur()" onFocus="this.blur()"-->          <TD><INPUT size=59 value=" Sub Total for the Labor Cost"             name=""><INPUT onfocus=this.blur() onclick=this.blur() tabIndex=0             size=10 value=" " name=labor1></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59             value=" (Assistant) How long did it take to complete this Job ?"             name=""><INPUT tabIndex=29 size=10 value=" "         name=worked2></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59             value=" Enter the total amount per hour for the Assistant Tech/s"             name=""><INPUT tabIndex=30 size=10 value=" "         name=labor_per_hour2></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59 value=" Sub Total for the Labor Cost"             name=""><INPUT onfocus=this.blur() onclick=this.blur() tabIndex=0             size=10 value=" " name=labor2></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59 value=" Was there a Trip Charge ?" name=""><INPUT             tabIndex=31 size=10 value=" " name=trip_charge></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR><FONT face=ARIAL size=2><B>Describe the Material that was used to Repair the Product :</B></FONT>           <TD><INPUT tabIndex=32 size=59 value=" " name=part_1><INPUT             tabIndex=33 size=10 value=" " name=p1></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT tabIndex=34 size=59 value=" " name=part_2><INPUT             tabIndex=35 size=10 value=" " name=p2></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT tabIndex=36 size=59 value=" " name=part_3><INPUT             tabIndex=37 size=10 value=" " name=p3></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT tabIndex=38 size=59 value=" " name=part_4><INPUT             tabIndex=39 size=10 value=" " name=p4></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT tabIndex=40 size=59 value=" " name=part_5><INPUT             tabIndex=41 size=10 value=" " name=p5></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT tabIndex=42 size=59 value=" " name=part_6><INPUT             tabIndex=43 size=10 value=" " name=p6></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT tabIndex=44 size=59 value=" " name=part_7><INPUT             tabIndex=45 size=10 value=" " name=p7></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT tabIndex=46 size=59 value=" " name=part_8><INPUT             tabIndex=47 size=10 value=" " name=p8></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR><FONT face=ARIAL size=2><B>Product/s Replaced : ( Not Repaired )</B></FONT>           <TD><INPUT tabIndex=48 size=59 value=" " name=rpl_1><INPUT             tabIndex=49 size=10 value=" " name=rpl_cost1></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT tabIndex=50 size=59 value=" " name=rpl_2><INPUT             tabIndex=51 size=10 value=" " name=rpl_cost2></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR><FONT face=ARIAL size=2><B>Calculations :</B></FONT> <!--Start Material Costs-->          <TD><INPUT size=59 value=" Material Sub Total" name=""><INPUT             onfocus=this.blur() onclick=this.blur() tabIndex=0 size=10             name=cost2></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT type=hidden size=59 value=" " name=""><INPUT type=hidden             size=10 value=" " name=unformatted2></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59 value=" What is the Local Sales Tax Percentage ?"             name=""><INPUT tabIndex=52 size=7 value=" .0" name=tax2>         %</TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT type=hidden size=59 name=""><INPUT tabIndex=56             type=hidden size=10 value=" " name=formatted2></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59 value=" Total of the Material Costs"             name=""><INPUT onfocus=this.blur() onclick=this.blur() tabIndex=0             size=10 value=" " name=material_cost2></TD></TR></TBODY></TABLE><!--End Material Costs--><!--Start Labor Cost-->      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59 value=" Labor Sub Total" name=""><INPUT             onfocus=this.blur() onclick=this.blur() tabIndex=0 size=10 value=" "             name=cost1></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT type=hidden size=59 value=" " name=""><INPUT type=hidden             size=10 value=" " name=unformatted1></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59 value=" What is the Local Labor Tax Percentage ?"             name=""><INPUT tabIndex=53 size=7 value=" .0" name=tax1>         %</TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT type=hidden size=59 name=""><INPUT tabIndex=56             type=hidden size=10 value=" " name=formatted1></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59 value=" Total of the Labor Costs" name=""><INPUT             onfocus=this.blur() onclick=this.blur() tabIndex=0 size=10 value=" "             name=labor_cost1></TD></TR></TBODY></TABLE><!--End Labor Cost-->      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59             value=" Enter the Amount Receved for the Deductable" name=""><INPUT             tabIndex=54 size=10 value=" " name=ded></TD></TR></TBODY></TABLE>      <TABLE border=0>        <TBODY>        <TR>          <TD><INPUT size=59 value=" TOTAL" name=""><INPUT onfocus=this.blur()             onclick=this.blur() tabIndex=0 size=10 value=" "         name=total></TD></TR></TBODY></TABLE>      <CENTER>      <p></p>      </CENTER></TD></TR></TBODY></TABLE><P><P><CENTER><INPUT onclick=calclabor(),calcmaterial(),compute(),calctotal() type=button value=CALCULATE> <INPUT onclick=resetIt() type=reset value=RESET> <INPUT onclick=javascript:window.print() type=button value=" PRINT PAGE "><P><INPUT type=submit value="SEND TO BILLING"></B></CENTER></FORM></P><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->