计算发票
我需要计算方面的帮助:
我需要这样做:
Item ---- Qty ( 2 ) --- Rate ( $2 ) = Total ( $4 )
Item ---- Qty ( 3 ) --- Rate ( $3 ) = Total ( $9 )
SUBTOTAL = $13
SALES TAX (0.07) or (0.7%) = $0.91
TOTAL = $13.91
用代码。
我的伪代码是:
Multiply qty * rate and input in total
subtotal = sum of item totals
sales tax = 0.07 * subtotal
total = sum of subtotal and sales tax
我刚才解释的函数有任何特定的或预制的代码吗?
有什么想法吗?
I need help with a calculation:
I need to do this:
Item ---- Qty ( 2 ) --- Rate ( $2 ) = Total ( $4 )
Item ---- Qty ( 3 ) --- Rate ( $3 ) = Total ( $9 )
SUBTOTAL = $13
SALES TAX (0.07) or (0.7%) = $0.91
TOTAL = $13.91
in code.
my pseudocode is:
Multiply qty * rate and input in total
subtotal = sum of item totals
sales tax = 0.07 * subtotal
total = sum of subtotal and sales tax
Any specific or pre-made code for the function I have just explained?
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想如果你想让一些东西可重复使用,它会是这样的:
I guess if you want to make something re-usable it would look as such :