Beispiel #1
0
        async void SendMail(PartnerInvoiceClient partnerInv, bool sendAll)
        {
            var subsApi = new SubscriptionAPI(api);

            busyIndicator.BusyContent = Uniconta.ClientTools.Localization.lookup("SendingWait");
            busyIndicator.IsBusy      = true;
            ErrorCodes result = await subsApi.EmailPartnerInvoice(partnerInv, sendAll);

            busyIndicator.IsBusy = false;

            UtilDisplay.ShowErrorCode(result);
        }
Beispiel #2
0
        async void PostInvoice(PartnerInvoiceClient partnerInv, bool sendAll, string journal)
        {
            var subAPi = new SubscriptionAPI(api);

            busyIndicator.BusyContent = Uniconta.ClientTools.Localization.lookup("BusyMessage");
            busyIndicator.IsBusy      = true;
            ErrorCodes result = await subAPi.PostPartnerInvoice(partnerInv, sendAll, journal);

            busyIndicator.IsBusy = false;

            UtilDisplay.ShowErrorCode(result);
        }
Beispiel #3
0
        async private void ShowInvoice(PartnerInvoiceClient selectedItem)
        {
            var partnerDetails = await GetInvData(selectedItem);

            if (partnerDetails == null)
            {
                return;
            }

            object[] obj = new object[1];
            obj[0] = partnerDetails;

            AddDockItem(TabControls.InvoiceSubscriptionPage, obj, string.Format("{0}: {1}", Uniconta.ClientTools.Localization.lookup("InvoiceNumber"), selectedItem._Invoice));
        }
Beispiel #4
0
        async Task <PartnerInvDetails> GetInvData(PartnerInvoiceClient selecteditem)
        {
            PartnerInvDetails partnerInvDetails = new PartnerInvDetails();

            partnerInvDetails.InvoiceHeader = selecteditem;

            var subscriptionLines = await api.Query <SubscriptionInvoiceClient>(selecteditem);

            partnerInvDetails.InvoiceLines = subscriptionLines;

            var reseller      = selecteditem.Reseller;
            var rSellerClient = await api.Query <ResellerClient>();

            var partner = rSellerClient.Where(p => p.Pid == reseller).SingleOrDefault();

            partnerInvDetails.Reseller    = partner;
            partnerInvDetails.CompanyLogo = await UtilDisplay.GetLogo(api);

            partnerInvDetails.Language = session.User._Language;

            return(partnerInvDetails);
        }