コード例 #1
0
ファイル: invoices.py プロジェクト: rafal-kos/pytis
    def print_invoice(self, id=None):
        c.invoice = Invoice.query.get_or_abort(id)
        c.user = User.query.get(h.auth.user_id())
        c.config = g

        c.invoice.isBooked = True
        c.invoice.save()

        return h.generate_pdf("/prints/invoice.xhtml", "faktura")
コード例 #2
0
ファイル: invoice.py プロジェクト: rafal-kos/pytis
 def print_demand_payment(self, request, queryset):        
     if len(set([invoice.company.id for invoice in queryset])) != 1:
         flash(u'Faktury nie należą do jednego kontrahenta')
         return
     
     c.config = app_globals
     c.invoices = queryset        
     c.sum = sum([round(invoice.brutto_value, 2) for invoice in c.invoices])        
     
     return h.generate_pdf('/prints/demand_payment.html', 'wezwanie_do_zaplaty')        
コード例 #3
0
ファイル: invoices.py プロジェクト: rafal-kos/pytis
    def print_demand_payment(self, id):
        c.invoices = [Invoice.query.get_or_abort(id)]
        c.sum = sum([round(invoice.brutto_value, 2) for invoice in c.invoices])
        c.config = g

        return h.generate_pdf("/prints/demand_payment.html", "wezwanie_do_zaplaty")
コード例 #4
0
ファイル: drivers.py プロジェクト: rafal-kos/pytis
 def print_holiday(self, id):        
     c.holiday = HolidayDocument.query.get_or_abort(id)
     c.config = g
     c.user = User.query.get(h.auth.user_id())
     
     return h.generate_pdf('/prints/holiday_document.xhtml', 'urlopowka')
コード例 #5
0
ファイル: orders.py プロジェクト: rafal-kos/pytis
 def print_transport_order(self, id):
     #c.config = Globals()        
     c.order = Order.query.get_or_abort(id)
     c.user = User.query.get_or_abort(h.auth.user_id())
     
     return h.generate_pdf('/prints/transport_order.xhtml', 'zlecenie_transportowe')               
コード例 #6
0
ファイル: corrects.py プロジェクト: rafal-kos/pytis
 def print_correct(self, id):
     c.user = User.query.get(h.auth.user_id())
     c.config = g
     c.correct = InvoiceCorrect.query.get(id)
     return h.generate_pdf('/prints/correct.xhtml', 'korekta_faktury')
コード例 #7
0
ファイル: delegations.py プロジェクト: rafal-kos/pytis
 def print_delegation(self, id):
     c.delegation = Delegation.query.get_or_abort(id)
     return h.generate_pdf('/prints/delegation.xhtml', 'delegacja')