当前位置: 首页 > news >正文

NetSuite 固定资产报表自定义原理及应用

NetSuite固定资产模块一直处于功能迭代更新中,目前23.2的版本能够支持报表的局部自定义,比如增加原值或已折旧期间,甚至固定资产自定义字段等。但是当我们在实际项目中,会遇到一些挑战,例如:

  • 固定资产原值字段是增加上了,但是“汇总行”为啥没有数值?
  • 能否实现“期初、发生、结余”的固定资产报表,与资产负债表相呼应?
  • 能否调整格式,因为目前的列都挤在了一起,太难看了。

这些问题都不是可以通过前台“报表定制”界面实现的。

当我们深入分析了代码后,发现可以通过UI之下的功能来回应上述的需求。

我们来描述一下固定资产报表客制的基本原理。

  • 报表客制UI,也就是NetSuite的“Customize FAM Report Template”,可以进行客制字段的数据定义,这是客制报表数据集的来源。客制字段的命名特征为“_cfN_”。其中N为数字,代表不同的固定资产报表类型。
  • 系统会生成“XML”格式的客制模板,保存在文件柜中。目录因系统设定不同,可以在固定资产System Setup中的Report参数“FOLDER TO USE FOR REPORTING (INTERNAL ID) ”中配置。
  • 当生成报表时,系统会把相应数据按照“报表客制表”定义的数据源拉出,然后调用“高级PDF”功能,按照“XML客制模板”进行内容输出。“高级PDF”功能就是我们做各类“高级”打印模板的工具。这个工具支持Freemarker,所以能做出很多的变化,包括编程和格式定义。这对我们是至关重要的。

了解了上述架构,我们就可以着眼于XML格式的客制模板了。客制完成后,可以在固定资产的System Setup中报表模板中进行选择。

下面是一个“期初、发生、结余”的固定资产报表的模板,供参考。

<head><meta charset="utf-8" /><link name="NotoSansThai" type="font" subtype="opentype" src="NetSuiteFonts/NotoSansThai-Regular.ttf" src-bold="NetSuiteFonts/NotoSansThai-Bold.ttf" src-italic="NetSuiteFonts/NotoSansThai-Regular.ttf" src-bolditalic="NetSuiteFonts/NotoSansThai-Bold.ttf" bytes="2" /><style>body {font-family: Arial, Verdana, Helvetica, NotoSansThai, stsong, msung, mhei, heiseimin, heiseikakugo, hygothic, hysmyeongjo;font-size: 10px;}</style><macrolist><macro id="pagenum"><p align="right">Page <pagenumber/> of <totalpages/></p></macro></macrolist>
</head>
<body size="420mm 297mm" footer="pagenum"><#assign lineIndex = 0><#assign listSize = report.recmachcustrecord_assetregister_repparent?size><#list report.recmachcustrecord_assetregister_repparent as line><#assign lineIndex = lineIndex + 1><#assign lineType = line.custrecord_assetregister_linetype><#if lineType == "sub_header"><p style="font-size: 18px; color: #003399">Asset Register Report</p><table><tr><td colspan="20" style="font-weight: bold; font-size: 12px;"><p align="center">Fixed Assets Management <#if line.custrecord_assetregister_sub != "">- ${line.custrecord_assetregister_sub} <#if line.custrecord_assetregister_currency != "">${line.custrecord_assetregister_currency}</#if></#if></p></td></tr><tr><td colspan="20"><p align="center">${line.custrecord_assetregister_posting}<#if line.custrecord_assetregister_acctgbook != '0'> - ${line.custrecord_assetregister_acctgbook}</#if></p></td></tr><tr><td colspan="20"><p align="center">${line.custrecord_assetregister_altdep} - ${report.custrecord_assetregisterrep_selected}</p></td></tr><tr><td colspan="20"><p align="center">${report.custrecord_assetregisterrep_startdate?string["MMM d, yyyy"]} - ${report.custrecord_assetregisterrep_enddate?string["MMM d, yyyy"]}<br/></p></td></tr><tr><td style="font-weight: bold;" rowspan="2"><p align="left">Asset Type</p></td><td style="font-weight: bold;" rowspan="2"><p align="left">ID</p></td><td style="font-weight: bold;" rowspan="2"><p align="left">Name</p></td><td style="font-weight: bold;" rowspan="2"><p align="left">Depreciation Start Date</p></td><td style="font-weight: bold;" rowspan="2"><p align="left">AL</p></td><td style="font-weight: bold;" rowspan="2"><p align="left">RL</p></td><td style="font-weight: bold;" colspan="3"><p align="center">Beginning Balance</p></td><td style="font-weight: bold;" rowspan="2"><p align="right">Acquisitions</p></td><td style="font-weight: bold;" rowspan="2"><p align="right">Depreciation</p></td><td style="font-weight: bold;" rowspan="2"><p align="right">Transfers</p></td><td style="font-weight: bold;" rowspan="2"><p align="right">Revaluations</p></td><td style="font-weight: bold;" rowspan="2"><p align="right">Disposals</p></td><td style="font-weight: bold;" colspan="3"><p align="center">Ending Balance</p></td></tr><tr><td style="font-weight: bold;"><p align="center">Cost</p></td><td style="font-weight: bold;"><p align="center">Depreciation</p></td><td style="font-weight: bold;"><p align="center">Net Book Value</p></td><td style="font-weight: bold;"><p align="center">Cost</p></td><td style="font-weight: bold;"><p align="center">Depreciation</p></td><td style="font-weight: bold;"><p align="center">Net Book Value</p></td></tr><#elseif lineType == "horizontal_rule"><tr><td colspan="6"></td><td colspan="11" style="border-top-style: solid; border-top-width: 1px;" margin-bottom="1px"> </td></tr><#elseif lineType == "double_horizontal_rule"><tr><td colspan="6"></td><td colspan="11" style="border-top-style: solid; border-top-width: 1px;" margin-bottom="1px"> </td></tr><tr><td colspan="6"></td><td colspan="11" style="border-top-style: solid; border-top-width: 1px;" margin-bottom="4px"> </td></tr></table> <#if lineIndex lt listSize-1><pbr /><br /></#if><#else><tr><#if lineType == "type_header"><td colspan="20" ><br /></td><#else><#if lineType == "type_total"><td colspan="6"> </td><#else><td><p align="left">${line.custrecord_assetregister_assettype}</p></td><td><p align="left">${line.custrecord_assetregister_assetid}</p></td><td><p align="left">${line.custrecord_assetregister_assetname}</p></td><td><p align="left">${line.custrecord_assetregister_deprstartdate}</p></td><td><p align="left">${line.custrecord_assetregister_assetlife}</p></td><td><p align="left">${line.custrecord_assetregister_assetlife-line.custrecord_cf0_assetlifeunits}</p></td></#if><#assign additions = line.custrecord_assetregister_additions><#assign transfers = line.custrecord_assetregister_transfers><#assign revaluation = line.custrecord_assetregister_revaluation><#assign writedown = line.custrecord_assetregister_writedown><#assign sale = line.custrecord_assetregister_sale><#assign disposals = line.custrecord_assetregister_disposals><td><p align="right">${line.custrecord_assetregister_begincost?string["#,##0.00;(#,##0.00)"]}</p></td><td><p align="right">${line.custrecord_assetregister_begindepr?string["#,##0.00;(#,##0.00)"]}</p></td><td><p align="right">${line.custrecord_assetregister_beginbal?string["#,##0.00;(#,##0.00)"]}</p></td><td><p align="right">${line.custrecord_assetregister_additions?string["#,##0.00;(#,##0.00)"]}</p></td><td><p align="right">${line.custrecord_assetregister_depreciation?string["#,##0.00;(#,##0.00)"]}</p></td><td><p align="right">${line.custrecord_assetregister_transfers?string["#,##0.00;(#,##0.00)"]}</p></td><td><p align="right">${(revaluation+writedown)?string["#,##0.00;(#,##0.00)"]}</p></td><td><p align="right">${(line.custrecord_assetregister_sale+line.custrecord_assetregister_disposals)?string["#,##0.00;(#,##0.00)"]}</p></td><td><p align="right">${(line.custrecord_assetregister_begincost+additions-transfers-revaluation-writedown-sale-disposals)?string["#,##0.00;(#,##0.00)"]}</p></td><td><p align="right">${(line.custrecord_assetregister_begindepr+line.custrecord_assetregister_depreciation)?string["#,##0.00;(#,##0.00)"]}</p></td> <td><p align="right">${line.custrecord_assetregister_netbookvalue?string["#,##0.00;(#,##0.00)"]}</p></td></#if></tr></#if></#list><#if report.recmachcustrecord_assetregister_repparent_zerov?size gt 0><br /><p style="font-size: 10px; font-weight: bold">Subsidiaries with zero values</p><#list report.recmachcustrecord_assetregister_repparent_zerov as line><p style="font-size: 10px;">${line.custrecord_assetregister_sub}</p></#list></#if>
</body>

 如果有任何关于NetSuite的问题,欢迎来谈。邮箱:service@truston.group

