[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] How to get sum from remote table + how to put in bold?
From: |
Fabrice Niessen |
Subject: |
[O] How to get sum from remote table + how to put in bold? |
Date: |
Sun, 06 Dec 2015 15:16:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) |
Hello,
I'm trying to build a template for invoices written in Org... exporting
to PDF (and HTML). Will be officially public as soon as it's DONE.
Though, I have 2 problems currently:
- I'd like to sum up, in table `total', the sub-total column of table
`items'. But the `remote' call does not seem to accept the `vsum'
expression. Is this a foreseen limitation? Is there a workaround to this?
- I'd like to get the computed amount (last line of `total' table) in bold (and,
if possible, even in a bigger font). How is that doable?
ECM:
--8<---------------cut here---------------start------------->8---
#+TITLE: Invoice #001
#+OPTIONS: H:2 num:nil toc:nil
#+LaTeX_CLASS: article
#+LaTeX_CLASS_OPTIONS: [a4paper,table]
#+LaTeX_HEADER: \usepackage{tabu}
#+LaTeX_HEADER: \taburulecolor{gray}
* Items
#+name: items
#+ATTR_LaTeX: :environment tabu :align lXlrlrrl
| | <35> | | | |
| | |
| Title of job | Description | Type | Rate | |
Quantity | Sub-total | |
|--------------+-------------------------------------+-------+------+-----+----------+-----------+---|
| Consultancy | Quote template | Timed | 400 | \EUR/d |
6.5 | 2600.00 | \EUR |
|--------------+-------------------------------------+-------+------+-----+----------+-----------+---|
| Research | Billing invoice template | Timed | 400 | \EUR/d |
10.0 | 4000.00 | \EUR |
#+TBLFM: $7=$6*400;%.2f
* Amount Due
#+name: total
#+latex: \hfill\colorbox{yellow}{\begin{minipage}{7.5cm}
#+ATTR_LaTeX: :environment tabu :align Xrl
| /Sub-total/ | 0.00 | \EUR |
|------------+------+---|
| /Tax @ 21%/ | 0.00 | \EUR |
|------------+------+---|
| *Amount Due* | 0.00 | *\EUR* |
#+TBLFM:
@1$2=remote(items,vsum(@address@hidden);%.2f::@address@hidden;%.2f::@3$2=vsum(@address@hidden);%.2f
#+latex: \end{minipage}}
--8<---------------cut here---------------end--------------->8---
Any hint for me?
Best regards,
Fabrice
--
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/
- [O] How to get sum from remote table + how to put in bold?,
Fabrice Niessen <=