Beispiel #1
0
        // 발행취소
        private void btnCancelIssue_Click(object sender, EventArgs e)
        {
            try
            {
                Response response = cashbillService.CancelIssue(txtCorpNum.Text, txtMgtKey.Text, "발행취소시 메모.", txtUserId.Text);

                MessageBox.Show(response.message);
            }
            catch (PopbillException ex)
            {
                MessageBox.Show(ex.code.ToString() + " | " + ex.Message);
            }
        }
        /*
         * 국세청 전송 이전 "발행완료" 상태의 현금영수증을 "발행취소"하고 국세청 신고 대상에서 제외합니다.
         * - 삭제(Delete API) 함수를 호출하여 "발행취소" 상태의 현금영수증을 삭제하면, 문서번호 재사용이 가능합니다.
         * - https://docs.popbill.com/cashbill/dotnetcore/api#CancelIssue
         */
        public IActionResult CancelIssue()
        {
            // 발행취소할 현금영수증 문서번호
            string mgtKey = "20220527-001";

            // 메모
            string memo = "발행취소 메모";

            try
            {
                var response = _cashbillService.CancelIssue(corpNum, mgtKey, memo);
                return(View("Response", response));
            }
            catch (PopbillException pe)
            {
                return(View("Exception", pe));
            }
        }