当前位置: 首页>>代码示例>>C#>>正文


C# Invoice.GetDebtor方法代码示例

本文整理汇总了C#中Invoice.GetDebtor方法的典型用法代码示例。如果您正苦于以下问题:C# Invoice.GetDebtor方法的具体用法?C# Invoice.GetDebtor怎么用?C# Invoice.GetDebtor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Invoice的用法示例。


在下文中一共展示了Invoice.GetDebtor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetInvoiceInfo

    protected void SetInvoiceInfo(Invoice invoice, bool initialSetting)
    {
        string invoiceViewURL = "/Invoice_ViewV2.aspx?invoice_id=" + invoice.InvoiceID;
        lblInvoiceID.Text = "<a href=\"" + invoiceViewURL + "\" onclick=\"open_new_tab('" + invoiceViewURL + "');return false;\">" + invoice.InvoiceID + "</a>";
        lblInvoiceTotal.Text = "$" + invoice.Total.ToString();
        lblInvoiceOwing.Text = "$" + invoice.TotalDue.ToString();
        lblReceiptedTotal.Text = "$" + invoice.ReceiptsTotal.ToString() + (invoice.CreditNotesTotal == 0 ? "" : " &nbsp;&nbsp;($" + invoice.CreditNotesTotal.ToString() + " Credit Noted)") + (invoice.RefundsTotal == 0 ? "" : " &nbsp;&nbsp;($" + invoice.RefundsTotal.ToString() + " Refunds)");
        hiddenInvoiceOwingTotalCents.Value = ((int)(invoice.TotalDue * 100)).ToString();
        hiddenReceiptedAmountTotalCents.Value = ((int)(invoice.ReceiptsTotal * 100)).ToString();
        Page.ClientScript.RegisterStartupScript(this.GetType(), "setamount", "<script language=javascript>if (!is_debugging) document.getElementById('amount').value = '" + invoice.TotalDue.ToString() + "';</script>");
        lblDebtor.Text = invoice.GetDebtor(true);

        if (invoice.Booking != null)
        {
            lblBkDate.Text = invoice.Booking.DateStart.ToString("d MMM, yyyy");
            lblBkOrgText.Text = invoice.Booking.Organisation.IsAgedCare ? "Facility" : "Clinic";
            lblBkOrg.Text = invoice.Booking.Organisation.Name;
        }
        else
        {
            td_bk_date.Visible = false;
            td_bk_org.Visible = false;
        }

        result.InnerHtml          = hiddenResponse.Value;
        merchantReceipt.InnerHtml = (hiddenMerchangeReceipt.Value.Length > 0) ? "<pre>" + hiddenMerchangeReceipt.Value + "</pre>" : string.Empty;
        customerReceipt.InnerHtml = (hiddenCustomerReceipt.Value.Length  > 0) ? "<pre>" + hiddenCustomerReceipt.Value  + "</pre>" : string.Empty;

        btnPrintMerchantReceipt.Style["display"] = hiddenMerchangeReceipt.Value.Length > 0 ? "" : "none";
        btnPrintCustomerReceipt.Style["display"] = hiddenCustomerReceipt.Value.Length  > 0 ? "" : "none";
    }
开发者ID:nblaurenciana-md,项目名称:Websites,代码行数:31,代码来源:TyroPaymentV2.aspx.cs

