]> insang Git - newton-cn_pos.git/commitdiff
t
authornewton-cn <insang@kakao.com>
Thu, 24 Apr 2025 05:52:50 +0000 (14:52 +0900)
committernewton-cn <insang@kakao.com>
Thu, 24 Apr 2025 05:52:50 +0000 (14:52 +0900)
.vs/newton-cn/v16/.suo
newton-cn/DBConnector.cs
newton-cn/bin/Release/newton-cn.exe
newton-cn/bin/Release/newton-cn.pdb
newton-cn/obj/Debug/DesignTimeResolveAssemblyReferences.cache
newton-cn/obj/Release/newton-cn.exe
newton-cn/obj/Release/newton-cn.pdb

index 6740bf68e9da35d6c09754a68c5ed6ea54af4af7..71801c8c41c93e9f020c323cc3b3b290a7cfb901 100644 (file)
Binary files a/.vs/newton-cn/v16/.suo and b/.vs/newton-cn/v16/.suo differ
index 031ed1cb0873a927227e6d359002ed4435b4f91d..6f321e68ea2a03805a2743cced1e66b441279acb 100644 (file)
@@ -86,60 +86,62 @@ namespace newton_cn
             string sql = "";
             sql += @"
                 select
-                       CONVERT(CHAR(19), a1.ps_date, 20) as ps_date, a2.ct_code, a2.ct_name+'('+a5.ct_phone+')' as ct_name, a1.ps_prname, cast(a1.ps_qty as int) ps_qty,
-                       cast(
-                               a1.ps_up
-                               +
-                               case when (
-                                       isnull(
-                                               (
-                                                       isnull((select sum(ps_up * ps_qty) from ps where pe_id= a1.pe_id and ps_prcode not in (select pr_code from pr where kind_code= '1100') and ps_prcode not in (select pr_code from pr where kind_code= '1099')), 0)
-                                                       +
-                                                       (
-                                                       select
-                                                               sum(ps_up * ps_qty)/(select count(pe_id) from ps where pe_id= a1.pe_id and ps_prcode not in (select pr_code from pr where kind_code= '1100') and ps_prcode in (select pr_code from pr where kind_code= '1099'))
-                                                       from
-                                                               ps
-                                                       where
-                                                               ps_prcode in (select pr_code from pr where kind_code= '1100') and pe_id= a1.pe_id
-                                                       )
-                                               )
-                                       , 0)
-                               ) < 0 then 
-                               isnull(
-                                       (
-                                               isnull((select sum(ps_up * ps_qty) from ps where pe_id= a1.pe_id and ps_prcode not in (select pr_code from pr where kind_code= '1100') and ps_prcode not in (select pr_code from pr where kind_code= '1099')), 0)
-                                               +
-                                               (
-                                               select
-                                                       sum(ps_up * ps_qty)/(select count(pe_id) from ps where pe_id= a1.pe_id and ps_prcode not in (select pr_code from pr where kind_code= '1100') and ps_prcode in (select pr_code from pr where kind_code= '1099'))
-                                               from
-                                                       ps
-                                               where
-                                                       ps_prcode in (select pr_code from pr where kind_code= '1100') and pe_id= a1.pe_id
-                                               )
-                                       )
-                               , 0) else
-                               0 end
-                       as int) as pe_bamt,
-                       a1.pe_id, a1.ps_no, isnull(a3.is_earn, 0) as is_earn
+                    CONVERT(CHAR(19), a1.ps_date, 20) as ps_date,
+                    a2.ct_code,
+                    a2.ct_name + '(' + a5.ct_phone + ')' as ct_name,
+                    a1.ps_prname,
+                    cast(a1.ps_qty as int) ps_qty,
+                    cast(
+                        a1.ps_up
+                        +
+                        case when (
+                            isnull(
+                                (
+                                    isnull((select sum(ps_up * ps_qty) from ps where pe_id = a1.pe_id and ps_prcode not in (select pr_code from pr where kind_code = '1100') and ps_prcode not in (select pr_code from pr where kind_code in ('1099', '1105', '1106', '1107', '1108'))), 0)
+                                    +
+                                    (
+                                        select
+                                            sum(ps_up * ps_qty) / (select count(pe_id) from ps where pe_id = a1.pe_id and ps_prcode not in (select pr_code from pr where kind_code = '1100') and ps_prcode in (select pr_code from pr where kind_code in ('1099', '1105', '1106', '1107', '1108')))
+                                        from
+                                            ps
+                                        where
+                                            ps_prcode in (select pr_code from pr where kind_code = '1100') and pe_id = a1.pe_id
+                                    )
+                                )
+                            , 0)
+                        ) < 0 then
+                        isnull(
+                            (
+                                isnull((select sum(ps_up * ps_qty) from ps where pe_id = a1.pe_id and ps_prcode not in (select pr_code from pr where kind_code = '1100') and ps_prcode not in (select pr_code from pr where kind_code in ('1099', '1105', '1106', '1107', '1108'))), 0)
+                                +
+                                (
+                                    select
+                                        sum(ps_up * ps_qty) / (select count(pe_id) from ps where pe_id = a1.pe_id and ps_prcode not in (select pr_code from pr where kind_code = '1100') and ps_prcode in (select pr_code from pr where kind_code in ('1099', '1105', '1106', '1107', '1108')))
+                                    from
+                                        ps
+                                    where
+                                        ps_prcode in (select pr_code from pr where kind_code = '1100') and pe_id = a1.pe_id
+                                )
+                            )
+                        , 0) else
+                        0 end
+                    as int) as pe_bamt,
+                    a1.pe_id,
+                    a1.ps_no,
+                    isnull(a3.is_earn, 0) as is_earn
                 from
