You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

353 lines
28 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="report_account_standard_report">
  4. <t t-call="report.html_container">
  5. <t t-foreach="docs" t-as="o">
  6. <t t-call="report.internal_layout">
  7. <div class="page" style="font-size:11px">
  8. <h2 t-field="o.report_id.name"/>
  9. <div class="row">
  10. <div class="col-xs-3">
  11. <strong>Company:</strong>
  12. <p t-field="o.company_id"/>
  13. </div>
  14. <div class="col-xs-3">
  15. <t t-if="o.date_from">
  16. <strong>Start Date :</strong>
  17. <span t-field="o.date_from"/><br/></t>
  18. <t t-if="o.date_to">
  19. <strong>End Date :</strong>
  20. <span t-field="o.date_to"/></t>
  21. </div>
  22. <div class="col-xs-3">
  23. <strong>Target Moves:</strong>
  24. <p t-if="o.target_move == 'all'">All Entries</p>
  25. <p t-if="o.target_move == 'posted'">All Posted Entries</p>
  26. </div>
  27. <div class="col-xs-3">
  28. <strong t-if="o.reconciled == True">With Reconciled Entries</strong>
  29. <strong t-if="o.reconciled == False">Only UnReconciled Entries</strong>
  30. </div>
  31. </div>
  32. <t t-if="o.type_ledger == 'aged'">
  33. <table class="table table-condensed">
  34. <thead>
  35. <tr>
  36. <th class="col-xs-1">Total</th>
  37. <th></th>
  38. <th class="col-xs-1 text-right">Not Due</th>
  39. <th class="col-xs-1 text-right">0-30</th>
  40. <th class="col-xs-1 text-right">30-60</th>
  41. <th class="col-xs-1 text-right">60-90</th>
  42. <th class="col-xs-1 text-right">90-120</th>
  43. <th class="col-xs-1 text-right">Older</th>
  44. <th class="col-xs-1 text-right">Total</th>
  45. </tr>
  46. </thead>
  47. <tbody style="white-space:nowrap">
  48. <tr>
  49. <td class="text-right" colspan="3">
  50. <strong t-esc="o.report_id.line_super_total_id.current" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  51. </td>
  52. <td class="text-right">
  53. <strong t-esc="o.report_id.line_super_total_id.age_30_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  54. </td>
  55. <td class="text-right">
  56. <strong t-esc="o.report_id.line_super_total_id.age_60_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  57. </td>
  58. <td class="text-right">
  59. <strong t-esc="o.report_id.line_super_total_id.age_90_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  60. </td>
  61. <td class="text-right">
  62. <strong t-esc="o.report_id.line_super_total_id.age_120_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  63. </td>
  64. <td class="text-right">
  65. <strong t-esc="o.report_id.line_super_total_id.older" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  66. </td>
  67. <td class="text-right">
  68. <strong t-esc="o.report_id.line_super_total_id.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  69. </td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. <t t-if="not o.summary">
  74. <table class="table-condensed">
  75. <thead>
  76. <tr>
  77. <th class="col-xs-1">Date</th>
  78. <th class="col-xs-1">JRNL</th>
  79. <th class="col-xs-1">Account</th>
  80. <th class="col-xs-1">Journal entries</th>
  81. <!-- <th class="col-xs-3">Ref</th> -->
  82. <th class="col-xs-1">Due Date</th>
  83. <th class="col-xs-1 text-right">Not Due</th>
  84. <th class="col-xs-1 text-right">0-30</th>
  85. <th class="col-xs-1 text-right">30-60</th>
  86. <th class="col-xs-1 text-right">60-90</th>
  87. <th class="col-xs-1 text-right">90-120</th>
  88. <th class="col-xs-1 text-right">Older</th>
  89. <th class="col-xs-1 text-right">Total</th>
  90. <th class="col-xs-1">Match.</th>
  91. </tr>
  92. </thead>
  93. <t t-foreach="o.report_id.report_object_ids" t-as="object">
  94. <tbody t-if="object.line_ids" style="border-bottom: 1px solid;margin-bottom:10px">
  95. <tr style="border-bottom: 1px solid #ddd;">
  96. <td colspan="12">
  97. <strong t-field="object.partner_id"/>
  98. </td>
  99. <td></td>
  100. </tr>
  101. <tr t-foreach="object.line_ids" t-as="l">
  102. <td style="white-space:nowrap">
  103. <strong t-if="l.type_view != 'total'" t-field="l.date"></strong>
  104. <strong t-if="l.type_view == 'total'">Total</strong>
  105. </td>
  106. <td>
  107. <span t-if="l.type_view == 'normal'" t-field="l.journal_id.code"></span>
  108. </td>
  109. <td>
  110. <span t-if="l.type_view == 'normal'" t-field="l.account_id.code"></span>
  111. </td>
  112. <td>
  113. <span t-if="l.type_view == 'normal'" t-field="l.move_id"></span>
  114. </td>
  115. <td>
  116. <span t-if="l.type_view == 'normal'" t-field="l.date_maturity"></span>
  117. </td>
  118. <td class="text-right">
  119. <span t-if="l.current and l.type_view == 'normal'" t-esc="l.current" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  120. <strong t-if="l.current and l.type_view == 'total'" t-esc="l.current" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  121. </td>
  122. <td class="text-right">
  123. <span t-if="l.age_30_days and l.type_view == 'normal'" t-esc="l.age_30_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  124. <strong t-if="l.age_30_days and l.type_view == 'total'" t-esc="l.age_30_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  125. </td>
  126. <td class="text-right">
  127. <span t-if="l.age_60_days and l.type_view == 'normal'" t-esc="l.age_60_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  128. <strong t-if="l.age_60_days and l.type_view == 'total'" t-esc="l.age_60_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  129. </td>
  130. <td class="text-right">
  131. <span t-if="l.age_90_days and l.type_view == 'normal'" t-esc="l.age_90_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  132. <strong t-if="l.age_90_days and l.type_view == 'total'" t-esc="l.age_90_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  133. </td>
  134. <td class="text-right">
  135. <span t-if="l.age_120_days and l.type_view == 'normal'" t-esc="l.age_120_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  136. <strong t-if="l.age_120_days and l.type_view == 'total'" t-esc="l.age_120_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  137. </td>
  138. <td class="text-right">
  139. <span t-if="l.older and l.type_view == 'normal'" t-esc="l.older" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  140. <strong t-if="l.older and l.type_view == 'total'" t-esc="l.older" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  141. </td>
  142. <td class="text-right" style="border-left: 1px dotted #ddd;">
  143. <span t-if="l.type_view == 'normal'" t-esc="l.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  144. <strong t-if="l.type_view == 'total'" t-esc="l.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  145. </td>
  146. <td>
  147. <span t-if="l.reconciled" t-field="l.full_reconcile_id"/>
  148. <span t-if="not l.reconciled and l.full_reconcile_id">*</span>
  149. </td>
  150. </tr>
  151. </tbody>
  152. </t>
  153. </table>
  154. </t>
  155. <t t-if="o.summary">
  156. <table class="table-condensed">
  157. <thead>
  158. <tr>
  159. <th class="col-xs-1">Partner</th>
  160. <th class="col-xs-1 text-right">Not Due</th>
  161. <th class="col-xs-1 text-right">0-30</th>
  162. <th class="col-xs-1 text-right">30-60</th>
  163. <th class="col-xs-1 text-right">60-90</th>
  164. <th class="col-xs-1 text-right">90-120</th>
  165. <th class="col-xs-1 text-right">Older</th>
  166. <th class="col-xs-1 text-right">Total</th>
  167. </tr>
  168. </thead>
  169. <t t-foreach="o.report_id.line_total_ids" t-as="l">
  170. <tr style="border-bottom: 1px solid #ddd">
  171. <td>
  172. <span t-field="l.partner_id"></span>
  173. </td>
  174. <td class="text-right">
  175. <span t-if="l.current" t-esc="l.current" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  176. </td>
  177. <td class="text-right">
  178. <span t-if="l.age_30_days" t-esc="l.age_30_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  179. </td>
  180. <td class="text-right">
  181. <span t-if="l.age_60_days" t-esc="l.age_60_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  182. </td>
  183. <td class="text-right">
  184. <span t-if="l.age_90_days" t-esc="l.age_90_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  185. </td>
  186. <td class="text-right">
  187. <span t-if="l.age_120_days" t-esc="l.age_120_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  188. </td>
  189. <td class="text-right">
  190. <span t-if="l.older" t-esc="l.older" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  191. </td>
  192. <td class="text-right" style="border-left: 1px dotted #ddd;">
  193. <span t-esc="l.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  194. </td>
  195. </tr>
  196. </t>
  197. </table>
  198. </t>
  199. </t>
  200. <t t-if="o.type_ledger != 'aged'">
  201. <table class="table table-condensed">
  202. <thead>
  203. <tr>
  204. <th class="col-xs-1">Total</th>
  205. <th></th>
  206. <th class="col-xs-1 text-right">Debit</th>
  207. <th class="col-xs-1 text-right">Credit</th>
  208. <th class="col-xs-1 text-right">Balance</th>
  209. </tr>
  210. </thead>
  211. <tbody style="white-space:nowrap">
  212. <tr>
  213. <td class="text-right" colspan="3">
  214. <strong t-esc="o.report_id.line_super_total_id.debit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  215. </td>
  216. <td class="text-right">
  217. <strong t-esc="o.report_id.line_super_total_id.credit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  218. </td>
  219. <td class="text-right">
  220. <strong t-esc="o.report_id.line_super_total_id.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  221. </td>
  222. </tr>
  223. </tbody>
  224. </table>
  225. <t t-if="o.summary">
  226. <table class="table-condensed">
  227. <thead>
  228. <tr>
  229. <th class="col-xs-1" t-if="o.type == 'journal'">JRNL</th>
  230. <th class="col-xs-1" t-if="o.type == 'account'">Account</th>
  231. <th class="col-xs-1" t-if="o.type == 'partner'">Partner</th>
  232. <th class="col-xs-1 text-right">Debit</th>
  233. <th class="col-xs-1 text-right">Credit</th>
  234. <th class="col-xs-1 text-right">Balance</th>
  235. </tr>
  236. </thead>
  237. <t t-foreach="o.report_id.line_total_ids" t-as="l">
  238. <tr style="border-bottom: 1px solid #ddd">
  239. <td t-if="o.type == 'journal'">
  240. <span t-field="l.journal_id"></span>
  241. </td>
  242. <td t-if="o.type == 'account'">
  243. <span t-field="l.account_id"></span>
  244. </td>
  245. <td t-if="o.type == 'partner'">
  246. <span t-field="l.partner_id"></span>
  247. </td>
  248. <td class="text-right">
  249. <span t-if="l.debit" t-esc="l.debit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  250. </td>
  251. <td class="text-right">
  252. <span t-if="l.credit" t-esc="l.credit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  253. </td>
  254. <td class="text-right" style="border-left: 1px dotted #ddd;">
  255. <span t-esc="l.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  256. </td>
  257. </tr>
  258. </t>
  259. </table>
  260. </t>
  261. <t t-if="not o.summary">
  262. <table class="table-condensed">
  263. <thead>
  264. <tr>
  265. <th class="col-xs-1">Date</th>
  266. <th class="col-xs-1">JRNL</th>
  267. <th class="col-xs-1">Account</th>
  268. <th class="col-xs-1">Journal entries</th>
  269. <th class="col-xs-3">Ref</th>
  270. <th class="col-xs-3">Partner</th>
  271. <th class="col-xs-1">Due Date</th>
  272. <th class="col-xs-1 text-right">Debit</th>
  273. <th class="col-xs-1 text-right">Credit</th>
  274. <th class="col-xs-1 text-right">Balance</th>
  275. <th class="col-xs-1">Match.</th>
  276. </tr>
  277. </thead>
  278. <t t-foreach="o.report_id.report_object_ids" t-as="object">
  279. <tbody t-if="object.line_ids" style="border-bottom: 1px solid;page-break-inside: avoid">
  280. <tr style="border-bottom: 1px solid #ddd;">
  281. <td colspan="10">
  282. <strong t-if="o.type == 'account'" t-field="object.account_id"/>
  283. <strong t-if="o.type == 'partner'" t-field="object.partner_id"/>
  284. <strong t-if="o.type == 'journal'" t-field="object.journal_id"/>
  285. </td>
  286. <td></td>
  287. </tr>
  288. <tr t-foreach="object.line_ids" t-as="l">
  289. <td style="white-space:nowrap">
  290. <i t-if="l.type_view == 'init' and l.type == '1_init_line'" t-field="l.date"></i>
  291. <i t-if="l.type_view == 'init' and l.type == '0_init'">INIT</i>
  292. <strong t-if="l.type_view == 'total'">Total</strong>
  293. <span t-if="l.type_view == 'normal' and l.type == '2_line'" t-field="l.date"></span>
  294. <span t-if="l.type_view == 'normal' and l.type == '3_compact'">Compact</span>
  295. </td>
  296. <td>
  297. <i t-if="l.type_view == 'init'" t-field="l.journal_id.code"></i>
  298. <span t-if="l.type_view == 'normal'" t-field="l.journal_id.code"></span>
  299. </td>
  300. <td>
  301. <i t-if="l.type_view == 'init'" t-field="l.account_id.code"></i>
  302. <span t-if="l.type_view == 'normal'" t-field="l.account_id.code"></span>
  303. </td>
  304. <td>
  305. <i t-if="l.type_view == 'init'" t-field="l.move_id"></i>
  306. <span t-if="l.type_view == 'normal'" t-field="l.move_id"></span>
  307. </td>
  308. <td>
  309. <i t-if="l.type_view == 'init'" t-field="l.move_line_id.ref"></i>
  310. <span t-if="l.type_view == 'normal'" t-field="l.move_line_id.ref"></span>
  311. </td>
  312. <td>
  313. <i t-if="l.type_view == 'init'" t-field="l.partner_id"></i>
  314. <span t-if="l.type_view == 'normal'" t-field="l.partner_id"></span>
  315. </td>
  316. <td>
  317. <i t-if="l.type_view == 'init'" t-field="l.date_maturity"></i>
  318. <span t-if="l.type_view == 'normal'" t-field="l.date_maturity"></span>
  319. </td>
  320. <td class="text-right">
  321. <span t-if="l.debit and l.type_view == 'normal'" t-esc="l.debit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  322. <i t-if="l.debit and l.type_view == 'init'" t-esc="l.debit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  323. <strong t-if="l.debit and l.type_view == 'total'" t-esc="l.debit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  324. </td>
  325. <td class="text-right">
  326. <span t-if="l.credit and l.type_view == 'normal'" t-esc="l.credit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  327. <i t-if="l.credit and l.type_view == 'init'" t-esc="l.credit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  328. <strong t-if="l.credit and l.type_view == 'total'" t-esc="l.credit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  329. </td>
  330. <td class="text-right" style="white-space:nowrap">
  331. <span t-esc="o.company_currency_id.round(l.cumul_balance) + 0.0" t-if="l.type_view == 'normal'" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  332. <i t-esc="o.company_currency_id.round(l.cumul_balance) + 0.0" t-if="l.type_view == 'init'" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  333. <strong t-esc="o.company_currency_id.round(l.cumul_balance) + 0.0" t-if="l.type_view == 'total'" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
  334. </td>
  335. <td>
  336. <span t-if="l.reconciled" t-field="l.full_reconcile_id"/>
  337. <span t-if="not l.reconciled and l.full_reconcile_id">*</span>
  338. </td>
  339. </tr>
  340. </tbody>
  341. </t>
  342. </table>
  343. </t>
  344. </t>
  345. </div>
  346. </t>
  347. </t>
  348. </t>
  349. </template>
  350. </odoo>