1.增加demo系统,访问地址:https://demo.ciemis.com
2.无成本时报错更为明确
3.库存控制报错更为明确
4.修复销售账单错误
5.标准进价最大价格由10000修改为1000000
6.修复存货核算采购账单和销售账单错误
7.已禁用的物料不再显示
8.修复物料组编辑错误
9.修复库格新建报错
10.修复注塑生产单打印缺失
11.金税接口,支持将excel转为金税的xml文件
12.物料路线编辑权限
13.修复订单打印的兼容性问题
14.Excel支持xlsx(Ms office 2007)文件
15.项目分阶段启动
16.设施管理和供应链模号联动,排产需要指定模号,模具的生产数系统直接统计并提示保养.
17.领料包含委外领料
SHA-1: 985ab1c5e58ef507dbfdae6ba5918233a6c74589
云智系统支持将销售账单生成金税xml文件,在航天和百望两大开票系统中测试通过.
云智系统还支持自定义开票,将excel转为xml文件,本文将介绍此功能.
首先,在云智系统中下载excel模板,在模板上填入增值税发票所开的内容项,其中客户代码为云智系统中的客户代码,需要在系统中维护此客户的开票信息(税号,银行账号).

然后在云智系统中选择此模板文件,点击导入

页面将展示两张发票信息,其中第二张发票里面有两条明细项.
再点击导出,则生产xml文件如下:
<?xml version="1.0" encoding="GBK" ?>
<Kp>
<Version>2.0</Version>
<Fpxx>
<Zsl>2</Zsl>
<Fpsj>
<Fp>
<Djh>B2017061701</Djh>
<Gfmc>PIONEER ELECTRONICS(SHANGHAI EXPORT ZONE)CO.,LTD</Gfmc>
<Gfsh />
<Gfyhzh>外销发票无需资料</Gfyhzh>
<Gfdzdh>电话:</Gfdzdh>
<Bz />
<Fhr>甲</Fhr>
<Skr>乙</Skr>
<Spbmbbh>12.0</Spbmbbh>
<Hsbz>0</Hsbz>
<Sgbz>0</Sgbz>
<Spxx>
<Sph>
<Xh>1</Xh>
<Spmc>门U</Spmc>
<Ggxh>F390LBW80SEP2</Ggxh>
<Jldw>个</Jldw>
<Spbm>1090418990000000000</Spbm>
<Qyspbm />
<Syyhzcbz>0</Syyhzcbz>
<Lslbz />
<Yhzcsm />
<Dj>47.55</Dj>
<Sl>7</Sl>
<Je>332.85</Je>
<Slv>0.17</Slv>
<Kce>0</Kce>
</Sph>
</Spxx>
</Fp>
<Fp>
<Djh>B2017061702</Djh>
<Gfmc>XXXXXXXXXX汽车部件(昆山)有限公司</Gfmc>
<Gfsh>91320583XXXXXXXXX</Gfsh>
<Gfyhzh>农行昆山城东支行5324010XXXXXXXXX</Gfyhzh>
<Gfdzdh>江苏省昆山市开发区XXXXXXXXXX 电话:</Gfdzdh>
<Bz />
<Fhr>甲</Fhr>
<Skr>乙</Skr>
<Spbmbbh>12.0</Spbmbbh>
<Hsbz>0</Hsbz>
<Sgbz>0</Sgbz>
<Spxx>
<Sph>
<Xh>1</Xh>
<Spmc>水槽U</Spmc>
<Ggxh>F060QBU01QP</Ggxh>
<Jldw>个</Jldw>
<Spbm>1090418990000000000</Spbm>
<Qyspbm />
<Syyhzcbz>0</Syyhzcbz>
<Lslbz />
<Yhzcsm />
<Dj>10.09</Dj>
<Sl>3</Sl>
<Je>30.27</Je>
<Slv>0.17</Slv>
<Kce>0</Kce>
</Sph>
<Sph>
<Xh>2</Xh>
<Spmc>控制面板 喷涂</Spmc>
<Ggxh>F80349L04SXP</Ggxh>
<Jldw>个</Jldw>
<Spbm>1090418990000000000</Spbm>
<Qyspbm />
<Syyhzcbz>0</Syyhzcbz>
<Lslbz />
<Yhzcsm />
<Dj>8.6</Dj>
<Sl>23</Sl>
<Je>197.8</Je>
<Slv>0.17</Slv>
<Kce>0</Kce>
</Sph>
</Spxx>
</Fp>
</Fpsj>
</Fpxx>
</Kp>
最后将此xml文件直接导入到金税系统中形成发票.
实现此功能的核心代码如下:
public Kp ReadKp(Stream inputStream)
{
Kp kp = new Kp();
if (inputStream.Length == 0)
{
throw new Exception("Import.Stream.Empty");
}
var workbook = WorkbookFactory.Create(inputStream);
//var book = new XSSFWorkbook(inputStream);
ISheet sheet = workbook.GetSheetAt(0);
IEnumerator rows = sheet.GetRowEnumerator();
#region template 1
ImportHelper.JumpRows(rows, 1);
#region 列定义
int colDjh = 0;//单据号
int colKh = 1;//客户代码
int colBz = 2;//备注
int colSpmc = 3;//商品名称
int colGgxh = 4;//规格型号
int colJldw = 5;//计量
int colSpbm = 6;//商品编码
int colSl = 7;//数量
int colJe = 8;//金额
int colSlv = 9;//税率
#endregion
List<Js> jsList = new List<Js>();
int rowIndex = 0;
int colIndex = 0;
while (rows.MoveNext())
{
Js js = new Js();
rowIndex++;
var row = (IRow)rows.Current;
if (!ImportHelper.CheckValidDataRow(row, 0, 9))
{
break;//边界
}
ICell cell = null;
#region 读取
try
{
js.Djh = ImportHelper.GetCellStringValue(row.GetCell(colDjh));
if (js.Djh == null)
{
break;
}
js.Kh = ImportHelper.GetCellStringValue(row.GetCell(colKh));//客户代码
js.Bz = ImportHelper.GetCellStringValue(row.GetCell(colBz));//备注
js.Spmc = ImportHelper.GetCellStringValue(row.GetCell(colSpmc));//商品名称
js.Ggxh = ImportHelper.GetCellStringValue(row.GetCell(colGgxh));//规格型号
js.Jldw = ImportHelper.GetCellStringValue(row.GetCell(colJldw));//计量单位
js.Spbm = ImportHelper.GetCellStringValue(row.GetCell(colSpbm));//商品编码
js.Sl = ImportHelper.GetCellStringValue(row.GetCell(colSl));//数量
js.Je = ImportHelper.GetCellStringValue(row.GetCell(colJe));//金额
js.Slv = ImportHelper.GetCellStringValue(row.GetCell(colSlv));//税率
if (js.Spmc == null)
{
cell = row.GetCell(colSpmc);
throw new Exception("商品名称不能为空");
}
if (js.Ggxh == null)
{
cell = row.GetCell(colGgxh);
throw new Exception("规格型号不能为空");
}
if (js.Jldw == null)
{
cell = row.GetCell(colJldw);
throw new Exception("计量单位不能为空");
}
if (js.Spbm == null)
{
cell = row.GetCell(colSpbm);
throw new Exception("商品编码不能为空");
}
else if (js.Spbm.Length != 19)
{
cell = row.GetCell(colSpbm);
throw new Exception("商品编码应为19位编码");
}
if (js.Sl == null)
{
cell = row.GetCell(colSl);
throw new Exception("数量不能为空");
}
else
{
double sl = 0;
if (!double.TryParse(js.Sl, out sl))
{
throw new Exception("数量不为数字");
}
if (sl == 0)
{
throw new Exception("数量不能为0");
}
}
if (js.Je == null)
{
cell = row.GetCell(colJe);
throw new Exception("数量不能为空");
}
else
{
double je = 0;
if (!double.TryParse(js.Je, out je))
{
throw new Exception("金额不为数字");
}
}
if (js.Slv == null)
{
cell = row.GetCell(colSlv);
throw new Exception("数量不能为空");
}
else
{
double slv = 0;
if (!double.TryParse(js.Slv, out slv))
{
throw new Exception("税率不为数字");
}
}
}
catch (Exception ex)
{
ImportHelper.ThrowCommonError(rowIndex, colIndex, cell, ex.Message);
}
#endregion
jsList.Add(js);
}
if (jsList.Count == 0)
{
throw new Exception("Import.Result.Error.ImportNothing");
}
#endregion
kp = Js2Kp(jsList);
return kp;
}
private Kp Js2Kp(List<Js> jsList)
{
var jsGroupList = jsList.GroupBy(p => new { p.Djh, p.Kh }).ToList();
//单据号 客户代码 备注 商品名称 规格型号 计量 商品编码 数量 金额 税率
//Djh Kh Bz Spmc Ggxh Jldw Spbm Sl Je Slv
Kp kp = new Kp();
kp.Version = "2.0";
kp.Fpxx = new Fpxx();
kp.Fpxx.Zsl = jsGroupList.Count.ToString();
kp.Fpxx.Fpsj = new List<Fp>();
var plant = this.entityDao.FindById<Plant>("P01");
foreach (var jsGroup in jsGroupList)
{
var fp = new Fp();
fp.Djh = jsGroup.Key.Djh;
fp.Bz = (jsGroup.First().Bz ?? string.Empty);
fp.Gfmc = string.Empty;
fp.Gfsh = string.Empty;
fp.Gfyhzh = string.Empty;
fp.Gfdzdh = string.Empty;
if (jsGroup.Key.Kh != null)
{
var customer = this.entityDao.FindById<Customer>(jsGroup.Key.Kh);
if (customer != null)
{
var billAddress = this.entityDao.FindAll<BillAddress>(" from BillAddress b where b.Party=? ", customer.Code)[0];
fp.Gfsh = billAddress.TaxID != null ? billAddress.TaxID.Trim() : string.Empty;
fp.Gfyhzh = SubStr(billAddress.BankAccount != null ? billAddress.BankAccount.Trim() : "银行账号未维护", 100);
fp.Gfdzdh = SubStr(string.Format("{0} 电话:{1}", billAddress.Address, billAddress.TelephoneNumber), 100);
}
fp.Gfmc = SubStr(customer.Name.Trim(), 100);
}
fp.Fhr = plant.Fhr;
fp.Skr = plant.Skr;
fp.Spbmbbh = "12.0";//商品编码版本号(20字节)(必输项)
fp.Hsbz = "0";//含税标志 0:不含税税率,1:含税税率,2:差额税;中外合作油气田(原海洋石油)5%税率、1.5%税率为1,差额税为2,其他为0;
fp.Sgbz = "0";
fp.Spxx = new List<Sph>();
int i = 1;
foreach (var jsDetail in jsGroup)
{
var sph = new Sph();
sph.Xh = i.ToString(); //序号
sph.Spmc = jsDetail.Spmc; //商品名称,金额为负数时此行是折扣行,折扣行的商品名称应与上一行的商品名称一致(100字节)
sph.Ggxh = jsDetail.Ggxh; //规格型号(40字节)
sph.Jldw = jsDetail.Jldw; //计量单位(32字节)
sph.Spbm = SubStr(jsDetail.Spbm, 19); //商品编码(19字节)(必输项)
sph.Qyspbm = string.Empty; //企业商品编码(20字节)
sph.Syyhzcbz = "0"; //是否使用优惠政策标识0:不使用,1:使用(1字节)
sph.Lslbz = string.Empty; //零税率标识 空:非零税率,0:出口退税,1:免税,2:不征收,3普通零税率(1字节)
sph.Yhzcsm = string.Empty; //优惠政策说明(50字节)
sph.Sl = jsDetail.Sl; //数量
sph.Je = jsDetail.Je; //金额,当金额为负数时为折扣行
sph.Dj = (double.Parse(sph.Je) / double.Parse(sph.Sl)).ToString(); //单价(中外合作油气田(原海洋石油)5%税率,单价为含税单价)
sph.Slv = jsDetail.Slv; //税率
sph.Kce = "0"; //扣除额,用于差额税计算
fp.Spxx.Add(sph);
i++;
}
kp.Fpxx.Fpsj.Add(fp);
}
return kp;
}
public void ResponseXml(Kp kp)
{
var dj = kp.Fpxx.Fpsj[0].Djh;
if (kp.Fpxx.Fpsj.Count > 1)
{
dj += "-" + kp.Fpxx.Fpsj.Last().Djh;
}
StringGBKWriter sw = new StringGBKWriter();
XmlSerializer xz = new XmlSerializer(kp.GetType());
xz.Serialize(sw, kp);
HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + dj + ".xml");
HttpContext.Current.Response.Charset = "GBK";
HttpContext.Current.Response.ContentEncoding = Encoding.GetEncoding("GBK");
HttpContext.Current.Response.ContentType = "text";//image/JPEG;text/HTML;image/GIF;vnd.ms-excel/msword
var nsw = sw.ToString().Replace("<?xml version=\"1.0\" encoding=\"gb2312\"?>", "<?xml version=\"1.0\" encoding=\"GBK\" ?>")
.Replace("<Kp xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">", "<Kp>");
HttpContext.Current.Response.Write(nsw);
HttpContext.Current.Response.End();
}
金税接口参考文件:
增值税发票税控开票软件数据接口规范.doc (114.00 kb)
1.参考物料号导入增加了单位.
2.工作中心废品率可以设置为0.
3.账单
4.财务会计开发增加了票据管理模块,对已完成开发的模块进行了测试
5.修复报验单打印导出bug
6.修复计划外出入单打印导出bug
7.修复不合格品移库bug
8.商品编码由工厂转移至物料组上
9.订单明细页面优化
10.报验单按库存查询(非明细)
11.让步使用无需维护明细
12.让步使用到线边增加防错处理,不在线边的物料不可以让步
SHA-1: a2863d9ed091d96e28294c1383dfe122c6c43d13
- 标准成本报表bug修复,修复底层制造费未包含动力等
- 物料主数据上可以直接维护路线明细中的安全库存,最大库存和单包装
- 替代物料导入
- 无料号采购、销售订单打印
- 无料号采购、销售账单打印
- 固定资产打印
- 删除一些已经废弃的菜单:排序收货,原材料回用报表,非MRP转订单明细、手工MRP下单数、客户计划变化等
SHA-1: 1e1ea15236380bff9fa9bd69a7f590094649172d
以产品507001002(ACTIA_XXXXXXXX装配件)作为示例,系统展现出来的报表如下:
1.成本汇总分析一览表,包含材料,人工,制造,动力,附加,包装,专项和废品率
507001002 |
本层 |
底层 |
合计 |
材料成本 |
0 |
9.2732 |
9.2732 |
人工成本 |
1.25 |
1.2202 |
2.4702 |
制造费用 |
4 |
3.8114 |
7.8114 |
动力 |
0 |
0.5008 |
0.5008 |
附加费用 |
0 |
0 |
0 |
内部包装 |
0 |
0.0269 |
0.0269 |
专项 |
0 |
0 |
0 |
废品率 |
0 |
0 |
0 |
合计 |
5.25 |
14.8325 |
20.0825 |
2.对于直接材料,系统逐级拆分到最底层