http://www.lryc.cn/news/228213.html

相关文章:

  • 【复杂网络建模】——基于关联矩阵构建超图网络
  • 学习c#的第八天
  • 我心目中的分布式操作系统
  • 新型的铁塔基站“能源管家”
  • 数字孪生智慧园区:大数据驱动下的运营管理革新
  • sqli-labs关卡12(基于post提交的双引号闭合的字符型注入)通关思路
  • 开放领域问答机器人2——开发流程和方案
  • pandas 常用45个操作方法(详解)
  • PHP判断扫码支付扫码条码支付宝微信区分
  • 一文了解芯片测试项目和检测方法 -纳米软件
  • 【npm 错误】:npm ERR! code ERESOLVE、npm ERR! ERESOLVE could not resolve问题
  • 【FastCAE源码阅读8】调用gmsh生成网格
  • 使用LLM-Tuning实现百川和清华ChatGLM的Lora微调
  • 浏览器标签页之间的通信
  • Semantic Kernel 学习笔记1
  • 图像二值化阈值调整——Triangle算法,Maxentropy方法
  • 监控视频片段合并完整视频|FFmpeg将多个视频片段拼接完整视频|PHP自动批量拼接合并视频
  • client-go controller-runtime kubebuilder
  • 【vue 如何解决响应式丢失】
  • Selenium alert 弹窗处理!
  • 有关自动化的脚本思考 python 按键 javascript
  • CKA认证模块②-K8S企业运维和落地实战-2
  • SpectralDiff论文阅读笔记
  • selenium基本使用、无头浏览器(chrome、FireFox)、搜索标签
  • Html 引入element UI + vue3 报错Failed to resolve component: el-button
  • sen2cor安装
  • 通付盾Web3专题 | SharkTeam:Web3安全实践与创新
  • ARM Linux 基础学习 / Ubuntu 下的包管理 / apt工具
  • springcloudalibaba入门详细使用教程
  • C# DirectoryInfo类的用法