-                       ps a1
-                       join pe a2
-                               on a1.pe_id= a2.pe_id and a2.ct_code != ''
-                       left join disposable_earn_point_status a3
-                               on a3.pe_id= a1.pe_id and a3.ps_no= a1.ps_no
-                       join ac a4
-                               on a4.pe_id= a1.pe_id and a4.ac_fncd2 not in ('01', '00')
-                    join ct a5
-                               on a5.ct_code= a2.ct_code
+                    ps a1
+                    join pe a2 on a1.pe_id = a2.pe_id and a2.ct_code != ''
+                    left join disposable_earn_point_status a3 on a3.pe_id = a1.pe_id and a3.ps_no = a1.ps_no
+                    join ac a4 on a4.pe_id = a1.pe_id and a4.ac_fncd2 not in ('01', '00')
+                    join ct a5 on a5.ct_code = a2.ct_code
                 where 
-                       a1.ps_prcode in (
-                               select pr_code from pr where kind_code= '1099'
-                       )
-                       and a1.ps_date between '" + selected + @"' and dateadd(day, 1, '" + selected + @"')
+                    a1.ps_prcode in (
+                        select pr_code from pr where kind_code in ('1099', '1105', '1106', '1107', '1108')
+                    )
+                    and a1.ps_date between '" + selected + @"' and dateadd(day, 1, '" + selected + @"')
                 order by
-                       a1.pe_id desc
+                    a1.pe_id desc
             ";
 
             SqlCommand cmd_select = new SqlCommand(sql, conn);
index 1c46f40a9b87e11e00df9aefd4458c79991d4948..7de6975f439d0dae0dd05ca71196e61c7d2a4c9d 100644 (file)
Binary files a/newton-cn/bin/Release/newton-cn.exe and b/newton-cn/bin/Release/newton-cn.exe differ
index 2b9c7d8be2f6a2bcc339afccc9781d5c3d91c175..e671505fd295ce5c109d4c87568fd8c19ca282ce 100644 (file)
Binary files a/newton-cn/bin/Release/newton-cn.pdb and b/newton-cn/bin/Release/newton-cn.pdb differ
index 20575104f3451f2c5f25dcd913946b91b7c61297..0d1b7dbb92109d8a1887ec45cd7a678305f5a39a 100644 (file)
Binary files a/newton-cn/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/newton-cn/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
index 1c46f40a9b87e11e00df9aefd4458c79991d4948..7de6975f439d0dae0dd05ca71196e61c7d2a4c9d 100644 (file)
Binary files a/newton-cn/obj/Release/newton-cn.exe and b/newton-cn/obj/Release/newton-cn.exe differ
index 2b9c7d8be2f6a2bcc339afccc9781d5c3d91c175..e671505fd295ce5c109d4c87568fd8c19ca282ce 100644 (file)
Binary files a/newton-cn/obj/Release/newton-cn.pdb and b/newton-cn/obj/Release/newton-cn.pdb differ