Project

General

Profile

Actions

Bug #9127

open

Chấm dứt hợp đồng

Added by Lại Huy Chức 2 months ago. Updated 2 months ago.

Status:
2.3.Đã xong
Priority:
High
Target version:
Start date:
12/08/2026
Due date:
20/08/2026 (about 2 months late)
% Done:

100%

Estimated time:
Nguồn phát sinh:
Ngày phát sinh:
Người yêu cầu:
Line:
Chung
Phân loại:
Chức năng:
Ưu tiên:
BA:
Tester:
Ngày bàn giao:
Người nhận bàn giao:
Ngày nghiệm thu:
Người nghiệm thu:
Branch name:

Description

create or replace procedure PBH_TH_HH(
b_ma_dvi varchar2,b_so_id number,b_so_id_tt number,b_loi out varchar2)
AS
b_i1 number:=0; b_so_idD number;
b_kieu_kt varchar2(1); b_ma_dl varchar2(20); b_phong varchar2(10); b_ma_nt varchar2(5);
begin
-- Dan - Tong hop so cai hoa hong
delete bh_hd_goc_sc_hh where ma_dvi=b_ma_dvi and so_id_tt=b_so_id_tt and so_id=b_so_id;
select min(ma_nt),nvl(sum(hhong+htro+dvu),0) into b_ma_nt,b_i1 from bh_hd_goc_ttpt where
ma_dvi=b_ma_dvi and so_id=b_so_id and so_id_tt=b_so_id_tt and pt<>'C';
if b_i1=0 then b_loi:=''; return; end if;
select so_id_d,kieu_kt,ma_kt into b_so_idD,b_kieu_kt,b_ma_dl
from bh_hd_goc where ma_dvi=b_ma_dvi and so_id=b_so_id;
if b_kieu_kt not in('M','D') or b_ma_dl=' ' then b_loi:=''; return; end if;
select count(*) into b_i1 from bh_hd_goc_hh_ct where
ma_dvi=b_ma_dvi and so_id_tt=b_so_id_tt and so_id=b_so_id;
if b_i1=0 then
select nvl(min(ngay_ht),0),min(phong) into b_i1,b_phong from bh_hd_goc_hu where ma_dvi=b_ma_dvi and so_id=b_so_id;
if b_i1=0 then
select ngay_ht,phong into b_i1,b_phong from bh_hd_goc_ttps where ma_dvi=b_ma_dvi and so_id_tt=b_so_id_tt;
end if;
insert into bh_hd_goc_sc_hh values(b_ma_dvi,b_so_id,b_so_id_tt,b_phong,b_ma_dl,b_ma_nt,b_i1);
end if;
b_loi:='';
exception when others then if b_loi is null then b_loi:='loi:Loi xu ly PBH_TH_HH:loi'; end if;
end;


Files


Related issues 1 (1 open — 0 closed)

Copied from Bug #8949: Thanh toán đồng bảo hiểm: Lấy xuống lưới nguyên tệ phí theo tiền bảo hiểm được chọn5.HủyLại Huy Chức12/08/2026

Actions
Actions #1

Updated by Lại Huy Chức 2 months ago

  • Copied from Bug #8949: Thanh toán đồng bảo hiểm: Lấy xuống lưới nguyên tệ phí theo tiền bảo hiểm được chọn added
Actions #2

Updated by Lại Huy Chức 2 months ago

  • Status changed from 2.1.Chưa phát triển to 2.2.Đang phát triển
Actions #3

Updated by Lại Huy Chức 2 months ago

  • Status changed from 2.2.Đang phát triển to 2.3.Đã xong
Actions

Also available in: Atom PDF