3.每道工序直接人工和制造费率

4.动力成本
行 |
工作中心 |
名称 |
动力编码 |
动力名称 |
单价 |
系数 |
额定功率 |
生产节拍 |
产品数 |
机器工时(秒) |
动力金额 |
1 |
15203 |
涂装3#(机械手)(往复机) |
15203 |
涂装3#(机械手)(往复机)_电费(度) |
0.7 |
0.65 |
90 |
130 |
360 |
130 |
0.0041 |
2 |
15106 |
注塑90TB工作中心 |
15106 |
注塑90TB_电费(度) |
0.7 |
0.29 |
17 |
30 |
2 |
30 |
0.0144 |
3 |
15203 |
涂装3#(机械手)(往复机) |
15203 |
涂装3#(机械手)(往复机)_电费(度) |
0.7 |
0.65 |
90 |
130 |
210 |
130 |
0.007 |
4 |
15106 |
注塑90TB工作中心 |
15106 |
注塑90TB_电费(度) |
0.7 |
0.29 |
17 |
30 |
1 |
30 |
0.0288 |
5 |
15111 |
注塑160TA工作中心 |
15111 |
注塑160TA_电费(度) |
0.7 |
0.27 |
25 |
30 |
1 |
30 |
0.0394 |
6 |
15203 |
涂装3#(机械手)(往复机) |
15203 |
涂装3#(机械手)(往复机)_电费(度) |
0.7 |
0.65 |
90 |
120 |
6 |
120 |
0.2275 |
7 |
15108 |
注塑320T工作中心 |
15108 |
注塑320T_电费(度) |
0.7 |
0.28 |
60 |
55 |
1 |
55 |
0.1797 |
5.包装成本
行 |
工作中心 |
名称 |
材料编码 |
材料名称 |
计量单位 |
单包装 |
周转次数 |
单价 |
包装金额 |
1 |
15106 |
注塑90TB工作中心 |
509001004 |
ACTIA_24按键注塑工装件 |
EA |
1 |
50 |
0.3846 |
0.0077 |
2 |
15111 |
注塑160TA工作中心 |
509001005 |
ACTIA_7按键P109708注塑工装件 |
EA |
2 |
50 |
0.3846 |
0.0038 |
3 |
15108 |
注塑320T工作中心 |
509001006 |
ACTIA_前盖底P109708注塑工装件 |
EA |
1 |
50 |
0.3846 |
0.0077 |
4 |
15108 |
注塑320T工作中心 |
509001007 |
ACTIA_前盖上P109708注塑工装件 |
EA |
1 |
50 |
0.3846 |
0.0077 |
6.成本变更日志
