Hello,

what about something like this?

2024-02-01 * "Receiving electricity bill and splitting it with 3 well 
owners"
    Liabilities:Payable:Electricity  -1000 EUR    
    Assets:Receivable:Electricity     200 EUR
    well_owner: "owner1"
    Assets:Receivable:Electricity     300 EUR
    well_owner: "owner2"
    Assets:Receivable:Electricity     500 EUR
    well_owner: "owner3"


2024-03-01 * "Paying to electrivity company"
    Assets:BankAcc                 -1000 EUR
    Liabilities:Payable:Electricity   1000 EUR

2024-03-03 * "Getting paid by well owner1"
    Assets:BankAcc                  200 EUR
    Assets:Receivable:Electricity  -200 EUR
    well_owner: "owner1"

2024-03-04 * "Getting paid by well owner2"
    Assets:BankAcc                  300 EUR
    Assets:Receivable:Electricity  -300 EUR
    well_owner: "owner2"

; 2024-03-05 * "Getting paid by well owner3"
;     Assets:BankAcc                  500 EUR
;     Assets:Receivable:Electricity  -500 EUR
;     well_owner: "owner3" 

you can then check for outstanding payments from well owners 

SELECT meta("well_owner") as outstanding, 
sum(position) as outstanding
WHERE meta("well_owner")
GROUP BY
meta("well_owner")
HAVING not empty(sum(position))

you can experiment with it here:

https://colab.research.google.com/drive/1KGGlmfeKpzTsphcO9P9Iizhv-cBqJIOw?usp=drive_link


On Monday, June 10, 2024 at 7:41:54 PM UTC+2 [email protected] wrote:

> Hello,
>
> I'm in charge of managing the expenses of a shared well with 3 buildings.
>
> The well has a single power meter and 3 water meters. Each month I record 
> the power usage and split it according to the effective water usage based 
> on the water meters. Then when I receive the electricity bill I extract the 
> kWh price and assign an euro value to each owner.
>
> I was attempting to model this in beancount but could not wrap my head 
> around it.
>
> Thank you very much,
> Alessio
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/49147181-c7c8-43c7-82a5-bd81dbfc5bdan%40googlegroups.com.

Reply via email to