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; } } } }