Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,028

HOME > PHP > PHP Forum > ตรงราคารวม VAT ครับช่วยคิดภาษี 7 % ให้หน่อยครับคำนวณยังไงครับ



 

ตรงราคารวม VAT ครับช่วยคิดภาษี 7 % ให้หน่อยครับคำนวณยังไงครับ

 



Topic : 025348



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์




<table width="652" height="78" border="1" align="center" bordercolor="#808080">
<tr bgcolor="#3D6297">
<td width="43" height="19" align="center" bgcolor="#B7B7FF"><b>เลขที่</b></td>
<td width="227" align="center" bgcolor="#B7B7FF"><b>รายการสั่งซื้อ</b></td>
<td width="73" align="center" bgcolor="#B7B7FF"><b>ราคารวม VAT </b></td>
<td width="103" align="center" bgcolor="#B7B7FF"><b>วันที่สั่งซื้อ</b></td>
<td width="101" align="center" bgcolor="#B7B7FF"><b>วันที่สิ้นสุด</b></td>
<td width="32" align="center" bgcolor="#B7B7FF"><b>พิมพ์</b></td>
<td width="27" align="center" bgcolor="#B7B7FF"><b>ลบ</b></td>
</tr>
<?
$cmd_s = "select * from sale where cus_id = '$c_id' and sale_status = 'presale' ";
$result_s = mysql_query($cmd_s,$link);
while($row_s=mysql_fetch_array($result_s))
{
?>
<tr bgcolor="#B2DFFF">
<td align="center" bgcolor="#E8E8FF">
<span class="style7">
<? if($row_s[sale_due] == $fullday) {echo"<b><font size='2' color = 'blue'>$row_s[sale_id]</font></b>"; }else {echo"<font size='2'>$row_s[sale_id]";}?>
</span> </td>
<td align="deafult" bgcolor="#E8E8FF">
<span class="style7">
<?
$n=0;
$cmd_st= "select * from saletemp where sale_id = '$row_s[sale_id]'";$result_st = mysql_query($cmd_st,$link);
while($row_st=mysql_fetch_array($result_st))
{
$cmd_pros = "select * from productstock where pros_id = '$row_st[pros_id]'"; $result_pros = mysql_query($cmd_pros,$link); $row_pros = mysql_fetch_array($result_pros);
$cmd_num = "select * from saletemp where pro_auto = '$row_pros[pro_auto]' and sale_id='$row_s[sale_id]' "; $result_num = mysql_query($cmd_num,$link);
$num = mysql_num_rows($result_num);
$cmd_pro = "select * from product where pro_auto = '$row_pros[pro_auto]'"; $result_pro = mysql_query($cmd_pro,$link); $row_pro = mysql_fetch_array($result_pro);
if($test != $row_st[pro_auto])
{
$n++;
$cost=$row_pro[pro_pricesale]*$num;
if($row_s[sale_due] == $fullday)
{echo"<b><font size='2' color = 'blue'>&nbsp;&nbsp;&nbsp;&nbsp;$n : $row_pro[pro_name] <font size='1' color = 'green'>[ $num ชิ้น $cost bath ]</font><BR>";}
else {echo"<font size='2'>&nbsp;&nbsp;$n : $row_pro[pro_name] <font size='1' color = 'green'>[ $num ชิ้น $cost bath ]</font><BR>";}
}
$test = $row_st[pro_auto];
}
?>
</span> </td>
<td align="center" bgcolor="#E8E8FF">
<span class="style7">
<? if($row_s[sale_due] == $fullday) {echo"<b><font size='2' color = 'blue'>$row_s[sale_cost]</font></b>"; }else {echo"<font size='2'>$row_s[sale_cost]";}?>
</span> </td>
<td align="center" bgcolor="#E8E8FF">
<span class="style7">
<? if($row_s[sale_due] == $fullday) {echo"<b><font size='2' color = 'blue'>$row_s[sale_date]</font></b>"; }else {echo"<font size='1'>$row_s[sale_date]";}?>
</span> </td>
<td align="center" bgcolor="#E8E8FF">
<span class="style7">
<? if($row_s[sale_due] == $fullday) {echo"<b><font size='4' color = 'blue'>$row_s[sale_due]</font></b>"; }else {echo"<font size='1'>$row_s[sale_due]";}?>
</span> </td>
<td align="center" bgcolor="#E8E8FF">
<a href="#" class="style7" onclick="Orderz=window.open('salez.php?<? echo"sale_id=$row_s[sale_id]"?>','Orderz','toolbar=no, status=no,width=550,height=600'); "?>','Orderz','toolbar=no, status=no,width=550,height=600'); "><? echo "<input type='image' src='admin/pic/print.gif'>"; ?></a></td>
<td align="center" bgcolor="#E8E8FF"><span class="style7"><? echo "<a href = 'profile.php?sale_id=$row_s[sale_id]&action=delsale' onclick='Javascript : return confirm(\"คุณแน่ใจที่จะลบข้อมูล ?\")'><img src='admin/pic/delete.gif' border = '0'></a>"; ?></span></td>
</tr>
<?
$sale_id=$row_s[sale_id];
}
?>
</table>




Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-03-11 11:52:17 By : aukkadet View : 3289 Reply : 4
 

 

No. 1



โพสกระทู้ ( 224 )
บทความ ( 0 )



สถานะออฟไลน์
Twitter

ถ้าผมดูไม่ผิด

$row_s[sale_cost] คือราคาที่ไม่รวม vat ใช่ไหมครับ

ถ้าอยากให้เป็นราคาที่รวม vat แล้วก็คูณด้วย 1.07 เข้าไปครับ

ในที่นี้ Vat เป็น 7% นะครับ
Code (PHP)
<?
$sale_cost_vat = $row_s[sale_cost] *1.07 // ราคารวม Vat
?>







