我该如何处理销售退货和SQL Server数据库中的销售(现金和安装)? [英] How can I handle Sales Returns & Sales (Cash & Installment) in SQL Server Database?

查看:76
本文介绍了我该如何处理销售退货和SQL Server数据库中的销售(现金和安装)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个数据库:





http://social.msdn.microsoft.com/Forums/getfile/397664 [ ^ ]





我这样的情景:



客户A在1/1上购买了1,000美元的产品,&支付500美元,然后他返回产品600美元。



因此,这个客户的总金额将是400,&他支付500美元,分期付款剩余金额







如何在SQL中处理这种情况服务器数据库



更新:



我的数据库表格如下:



< img src =http://i43.tinypic.com/2s7gwn5.jpg border =0alt =图片和视频托管由TinyPic>< / img>



并且有数据样本它:



< img src =http:/ /i40.tinypic.com/6fa06w.jpgborder =0alt =图片和视频托管由TinyPic>< / img>





我的意思是所以,这个客户的总金额将是400,并且他支付500美元,分期付款的剩余金额是一些客户支付的金额 - 不是这个case - 分期付款

Hi, I have this Database:


http://social.msdn.microsoft.com/Forums/getfile/397664[^]


My scenario like that:

Customer A has purchased products by $ 1,000 on 1/1, & pay $ 500, then he returned products by $ 600.

So , the total amount of this customer will be 400, & he pay $ 500 , The remaining amount in installments



How can I handle this scenario in SQL server database

Updated:

My database tables like that:

<img src="http://i43.tinypic.com/2s7gwn5.jpg" border="0" alt="Image and video hosting by TinyPic"></img>

And there is sample for data in it:

<img src="http://i40.tinypic.com/6fa06w.jpg" border="0" alt="Image and video hosting by TinyPic"></img>


And I mean by "So , the total amount of this customer will be 400, & he pay $ 500 , The remaining amount in installments" that some customers pay there amount - not this case - in installments

推荐答案

1,000 on 1/1,& ;支付
1,000 on 1/1, & pay


500,然后他返回产品
500, then he returned products by


600。



所以,这个客户的总金额将是400,&他支付
600.

So , the total amount of this customer will be 400, & he pay


这篇关于我该如何处理销售退货和SQL Server数据库中的销售(现金和安装)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