本文解答了关于《库存商品结转成本分录》相关内容,同时关于1、库存商品结转成本分录怎么做,2、库存商品结转成本分录0,3、库存商品结转成本分录是什么,4、库存商品结转成本怎么做账,5、库存商品结转成本计算,的相关问答本篇文章福途教育网小编也整理了进来,希望对您有帮助。
库存商品结转成本分录
///
/// 库存簿
/// 商品结转成本
/// 库存商品
/// 账簿
private void GoodsClosing(IList inventoryBook, GoodsClosing goodsClosing, GoodsInfo goodsStock, IList accountBook)
{
//根据主键获取库存账簿
for (int i = 0; i < inventoryBook.Count; i++)
{
//存货科目
if (inventoryBook[i].GoodsCode == goodsStock.GoodsCode && inventoryBook[i].AccountSubjectCode == Constdefine.W8_Goods_Code)
{
accountBook.Add(new AccountBook
{
VoucherCode = goodsClosing.VoucherCode,
AccountSubjectCode = Constdefine.W8_Goods_Code,
DebitAmount = 0,
CreditAmount = goodsClosing.ClosingAmount,
Abstract = goodsClosing.Remark,
DocumentType = DocTypeEunm.商品结转成本
});
break;
}
}
//成本科目
accountBook.Add(new AccountBook
{
VoucherCode = goodsClosing.VoucherCode,
AccountSubjectCode = Constdefine.W3_Goods_Expenses_Code,
DebitAmount = goodsClosing.ClosingAmount,
CreditAmount = 0,
Abstract = goodsClosing.Remark,
DocumentType = DocTypeEunm.商品结转成本
});
}
///
/// 保存或修改凭证
///
/// 凭证
/// 账簿
private void SaveVoucher(Voucher voucher, IList accountBookList)
{
//如果凭证不存在
if (voucher == null) return;
//保存或修改凭证
if (string.IsNullOrEmpty(voucher.VoucherCode))
{
voucher.VoucherCode = vouchersService.AddVoucher(voucher);
}
else
{
vouchersService.UpdateVoucher(voucher);
}
//凭证分录
if (voucher != null && !string.IsNullOrEmpty(voucher.VoucherCode))
{
foreach (AccountBook accountBook in accountBookList)
{
accountBook.VoucherCode = voucher.VoucherCode;
//首次插入
if (string.IsNullOrEmpty(accountBook.AccountBookCode))
{
accountBookService.AddAccountBook(accountBook);
}
else
{
//否则更新
accountBookService.UpdateAccountBook(accountBook);
}
}
}
}
}
}
总结:以上是编辑:【雾儿】整理及AI智能原创关于《库存商品结转成本分录
》优质内容解答希望能帮助到您。