On 12/01/18 13:49, Dr P Nyirenda wrote:
I am finding in FRED that I have to issue new invoice
prefixes now that the year has changed
from 2017 to 2018.
If I do not do this then I get an error :
"Missing invoice prefix"
when I try to add credit to a registrar account using the
#fred-admin --invoice_credit
command
I am having to do this for each zone which is painful because I have 10+ zones.
Then write a simple loop in bash. ;-) Personally I don't see how running even 20
commands once per
year is painful...?
Is there a way to update this automatically when the
year changes ?
Just write the script and cron it...
Having this to be done manually suits my needs and I'd like it to stay as it is.
Money, invoicing, prefixes, banks and so on aren't the same all over the world. So I
guess creating
"one fits all" solution is not so easy.
Additionally, is there a way that I can run the
#fred-admin --invoice_credit
command for a zone and land on the correct prefix every time ?
Isn't it working this way? I mean: each zone should have unique prefix anyway and
based on the zone
of the invoice, FRED selects the correct prefix.
In many cases when I run the command
#fred-admin --invoice_credit
I get the error
DEATAIL: Key (prefix)=(interger) already exits
and I have to run the command a few more times before I land on an interger that the
command accepts>
How can I get around this and land on the correct interger for the command without having
to
repeat it?
I guess this happens because you don't have a unique prefix per zone. Therefore they
overlap sometimes.
Make sure each zone has exactly one unique prefix for 2018.
If you have 20 zones, this can work like this:
fred-admin --invoice_add_prefix --zone_fqdn=one.zone --type=0 --prefix=2018010000
fred-admin --invoice_add_prefix --zone_fqdn=two.zone --type=0 --prefix=2018020000
...
fred-admin --invoice_add_prefix --zone_fqdn=twenty.zone --type=0 --prefix=2018200000
Best regards
Piotr