Files
zszq-trs/YLErpDAL/Model/FinancialVoucherCreator/AROrAPOptionFeeGenerator.cs
T
2024-05-09 14:06:26 +08:00

64 lines
2.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using YLErp.Model.Enum;
namespace YLErp.Model.FinancialVoucherCreator
{
public class AROrAPOptionFeeGenerator
{
public static FinancialStatement GetFinancialStatement(bool isSamePeer, string clientName, bool isBuy, string contractCode, double optionFee)
{
if (isBuy)
{
var financialStatement = new FinancialStatement
{
AbstractTye = FinancialVoucherAbstractEnum.AROrAPOptionFee.GetHashCode(),
Abstract = $"应付{clientName}期权费({contractCode}",
IsSamePeer = isSamePeer
};
financialStatement.Children.Add(new FinancialStatement
{
AccountingSubject = "衍生工具/期权/场外期权/买权/成本",
DebitOrCredit = 0,
DataField = optionFee,
Remark = ""
});
financialStatement.Children.Add(new FinancialStatement
{
AccountingSubject = "其他应付款/应付单位款",
SupplementaryAcountingUnit = clientName,
DebitOrCredit = 1,
DataField = optionFee,
Remark = ""
});
return financialStatement;
}
else
{
var financialStatement = new FinancialStatement
{
AbstractTye = FinancialVoucherAbstractEnum.AROrAPOptionFee.GetHashCode(),
Abstract = $"应收{clientName}期权费({contractCode}",
IsSamePeer = isSamePeer
};
financialStatement.Children.Add(new FinancialStatement
{
AccountingSubject = "其他应收款/应收单位款",
SupplementaryAcountingUnit = clientName,
DebitOrCredit = 0,
DataField = optionFee,
Remark = ""
});
financialStatement.Children.Add(new FinancialStatement
{
AccountingSubject = "衍生工具/期权/场外期权/卖权/成本",
DebitOrCredit = 1,
DataField = optionFee,
Remark = ""
});
return financialStatement;
}
}
}
}