Source incoming :)

This commit is contained in:
deepend committed 2021-12-12 07:06:51 +00:00
1 parent 415f50ce1e
commit 907bf2206f
50 files changed
+2918

No files matched your search

Executable
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env python3
from fosspay.database import db
from fosspay.objects import Invoice
from fosspay.config import _cfg
import sys
if len(sys.argv) != 3:
print(f"Usage: {sys.argv[0]} <amount in cents> <comment>")
sys.exit(1)
amount = int(sys.argv[1])
comment = sys.argv[2]
invoice = Invoice()
invoice.amount = amount
invoice.comment = comment
db.add(invoice)
db.commit()
print(f"{_cfg('protocol')}://{_cfg('domain')}/invoice/{invoice.external_id}")