Date : 2009-03-11 12:57:34 By : zepherus
 


 

No. 2



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


ERROR ครับ
Date : 2009-03-11 16:26:19 By : aukkadet
 

 

No. 3



โพสกระทู้ ( 224 )
บทความ ( 0 )



สถานะออฟไลน์
Twitter

Code (PHP)
<?php
<table width="652" height="78" border="1" align="center" bordercolor="#808080">
<tr bgcolor="#3D6297">
<td width="43" height="19" align="center" bgcolor="#B7B7FF"><b>เลขที่</b></td>
<td width="227" align="center" bgcolor="#B7B7FF"><b>รายการสั่งซื้อ</b></td>
<td width="73" align="center" bgcolor="#B7B7FF"><b>ราคารวม VAT </b></td>
<td width="103" align="center" bgcolor="#B7B7FF"><b>วันที่สั่งซื้อ</b></td>
<td width="101" align="center" bgcolor="#B7B7FF"><b>วันที่สิ้นสุด</b></td>
<td width="32" align="center" bgcolor="#B7B7FF"><b>พิมพ์</b></td>
<td width="27" align="center" bgcolor="#B7B7FF"><b>ลบ</b></td>
</tr>
<?
$cmd_s = "select * from sale where cus_id = '$c_id' and sale_status = 'presale' ";
$result_s = mysql_query($cmd_s,$link);
while($row_s=mysql_fetch_array($result_s))
{
?>
<tr bgcolor="#B2DFFF">
<td align="center" bgcolor="#E8E8FF">
<span class="style7">
<? if($row_s[sale_due] == $fullday) {echo"<b><font size='2' color = 'blue'>$row_s[sale_id]</font></b>"; }else {echo"<font size='2'>$row_s[sale_id]";}?>
</span> </td>
<td align="deafult" bgcolor="#E8E8FF">
<span class="style7">
<? 
$n=0;
$cmd_st= "select * from saletemp where sale_id = '$row_s[sale_id]'";$result_st = mysql_query($cmd_st,$link);
while($row_st=mysql_fetch_array($result_st))
{
$cmd_pros = "select * from productstock where pros_id = '$row_st[pros_id]'"; $result_pros = mysql_query($cmd_pros,$link); $row_pros = mysql_fetch_array($result_pros);
$cmd_num = "select * from saletemp where pro_auto = '$row_pros[pro_auto]' and sale_id='$row_s[sale_id]' "; $result_num = mysql_query($cmd_num,$link); 
$num = mysql_num_rows($result_num);
$cmd_pro = "select * from product where pro_auto = '$row_pros[pro_auto]'"; $result_pro = mysql_query($cmd_pro,$link); $row_pro = mysql_fetch_array($result_pro);
if($test != $row_st[pro_auto])
{
$n++;
$cost=$row_pro[pro_pricesale]*$num;
if($row_s[sale_due] == $fullday) 
{echo"<b><font size='2' color = 'blue'>&nbsp;&nbsp;&nbsp;&nbsp;$n : $row_pro[pro_name] <font size='1' color = 'green'>[ $num ชิ้น $cost bath ]</font><BR>";}
else {echo"<font size='2'>&nbsp;&nbsp;$n : $row_pro[pro_name] <font size='1' color = 'green'>[ $num ชิ้น $cost bath ]</font><BR>";}
}
$test = $row_st[pro_auto];
}
?>
</span> </td>
<td align="center" bgcolor="#E8E8FF">
<span class="style7">
<? 
if($row_s[sale_due] == $fullday) 
        {
	$sale_cost_vat = $row_s[sale_cost] *1.07;  // เพิ่มภาษี 7% 
	echo"<b><font size='2' color = 'blue'>$sale_cost_vat</font></b>"; 
         }
     else 
        {
         echo"<font size='2'>$sale_cost_vat";
         }
?>
</span> </td>
<td align="center" bgcolor="#E8E8FF">
<span class="style7">
<? if($row_s[sale_due] == $fullday) {echo"<b><font size='2' color = 'blue'>$row_s[sale_date]</font></b>"; }else {echo"<font size='1'>$row_s[sale_date]";}?>
</span> </td>
<td align="center" bgcolor="#E8E8FF">
<span class="style7">
<? if($row_s[sale_due] == $fullday) {echo"<b><font size='4' color = 'blue'>$row_s[sale_due]</font></b>"; }else {echo"<font size='1'>$row_s[sale_due]";}?>
</span> </td>
<td align="center" bgcolor="#E8E8FF">
<a href="#" class="style7" onclick="Orderz=window.open('salez.php?<? echo"sale_id=$row_s[sale_id]"?>','Orderz','toolbar=no,status=no,width=550,height=600'); "?>','Orderz','toolbar=no,status=no,width=550,height=600'); "><? echo "<input type='image' src='admin/pic/print.gif'>"; ?></a></td>
<td align="center" bgcolor="#E8E8FF"><span class="style7"><? echo "<a href = 'profile.php?sale_id=$row_s[sale_id]&action=delsale' onclick='Javascript : return confirm(\"คุณแน่ใจที่จะลบข้อมูล ?\")'><img src='admin/pic/delete.gif' border = '0'></a>"; ?></span></td>
</tr>
<?
$sale_id=$row_s[sale_id];
} 
?>
</table>
?>


ลองดูอีกรอบนะครับ
Date : 2009-03-11 17:18:16 By : zepherus
 


 

No. 4



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


ขอบคุณครับ
Date : 2009-03-12 09:09:26 By : aukkadet
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ตรงราคารวม VAT ครับช่วยคิดภาษี 7 % ให้หน่อยครับคำนวณยังไงครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่