2021-01-12 14:45:59 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NX.ERP.U8
|
|
|
|
|
|
{
|
|
|
|
|
|
public class FormatHelp
|
|
|
|
|
|
{
|
|
|
|
|
|
public static void GetUnitPriceByTaxCost(double iQuan, double itaxcost, double itaxrate, double iExchRate, out double iprice, out double itaxprice, out double isum)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
var info = new NX.ERP.U8.Account.Accinformation();
|
|
|
|
|
|
iprice = info.FormatMoney(itaxcost / (1.0 + itaxrate / 100.0) * iExchRate * iQuan);
|
|
|
|
|
|
itaxprice = info.FormatMoney(itaxcost / (1.0 + itaxrate / 100.0) * iExchRate * iQuan * (itaxrate / 100.0));
|
|
|
|
|
|
isum = info.FormatMoney(itaxcost * iExchRate * iQuan);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-23 15:06:34 +08:00
|
|
|
|
//public static void GetOriPriceByTaxCost(double iQuan, double itaxcost, double itaxrate, out double iorimoney, out double ioritaxprice, out double iorisum, out double iunitcost)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// try
|
|
|
|
|
|
// {
|
|
|
|
|
|
// var info = new Account.Accinformation();
|
|
|
|
|
|
// iorimoney = info.FormatMoney(itaxcost / (1.0 + itaxrate / 100.0) * iQuan);
|
|
|
|
|
|
// ioritaxprice = info.FormatMoney(itaxcost / (1.0 + itaxrate / 100.0) * iQuan * (itaxrate / 100.0));
|
|
|
|
|
|
// iorisum = info.FormatMoney(itaxcost * iQuan);
|
|
|
|
|
|
// iunitcost = info.FormatUPrice(itaxcost / (1.0 + itaxrate / 100.0));
|
|
|
|
|
|
// }
|
|
|
|
|
|
// catch (Exception)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// throw;
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
2021-01-12 14:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void GetOriPriceByCost(double iQuan, double iunitcost, double itaxrate, out double iorimoney, out double ioritaxprice, out double iorisum, out double itaxcost)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
var info = new Account.Accinformation();
|
2021-03-23 15:06:34 +08:00
|
|
|
|
// iorimoney = info.FormatMoney(iunitcost * iQuan);
|
|
|
|
|
|
ioritaxprice = info.FormatMoney(iunitcost * iQuan * (itaxrate / 100.0f));
|
|
|
|
|
|
iorisum = info.FormatMoney(iunitcost * (1.0f + itaxrate / 100.0f) * iQuan);
|
|
|
|
|
|
itaxcost = info.FormatUPrice(iunitcost * (1.0f + itaxrate / 100.0f));
|
|
|
|
|
|
iorimoney = info.FormatMoney(iorisum - ioritaxprice);
|
2021-01-12 14:45:59 +08:00
|
|
|
|
}
|
|
|
|
|
|
catch (Exception)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void GetUnitPriceByCost(double iQuan, double iunitcost, double itaxrate, double iExchRate, out double iprice, out double itaxprice, out double isum)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
var info = new NX.ERP.U8.Account.Accinformation();
|
2021-03-23 15:06:34 +08:00
|
|
|
|
// iprice = info.FormatMoney(iunitcost * iExchRate * iQuan);
|
|
|
|
|
|
itaxprice = info.FormatMoney(iunitcost * iExchRate * iQuan * (itaxrate / 100.0f));
|
|
|
|
|
|
isum = info.FormatMoney(iunitcost * iExchRate * (1.0f + itaxrate / 100.0f) * iQuan);
|
|
|
|
|
|
iprice = info.FormatMoney(isum - itaxprice);
|
2021-01-12 14:45:59 +08:00
|
|
|
|
}
|
|
|
|
|
|
catch (Exception)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|