本文解答了关于《收到返利核算会计分录》相关内容,同时关于1、收到返利核算会计分录怎么写,2、收到返利核算会计分录怎么做,3、收到返利核算会计分录怎么处理,4、收到返利的会计分录,5、收到返利会计处理,的相关问答本篇文章福途教育网小编也整理了进来,希望对您有帮助。
收到返利核算会计分录
String resultPayback = "";
// 根据余额(CR/DR)、发出方、收入方,分别生成一条会计分录:
if (payback.getPaymentType().equals(LedgerConstant.PaymentType.PAYMENT_IN.getIndex())){
//借-应付账款(收入方)
resultPayback =buildAccount(LedgerConstant.AccountCode.PaymentAccountdr.getCode(), payback.getAmount());
//贷-预付账款(发出方)
resultPayback = resultPayback +buildAccount(LedgerConstant.AccountCode.PrepaymentMindr.getCode(), payback.getAmount());
}else if (payback.getPaymentType().equals(LedgerConstant.PaymentType.PAYMENT_OUT.getIndex())) {
//借-预付账款(发出方)
resultPayback =buildAccount(LedgerConstant.AccountCode.PrepaymentMindr.getCode(), payback.getAmount());
//贷-应收账款(收入方)
resultPayback = resultPayback +buildAccount(LedgerConstant.AccountCode.PaymentAccountcr.getCode(), payback.getAmount());
}
return resultPayback;
}
/**
* 支付单,现金账户余额减少(贷方发出方),应付账款增加(借方收入方),
* @param pay
* @return
*/
public static String buildPayAccountSub(Pay pay){
String payAccountTemp = "";
// 根据余额(CR/DR)、发出方、收入方,分别生成一条会计分录:
if (pay.getPaymentType().equals(LedgerConstant.PaymentType.PAYMENT_IN.getIndex())){
//借-应付账款(收入方)
payAccountTemp =buildAccount(LedgerConstant.AccountCode.PaymentAccountdr.getCode(), pay.getTotalAmount());
//贷-现金账户
payAccountTemp = payAccountTemp +buildAccount(LedgerConstant.AccountCode.CashMindr.getCode(), pay.getTotalAmount());
}else if (pay.getPaymentType().equals(LedgerConstant.PaymentType.PAYMENT_OUT.getIndex())) {
//借-现金账户
payAccountTemp =buildAccount(LedgerConstant.AccountCode.CashMindr.getCode(), pay.getTotalAmount());
//贷-应收账款(收入方)
payAccountTemp = payAccountTemp +buildAccount(LedgerConstant.AccountCode.PaymentAccountcr.getCode(), pay.getTotalAmount());
}
return payAccountTemp;
}
/**
* 订单冲回,减少应收款(贷),增加现金(借)
* @param order
* @return
*/
public static String buildOrderzrushAccountSub(Order order){
String orderAccountTemp = "";
if (order.getPaymentType().equals(LedgerConstant.PaymentType.PAYMENT_IN.getIndex())){
//借-(发出方)
orderAccountTemp =buildAccount(LedgerConstant.AccountCode.CashMindr.getCode(), order.getAmount());
//贷-(收入方)
orderAccountTemp = orderAccountTemp +buildAccount(LedgerConstant.AccountCode.IncomeAccountcr.getCode(), order.getAmount());
}else if (order.getPaymentType().equals(LedgerConstant.PaymentType.PAYMENT_OUT.getIndex())) {
//借- (发出方)
orderAccountTemp =buildAccount(LedgerConstant.AccountCode.IncomeAccountdr.getCode(), order.getAmount());
//贷-(收入方)
orderAccountTemp = orderAccountTemp +buildAccount(LedgerConstant.AccountCode.CashMindr.getCode(), order.getAmount());
}
return orderAccountTemp;
}
/**
* 冲回核算会计分录
* @param accountcash
* @return
*/
public static String buildAccountCashSub(AccountCash accountcash) {
String sb = "";
// 根据发出方、收入方,分别生成一条会计分录:
//借-现金账户(发出方)
sb =buildAccount(LedgerConstant.AccountCode.CashMindr.getCode(), accountcash.getAmount());
//贷-(收入方)
sb = sb +buildAccount(accountcash.getAccountCode(), accountcash.getAmount());
return sb;
}
/**
* 会计科目编号和金额
* @param code
* 会计科目编号
* @param amount
* 金额
* @return
*/
public static String buildAccount(String code, BigDecimal amount) {
// 根据会计科目编号和金额生成单条会计分录:code
amount
StringBuffer result = new StringBuffer(code);
result.append("
");
result.append(amount);
result.append(";");
return result.toString();
}
public static void main(String[] args) {
BigDecimal a= new BigDecimal("12.00");
System.out.println(buildAccountCashSub(null));
// System.out.println(buildAccountCashSub().toLowerCase());
}
}
总结:以上是编辑:【梯梯】整理及AI智能原创关于《收到返利核算会计分录
》优质内容解答希望能帮助到您。