鐵漢生態(tài)建設(shè)有限公司網(wǎng)站最新黑帽seo培訓(xùn)
NetSuite固定資產(chǎn)模塊一直處于功能迭代更新中,目前23.2的版本能夠支持報表的局部自定義,比如增加原值或已折舊期間,甚至固定資產(chǎn)自定義字段等。但是當(dāng)我們在實際項目中,會遇到一些挑戰(zhàn),例如:
- 固定資產(chǎn)原值字段是增加上了,但是“匯總行”為啥沒有數(shù)值?
- 能否實現(xiàn)“期初、發(fā)生、結(jié)余”的固定資產(chǎn)報表,與資產(chǎn)負(fù)債表相呼應(yīng)?
- 能否調(diào)整格式,因為目前的列都擠在了一起,太難看了。
這些問題都不是可以通過前臺“報表定制”界面實現(xiàn)的。
當(dāng)我們深入分析了代碼后,發(fā)現(xiàn)可以通過UI之下的功能來回應(yīng)上述的需求。
我們來描述一下固定資產(chǎn)報表客制的基本原理。
- 報表客制UI,也就是NetSuite的“Customize FAM Report Template”,可以進行客制字段的數(shù)據(jù)定義,這是客制報表數(shù)據(jù)集的來源。客制字段的命名特征為“_cfN_”。其中N為數(shù)字,代表不同的固定資產(chǎn)報表類型。
- 系統(tǒng)會生成“XML”格式的客制模板,保存在文件柜中。目錄因系統(tǒng)設(shè)定不同,可以在固定資產(chǎn)System Setup中的Report參數(shù)“FOLDER TO USE FOR REPORTING (INTERNAL ID) ”中配置。
- 當(dāng)生成報表時,系統(tǒng)會把相應(yīng)數(shù)據(jù)按照“報表客制表”定義的數(shù)據(jù)源拉出,然后調(diào)用“高級PDF”功能,按照“XML客制模板”進行內(nèi)容輸出?!案呒塒DF”功能就是我們做各類“高級”打印模板的工具。這個工具支持Freemarker,所以能做出很多的變化,包括編程和格式定義。這對我們是至關(guān)重要的。
了解了上述架構(gòu),我們就可以著眼于XML格式的客制模板了。客制完成后,可以在固定資產(chǎn)的System Setup中報表模板中進行選擇。
下面是一個“期初、發(fā)生、結(jié)余”的固定資產(chǎn)報表的模板,供參考。
<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>
?如果有任何關(guān)于NetSuite的問題,歡迎來談。郵箱:service@truston.group