示例2: SetInvoiceInfo

    protected void SetInvoiceInfo(Invoice invoice)
    {
        bool isDebug = Request["debug"] != null && Request["debug"] == "1";
        bool useOnlyTestItems = false;

        SaveType saveType = Request.QueryString["reftag"] != null ? SaveType.Cancellation : SaveType.Claim;

        string receiptString = string.Empty;
        foreach(Receipt receipt in ReceiptDB.GetByInvoice(invoice.InvoiceID, false))
            receiptString += (receiptString.Length == 0 ? "" : ", ") + "$" + receipt.Total.ToString();

        string invoiceViewURL  = "/Invoice_ViewV2.aspx?invoice_id=" + invoice.InvoiceID;
        lblInvoiceID.Text      = "<a href=\"" + invoiceViewURL + "\" onclick=\"open_new_tab('" + invoiceViewURL + "');return false;\">" + invoice.InvoiceID + "</a>";
        lblInvoiceTotal.Text   = "$" + invoice.Total.ToString();
        lblInvoiceOwing.Text   = "$" + invoice.TotalDue.ToString();
        lblReceiptedTotal.Text = "$" + invoice.ReceiptsTotal.ToString() + (invoice.CreditNotesTotal == 0 ? "" : " &nbsp;&nbsp;($" + invoice.CreditNotesTotal.ToString() + " Credit Noted)") + (invoice.RefundsTotal == 0 ? "" : " &nbsp;&nbsp;($" + invoice.RefundsTotal.ToString() + " Refunds)");
        lblDebtor.Text         = invoice.GetDebtor(true);
        lblBkDate.Text         = invoice.Booking.DateStart.ToString("d MMM, yyyy");
        lblBkOrgText.Text      = invoice.Booking.Organisation.IsAgedCare? "Facility" : "Clinic";
        lblBkOrg.Text          = invoice.Booking.Organisation.Name;

        System.Data.DataTable tbl = DBBase.GetGenericDataTable_WithWhereOrderClause(null, "Field", "field_id=" + invoice.Booking.Provider.Field.ID, "", "field_id", "descr");
        invoice.Booking.Provider.Field = IDandDescrDB.Load(tbl.Rows[0], "field_id", "descr");

        RegisterStaff regStaff = RegisterStaffDB.GetByStaffIDAndOrganisationID(invoice.Booking.Provider.StaffID, invoice.Booking.Organisation.OrganisationID);
        if (regStaff == null)
            throw new CustomMessageException("Staff Member Not Set To This Clinic/Fac.");

        InvoiceLine[] invLines = InvoiceLineDB.GetByInvoiceID(invoice.InvoiceID);
        Hashtable patientHealthCardCache = PatientsHealthCardsCacheDB.GetBullkActive(invLines.Select(x => x.Patient.PatientID).ToArray());

        List<TyroHealthPointClaimIten> claimItems = new List<TyroHealthPointClaimIten>();
        for (int i = 0; i < invLines.Length; i++)
        {
            HealthCard hc = GetHealthCardFromCache(patientHealthCardCache, invLines[i].Patient.PatientID);

            string ptURL  = "PatientDetailV2.aspx?type=view&id=" + invLines[i].Patient.PatientID;
            string ptLink = "<a href=\"" + ptURL + "\" onclick=\"open_new_tab('" + ptURL + "');return false;\">" + invLines[i].Patient.Person.FullnameWithoutMiddlename + "</a>";

            if (hc == null)
                throw new CustomMessageException("No healthcard found for " + ptLink + " (PT-ID:" + invLines[i].Patient.PatientID + ")");
            if (hc.Organisation.OrganisationType.OrganisationTypeID != 150)
                throw new CustomMessageException("Healthcard found for " + ptLink + " (PT-ID:" + invLines[i].Patient.PatientID + ") Is Not An Insurance Card");

            /*
            claim-amount:      claim amount in cents                    - max 10 digits
            service-code:      item number service code                 - max 5  characters
            description:       description of item to appear on receipt - max 32 characters
            service-reference: body part or tooth number suffix         - max 3  characters
            patient-id:        patient ID on card                       - exactly 2 digits
            service-date:      claim date in YYYYMMDD format
            */

            isDebug = true;

            claimItems.Add(new TyroHealthPointClaimIten(
                    ((int)(invLines[i].Price * 100)).ToString(),
                    isDebug ? "F1234" : invLines[i].Offering.TacCompanyCode,
                    isDebug ? "Face"  : invLines[i].AreaTreated,
                    invLines[i].ServiceReference,
                    "",                 // family number on card -- legally they have to enter it themselves
                    isDebug ? DateTime.Today.ToString("yyyyMMdd") : invoice.Booking.DateStart.ToString("yyyyMMdd")));
        }

        //useOnlyTestItems = true;

        // save variables & JSON array on the page accessable to JS to send to Tyro
        if (useOnlyTestItems)
        {
            claimItems = new List<TyroHealthPointClaimIten>();

            claimItems.Add(new TyroHealthPointClaimIten(
                    "10000",
                    "00001",
                    "SKULL XRAY",
                    "01",
                    "02",
                    DateTime.Today.ToString("yyyyMMdd")));

            claimItems.Add(new TyroHealthPointClaimIten(
                    "15000",
                    "00001",
                    "SKULL XRAY",
                    "01",
                    "02",
                    DateTime.Today.ToString("yyyyMMdd")));

            Page.ClientScript.RegisterStartupScript(this.GetType(), "invoice_items",
                @"<script language=javascript>
                var _providerId       = '4237955J';
                var _serviceType      = 'D';
                var _claimItemsCount  = '2';
                var _totalClaimAmount = '25000';
                var _allClaimItems    = " + new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(claimItems) + @";
             </script>");
        }
        else
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "invoice_items",
                @"<script language=javascript>
//.........这里部分代码省略.........
开发者ID:nblaurenciana-md,项目名称:Websites,代码行数:101,代码来源:TyroHealthPointClaimV2.aspx.cs


注:本文中的Invoice.GetDebtor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。