Package Gnumed :: Package business :: Module gmBilling |
[frames] | no frames]

# Module gmBilling

source code

Billing code.

Copyright: authors

Author: Nico Latzer <nl@mnet-online.de>, Karsten Hilbert <Karsten.Hilbert@gmx.net>

License: GPL v2 or later (details at http://www.gnu.org)

Classes
| cBillable Items which can be billed to patients.
| cBillItem
| cBill Represents a bill

Functions
get_billables(active_only=True, order_by=None, return_pks=False) | source code
create_billable(code=None, term=None, data_source=None, return_existing=False) | source code
delete_billable(pk_billable=None) | source code
get_bill_items(pk_patient=None, non_invoiced_only=False, return_pks=False) | source code
create_bill_item(pk_encounter=None, pk_billable=None, pk_staff=None) | source code
delete_bill_item(link_obj=None, pk_bill_item=None) | source code
get_bills(order_by=None, pk_patient=None, return_pks=False) | source code
get_bills4document(pk_document=None) | source code
create_bill(conn=None, invoice_id=None) | source code
delete_bill(link_obj=None, pk_bill=None) | source code
get_bill_receiver(pk_patient=None) | source code
get_invoice_id(pk_patient=None) | source code
get_scan2pay_data(branch, bill, provider=None, comment=None) Create scan2pay data for generating a QR code. | source code

Variables
| INVOICE_DOCUMENT_TYPE = `'invoice'`

Imports: sys, logging, gmPG2, gmBusinessDBObject, gmTools, gmDateTime, gmDemographicRecord, gmDocuments

Function Details

### get_scan2pay_data(branch, bill, provider=None, comment=None) | source code
    Create scan2pay data for generating a QR code.

    https://www.scan2pay.info
    --------------------------------
    BCD                                                                                                             # (3) fixed, barcode tag
    002                                                                                                             # (3) fixed, version
    1                                                                                                               # (1) charset, 1 = utf8
    SCT                                                                                                             # (3) fixed
    $<praxis_id::BIC//Bank//%(value)s::11>$                                 # (11) <BIC>
    $2<range_of::$<current_provider_name::%(lastnames)s::>$,$<praxis::%(praxis)s::>$::70>2$                 # (70) <Name of beneficiary> "Empfänger" - Praxis
    $<praxis_id::IBAN//Bank//%(value)s::34>$                                # (34) <IBAN>
    EUR$<bill::%(total_amount_with_vat)s::12>$                              # (12) <Amount in EURO> "EUR12.5"
                                                                                                                    # (4) <purpose of transfer> - leer
                                                                                                                    # (35) <remittance info - struct> - only this XOR the next field - GNUmed: leer
    $2<range_of::InvID=$<bill::%(invoice_id)s::>$/Date=$<today::%d.%B %Y::>$::140$>2$       # (140) <remittance info - text> "Client:Marie Louise La Lune" - "Rg Nr, date"
    <beneficiary-to-payor info>                                                             # (70)  "pay soon :-)" - optional - GNUmed nur wenn bytes verfügbar
    --------------------------------
    total: 331 bytes (not chars ! - cave UTF8)
    EOL: LF or CRLF
    last *used* element not followed by anything, IOW can omit pending non-used elements