Find Jobs
Hire Freelancers

TSQL Calc Cost of goods Sold (FIFo,AVG ,LIFO)

$250-750 USD

已关闭
已发布将近 6 年前

$250-750 USD

货到付款
I Use Sql server 2012 I have ERP System and I need to calc FIFO,LIFO and Average cost for the inventory Items I have 4 types of transaction 'IN' (Purchase) ,'OUT' Sale ,'INR' Returned Purchase , ''OUTR' for Sales return Database Structure - Items Table ( Has ItemID, And Item Name and Calculation Method ) -Transaction Table (has ItemID,Date,Qty,Price,TransactionCode) I need To calculate the Avg ,Fifo And Lifo after any Update or save in the Transaction table because all data depend on the Transaction Date , for example After Purchase ID ItemID Qty Price TransCode CurrentQty CurrentValue 1 1000 10 10 IN 10 100 2 1000 10 20 IN 20 300 Now Sales with FIFO 3 1000 6 0 Out 14 240 Sales With LIFO 3 1000 6 0 Out 14 180 Sales With Avg 3 1000 6 0 Out 14 210 ----- the Problem Will happen If the Customer Need to Delete the Transaction With ID=1 then I must re Calc All Rows again depend to the change , and this need very fast TSQL Code Please read the article as reference --- [login to view URL] ---- Please download the test data from the [login to view URL] Unzip the file and import the data (consisting of over a million rows) into the Stock table using your method of choice (I used the SQL Server Import Wizard). Run this query SELECT * FROM Stock to view the data
项目 ID: 17465758

关于此项目

7提案
远程项目
活跃6 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
7威客以平均价$298 USD来参与此工作竞价
用户头像
Hi i am expertise in sql please let me know
$250 USD 在3天之内
4.9 (12条评论)
3.9
3.9
用户头像
we can help you regarding your CGS issue. it is very simple and you can do it in a very easy way. thanks.
$250 USD 在1天之内
0.0 (0条评论)
0.0
0.0

关于客户

EGYPT的国旗
Egypt
0.0
0
会员自7月 21, 2015起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。