Ejemplo n.º 1
0
def invoices(invoice_sno=None):
    if invoice_sno is None:
        snos = dxcustoms.get_all_customs_invoice_serialnos()
        stage = {'snos': snos,
                 'crumbroot': '/sourcing',
                 'breadcrumbs': [Crumb(name="Sourcing", path=""),
                                 Crumb(name="Customs", path="customs/"),
                                 Crumb(name="Invoices", path="customs/inv/")],
                 }
        return render_template('customs_invoices.html', stage=stage,
                               pagetitle="Customs Document Sets")
    else:
        sno = serialnos.get_serialno_object(sno=invoice_sno)
        docs = docstore.get_docs_list_for_serialno(invoice_sno)
        invoice = dxcustoms.get_customs_invoice(invoice_sno)
        stage = {'sno': sno,
                 'docs': docs,
                 'invoice': invoice,
                 'crumbroot': '/sourcing',
                 'breadcrumbs': [Crumb(name="Sourcing", path=""),
                                 Crumb(name="Customs", path="customs/"),
                                 Crumb(name="Invoices", path="customs/invoice/"),  # noqa
                                 Crumb(name=invoice_sno, path="customs/invoice/" + invoice_sno)],  # noqa
                 }
        return render_template(
            'customs_invoice_detail.html', stage=stage,
            pagetitle=invoice_sno + " Customs Document Set"
        )
Ejemplo n.º 2
0
def main():
    latest = dxcustoms.get_all_customs_invoice_serialnos(limit=5)
    stage = {'latest': latest,
             'crumbroot': '/sourcing',
             'breadcrumbs': [Crumb(name="Sourcing", path=""),
                             Crumb(name="Customs", path="customs/")],
             }
    return render_template('customs_main.html', stage=stage,
                           pagetitle='Customs')
Ejemplo n.º 3
0
def main():
    latest = dxcustoms.get_all_customs_invoice_serialnos(limit=5)
    stage = {
        'latest':
        latest,
        'crumbroot':
        '/sourcing',
        'breadcrumbs': [
            Crumb(name="Sourcing", path=""),
            Crumb(name="Customs", path="customs/")
        ],
    }
    return render_template('customs_main.html',
                           stage=stage,
                           pagetitle='Customs')
Ejemplo n.º 4
0
def invoices(invoice_sno=None):
    if invoice_sno is None:
        snos = dxcustoms.get_all_customs_invoice_serialnos()
        stage = {
            'snos':
            snos,
            'crumbroot':
            '/sourcing',
            'breadcrumbs': [
                Crumb(name="Sourcing", path=""),
                Crumb(name="Customs", path="customs/"),
                Crumb(name="Invoices", path="customs/inv/")
            ],
        }
        return render_template('customs_invoices.html',
                               stage=stage,
                               pagetitle="Customs Document Sets")
    else:
        sno = serialnos.get_serialno_object(sno=invoice_sno)
        docs = docstore.get_docs_list_for_serialno(invoice_sno)
        invoice = dxcustoms.get_customs_invoice(invoice_sno)
        stage = {
            'sno':
            sno,
            'docs':
            docs,
            'invoice':
            invoice,
            'crumbroot':
            '/sourcing',
            'breadcrumbs': [
                Crumb(name="Sourcing", path=""),
                Crumb(name="Customs", path="customs/"),
                Crumb(name="Invoices", path="customs/invoice/"),  # noqa
                Crumb(name=invoice_sno, path="customs/invoice/" + invoice_sno)
            ],  # noqa
        }
        return render_template('customs_invoice_detail.html',
                               stage=stage,
                               pagetitle=invoice_sno + " Customs Document Set")