§
    W<Ãjv  ã                   óà  — d Z ddlZddlmc mZ ddlmZ ddl	m
Z
 ddlZ e
e¦  «                             ¦   «         j        d         Zedz  dz  dz  Zej                             e                     ¦   «          d	¬
¦  «        Z ej        d¬¦  «        d„ ¦   «         Zd„ Zd„ Zd„ Zd„ Zedz  dz  dz  Zej                             e                     ¦   «          d¬
¦  «        d„ ¦   «         Zd„ ZdS )uÍ  Kiá»ƒm thá»­ dá»±ng láº¡i dá»± toÃ¡n Cá»‘ng há»™p Ã”ng Ä�Ã¨n â€“ BÃ  Lanh tá»« há»“ sÆ¡ THáº¨M Ä�á»ŠNH (Luáº­t 1: 100% sá»‘ liá»‡u nguá»“n).

Nguá»“n: "02. DToan thanh dinh ba Lanh.xls" (chuyá»ƒn sang xlsx báº±ng Excel COM, khÃ´ng sá»­a ná»™i dung),
Ä‘áº·t táº¡i reports/ong_den/thamdinh_ba_lanh.xlsx. CÃ¡c con sá»‘ ká»³ vá»�ng dÆ°á»›i Ä‘Ã¢y Ä‘á»�c trá»±c tiáº¿p tá»«
sheet "THKP háº¡ng má»¥c" vÃ  "Dá»± tháº§u" cá»§a file Ä‘Ã³, khÃ´ng pháº£i sá»‘ tá»± Ä‘áº·t.
é    N)ÚDecimal)ÚPathé   ÚreportsÚong_denzthamdinh_ba_lanh.xlsxuM   Thiáº¿u file nguá»“n tháº©m Ä‘á»‹nh (dá»¯ liá»‡u khÃ¡ch hÃ ng, khÃ´ng commit))ÚreasonÚmodule)Úscopec                  ó.   — ddl m}   | t          ¦  «        S )Nr   ©Úload_appraised_estimate)Ú)tools.estimation.ong_den_rebuild_estimater   ÚSRCr   s    ú9C:\Projects\DSCons\tests\test_ong_den_estimate_rebuild.pyÚestr      s%   € àQÐQÐQÐQÐQÐQà"Ð"¥3Ñ'Ô'Ð'ó    c                 ó´  — d„ | j         D ¦   «         }t          d¦  «        t          d¦  «        g}||k    }|slt          j        d|fd||f¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }dd|iz  }t          t          j        |¦  «        ¦  «        ‚d x}x}}| j        }d	}t          |¦  «        }||k    }|�st          j        d|fd
||f¦  «        dt          j	        ¦   «         v st          j
        | ¦  «        rt          j        | ¦  «        ndt          j        |¦  «        dt          j	        ¦   «         v st          j
        t          ¦  «        rt          j        t          ¦  «        ndt          j        |¦  «        t          j        |¦  «        dœz  }	dd|	iz  }
t          t          j        |
¦  «        ¦  «        ‚d x}x}x}}d S )Nc                 ó   — g | ]	}|j         ‘Œ
S © )Úrounded_total)Ú.0Úhms     r   ú
<listcomp>z@test_two_work_packages_with_appraised_totals.<locals>.<listcomp>   s   € Ð4Ð4Ð4 ˆBÔÐ4Ð4Ð4r   Ú
6317164000Ú	192220000©ú==)z%(py1)s == %(py4)s)Úpy1Úpy4zassert %(py6)sÚpy6Ú
6509384000)zQ%(py2)s
{%(py2)s = %(py0)s.grand_total
} == %(py8)s
{%(py8)s = %(py4)s(%(py6)s)
}r   r   )Úpy0Úpy2r   r    Úpy8úassert %(py10)sÚpy10)Úpackagesr   Ú
@pytest_arÚ_call_reprcompareÚ	_safereprÚAssertionErrorÚ_format_explanationÚgrand_totalÚ@py_builtinsÚlocalsÚ_should_repr_global_name)r   Ú@py_assert0Ú@py_assert3Ú@py_assert2Ú@py_format5Ú@py_format7Ú@py_assert1Ú@py_assert5Ú@py_assert7Ú@py_format9Ú@py_format11s              r   Ú,test_two_work_packages_with_appraised_totalsr;      s  € à4Ð4 s¤|Ð4Ñ4Ô4Ðe½ÀÑ9NÔ9NÕPWÐXcÑPdÔPdÐ8eÐeÐ4Ð8eÒeÐeÐeÐeÕeÔeÐeÐeÐeÐeÐ4Ð8eÐeÑeÔeÕeÔeÐ4ÑeÔeÕeÔeÐ8eÑeÔeÐeÐeÑeÐeÐeÐeÐeÐeÑeÐeÕeÕeÔeÐeÑeÔeÑeÔeÐeÐeÐeÐeÐeÐeÐeØŒ?Ð3 lÐ3�g lÑ3Ô3Ð3ˆ?Ð3Ò3Ð3Ð3Ñ3Õ3Ô3Ð3Ð3Ð3Ð3ˆ?Ð3Ð3Ñ3Ô3Ð3Õ3Ô3Ñ3Ô3Ð3Ð3Õ3Ô3ˆ3Ñ3Ô3Ð3Õ3Ô3ˆ3Ñ3Ô3Ð3Ð3Õ3Ô3ˆ?Ñ3Ô3Ð3Õ3Ô3Ñ3Ô3Ð3Ð3Õ3Ô3�gÑ3Ô3Ð3Õ3Ô3�gÑ3Ô3Ð3Ð3Õ3Ô3 lÑ3Ô3Õ3Ô3Ð3Ñ3Ô3Ð3Ð3Ñ3Ð3Ð3Ð3Ð3Ð3Ñ3Ð3Õ3Õ3Ô3Ð3Ñ3Ô3Ñ3Ô3Ð3Ð3Ð3Ð3Ð3Ð3Ð3Ð3Ð3Ð3Ð3r   c                 óü  — | j         d         }|j        }d} ||¦  «        }|j        d         }||z
  }t          |¦  «        }d}t	          |¦  «        }	||	k     }
|
�s™t          j        d|
fd||	f¦  «        dt          j        ¦   «         v st          j	        t          ¦  «        rt          j
        t          ¦  «        nddt          j        ¦   «         v st          j	        |¦  «        rt          j
        |¦  «        ndt          j
        |¦  «        t          j
        |¦  «        t          j
        |¦  «        t          j
        |¦  «        t          j
        |¦  «        d	t          j        ¦   «         v st          j	        t          ¦  «        rt          j
        t          ¦  «        nd	t          j
        |¦  «        t          j
        |	¦  «        d
œ
z  }dd|iz  }t          t          j        |¦  «        ¦  «        ‚d x}x}x}x}x}x}x}
x}}	|j        }d} ||¦  «        }|j        d         }||z
  }t          |¦  «        }d}t	          |¦  «        }	||	k     }
|
�s™t          j        d|
fd||	f¦  «        dt          j        ¦   «         v st          j	        t          ¦  «        rt          j
        t          ¦  «        nddt          j        ¦   «         v st          j	        |¦  «        rt          j
        |¦  «        ndt          j
        |¦  «        t          j
        |¦  «        t          j
        |¦  «        t          j
        |¦  «        t          j
        |¦  «        d	t          j        ¦   «         v st          j	        t          ¦  «        rt          j
        t          ¦  «        nd	t          j
        |¦  «        t          j
        |	¦  «        d
œ
z  }dd|iz  }t          t          j        |¦  «        ¦  «        ‚d x}x}x}x}x}x}x}
x}}	|j        }d} ||¦  «        }|j        d         }||z
  }t          |¦  «        }d}t	          |¦  «        }	||	k     }
|
�s™t          j        d|
fd||	f¦  «        dt          j        ¦   «         v st          j	        t          ¦  «        rt          j
        t          ¦  «        nddt          j        ¦   «         v st          j	        |¦  «        rt          j
        |¦  «        ndt          j
        |¦  «        t          j
        |¦  «        t          j
        |¦  «        t          j
        |¦  «        t          j
        |¦  «        d	t          j        ¦   «         v st          j	        t          ¦  «        rt          j
        t          ¦  «        nd	t          j
        |¦  «        t          j
        |	¦  «        d
œ
z  }dd|iz  }t          t          j        |¦  «        ¦  «        ‚d x}x}x}x}x}x}x}
x}}	d S )Nr   ÚvlÚA1Ú1©ú<)zœ%(py12)s
{%(py12)s = %(py0)s((%(py7)s
{%(py7)s = %(py3)s
{%(py3)s = %(py1)s.sum_items
}(%(py5)s)
} - %(py9)s))
} < %(py18)s
{%(py18)s = %(py14)s(%(py16)s)
}ÚabsÚhm1r   )
r"   r   Úpy3Úpy5Úpy7Úpy9Úpy12Úpy14Úpy16Úpy18zassert %(py20)sÚpy20ÚncÚB1ÚmÚC1)r'   Ú	sum_itemsÚthkprB   r   r(   r)   r.   r/   r0   r*   r+   r,   )r   rC   r3   Ú@py_assert4Ú@py_assert6Ú@py_assert8Ú@py_assert10Ú@py_assert11Ú@py_assert15Ú@py_assert17Ú@py_assert13Ú@py_format19Ú@py_format21s                r   Ú0test_item_lines_reconcile_with_thkp_direct_costsr]      s  € à
Œ,�qŒ/€CØŒ}ÐC˜TÐCˆ}ˆ}˜TÑ"Ô"ÐC S¤X¨d¤^ÐCÐ" ^Ñ3ÐC�3Ð3Ñ4Ô4ÐC¸sÐCµw¸s±|´|ÐCÐ4°|ÒCÐCÐCÑCÕCÔCÐCÐCÐCÐCÐ4°|ÐCÑCÔCÐCÕCÔCÑCÔCÐCÐCÕCÔC�3ÑCÔCÐCÕCÔC�3ÑCÔCÐCÐCÐCÕCÔCÑCÔCÐCÐCÕCÔCˆsÑCÔCÐCÕCÔCˆsÑCÔCÐCÐCÕCÔCˆ}ÑCÔCÕCÔC˜TÑCÔCÕCÔCÐ"ÑCÔCÕCÔC ^ÑCÔCÕCÔCÐ4ÑCÔCÐCÕCÔCÑCÔCÐCÐCÕCÔCµwÑCÔCÐCÕCÔCµwÑCÔCÐCÐCÕCÔC¸sÑCÔCÕCÔC°|ÑCÔCÐCÐCÑCÐCÐCÐCÐCÐCÑCÐCÕCÕCÔCÐCÑCÔCÑCÔCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCØŒ}ÐC˜TÐCˆ}ˆ}˜TÑ"Ô"ÐC S¤X¨d¤^ÐCÐ" ^Ñ3ÐC�3Ð3Ñ4Ô4ÐC¸sÐCµw¸s±|´|ÐCÐ4°|ÒCÐCÐCÑCÕCÔCÐCÐCÐCÐCÐ4°|ÐCÑCÔCÐCÕCÔCÑCÔCÐCÐCÕCÔC�3ÑCÔCÐCÕCÔC�3ÑCÔCÐCÐCÐCÕCÔCÑCÔCÐCÐCÕCÔCˆsÑCÔCÐCÕCÔCˆsÑCÔCÐCÐCÕCÔCˆ}ÑCÔCÕCÔC˜TÑCÔCÕCÔCÐ"ÑCÔCÕCÔC ^ÑCÔCÕCÔCÐ4ÑCÔCÐCÕCÔCÑCÔCÐCÐCÕCÔCµwÑCÔCÐCÕCÔCµwÑCÔCÐCÐCÕCÔC¸sÑCÔCÕCÔC°|ÑCÔCÐCÐCÑCÐCÐCÐCÐCÐCÑCÐCÕCÕCÔCÐCÑCÔCÑCÔCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCØŒ}ÐB˜SÐBˆ}ˆ}˜SÑ!Ô!ÐB C¤H¨T¤NÐBÐ! NÑ2ÐB�3Ð2Ñ3Ô3ÐB¸cÐBµg¸c±l´lÐBÐ3°lÒBÐBÐBÑBÕBÔBÐBÐBÐBÐBÐ3°lÐBÑBÔBÐBÕBÔBÑBÔBÐBÐBÕBÔB�3ÑBÔBÐBÕBÔB�3ÑBÔBÐBÐBÐBÕBÔBÑBÔBÐBÐBÕBÔBˆsÑBÔBÐBÕBÔBˆsÑBÔBÐBÐBÕBÔBˆ}ÑBÔBÕBÔB˜SÑBÔBÕBÔBÐ!ÑBÔBÕBÔB NÑBÔBÕBÔBÐ3ÑBÔBÐBÕBÔBÑBÔBÐBÐBÕBÔBµgÑBÔBÐBÕBÔBµgÑBÔBÐBÐBÕBÔB¸cÑBÔBÕBÔB°lÑBÔBÐBÐBÑBÐBÐBÐBÐBÐBÑBÐBÕBÕBÔBÐBÑBÔBÑBÔBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBÐBr   c           	      óÆ  — |                       ¦   «         }|d         }t          j        }d}d} |||¬¦  «        }||k    }|sít          j        d|fd||f¦  «        t          j        |¦  «        dt          j        ¦   «         v st          j        t          ¦  «        rt          j        t          ¦  «        ndt          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }d	d
|iz  }	t          t          j
        |	¦  «        ¦  «        ‚d x}x}x}x}x}}|d         }t          j        }d}d} |||¬¦  «        }||k    }|sít          j        d|fd||f¦  «        t          j        |¦  «        dt          j        ¦   «         v st          j        t          ¦  «        rt          j        t          ¦  «        ndt          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }d	d
|iz  }	t          t          j
        |	¦  «        ¦  «        ‚d x}x}x}x}x}}d S )NÚbe_tong_m250_m3gV-z{@g{®Gáz„?)rB   r   )z[%(py1)s == %(py11)s
{%(py11)s = %(py5)s
{%(py5)s = %(py3)s.approx
}(%(py7)s, abs=%(py9)s)
}Úpytest)r   rD   rE   rF   rG   Úpy11zassert %(py13)sÚpy13Úcot_thep_tang‹lçû©ÑL@)Úkey_quantitiesr`   Úapproxr(   r)   r*   r.   r/   r0   r+   r,   )
r   Úqr1   rS   rT   rU   rV   r3   Ú@py_format12Ú@py_format14s
             r   Ú&test_key_quantities_from_appraised_boqri   '   sž  € Ø×ÒÑÔ€AØÐÔÐC¥6¤=ÐC°ÐC¸dÐC = =°¸dÐ#CÑ#CÔ#CÐCÐÐ#CÒCÐCÐCÐCÕCÔCÐCÐCÐCÐCÐÐ#CÐCÑCÔCÕCÔCÐÑCÔCÐCÕCÔCÑCÔCÐCÐCÕCÔC¥6ÑCÔCÐCÕCÔC¥6ÑCÔCÐCÐCÕCÔC =ÑCÔCÕCÔC°ÑCÔCÕCÔC¸dÑCÔCÕCÔCÐ#CÑCÔCÐCÐCÑCÐCÐCÐCÐCÐCÑCÐCÕCÕCÔCÐCÑCÔCÑCÔCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCÐCØˆ^ÔÐ?¥¤Ð?¨fÐ?¸$Ð?  ¨f¸$Ð ?Ñ ?Ô ?Ð?ÐÐ ?Ò?Ð?Ð?Ð?Õ?Ô?Ð?Ð?Ð?Ð?ÐÐ ?Ð?Ñ?Ô?Õ?Ô?ÐÑ?Ô?Ð?Õ?Ô?Ñ?Ô?Ð?Ð?Õ?Ô?¥Ñ?Ô?Ð?Õ?Ô?¥Ñ?Ô?Ð?Ð?Õ?Ô? Ñ?Ô?Õ?Ô?¨fÑ?Ô?Õ?Ô?¸$Ñ?Ô?Õ?Ô?Ð ?Ñ?Ô?Ð?Ð?Ñ?Ð?Ð?Ð?Ð?Ð?Ñ?Ð?Õ?Õ?Ô?Ð?Ñ?Ô?Ñ?Ô?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?r   c           
      ó  — |                       t          d¦  «        ¦  «        }t          j        }d}d}||z  }d} |||¬¦  «        }||k    }|�s+t	          j        d|fd||f¦  «        dt          j        ¦   «         v st	          j        |¦  «        rt	          j	        |¦  «        ndd	t          j        ¦   «         v st	          j        t          ¦  «        rt	          j	        t          ¦  «        nd	t	          j	        |¦  «        t	          j	        |¦  «        t	          j	        |¦  «        t	          j	        |¦  «        t	          j	        |¦  «        d
œz  }	dd|	iz  }
t          t	          j        |
¦  «        ¦  «        ‚d x}x}x}x}x}x}}d S )NÚ
6482295000l   Øx¿ l   @Qú g•Ö&è.>)Úrelr   )zh%(py0)s == %(py13)s
{%(py13)s = %(py4)s
{%(py4)s = %(py2)s.approx
}((%(py6)s / %(py8)s), rel=%(py11)s)
}Úkr`   )r"   r#   r   r    r$   ra   rb   zassert %(py15)sÚpy15)Úcontract_factorr   r`   re   r(   r)   r.   r/   r0   r*   r+   r,   )r   rm   r2   r7   r8   Ú@py_assert9rV   Ú@py_assert12r6   rh   Ú@py_format16s              r   Útest_contract_discount_factorrs   -   s¨  € Ø×Ò�G LÑ1Ô1Ñ2Ô2€AÝ”Ð@˜jÐ@¨:Ð@˜j¨:Ñ5Ð@¸4Ð@��Ð5¸4Ð@Ñ@Ô@Ð@ˆ1Ð@Ò@Ð@Ð@Ñ@Õ@Ô@Ð@Ð@Ð@Ð@ˆ1Ð@Ð@Ñ@Ô@Ð@Õ@Ô@Ñ@Ô@Ð@Ð@Õ@Ô@ˆ1Ñ@Ô@Ð@Õ@Ô@ˆ1Ñ@Ô@Ð@Ð@Ð@Õ@Ô@Ñ@Ô@Ð@Ð@Õ@Ô@•Ñ@Ô@Ð@Õ@Ô@•Ñ@Ô@Ð@Ð@Õ@Ô@�Ñ@Ô@Õ@Ô@˜jÑ@Ô@Õ@Ô@¨:Ñ@Ô@Õ@Ô@¸4Ñ@Ô@Õ@Ô@Ð@Ñ@Ô@Ð@Ð@Ñ@Ð@Ð@Ð@Ð@Ð@Ñ@Ð@Õ@Õ@Ô@Ð@Ñ@Ô@Ñ@Ô@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@r   zphu_luc_01_02_HD.xlsxu   Thiáº¿u Phá»¥ lá»¥c 01 HÄ�c                 óº  ‡— ddl m}m}  |t          ¦  «        }d„ |D ¦   «         }t	          |¦  «        }d}t          |¦  «        }||z
  }t          |¦  «        }	d}
t          |
¦  «        }|	|k     }|�sët          j        d|fd|	|f¦  «        dt          j
        ¦   «         v st          j        t          ¦  «        rt          j        t          ¦  «        ndd	t          j
        ¦   «         v st          j        t          ¦  «        rt          j        t          ¦  «        nd	t          j        |¦  «        t          j        |¦  «        d
t          j
        ¦   «         v st          j        t
          ¦  «        rt          j        t
          ¦  «        nd
t          j        |¦  «        t          j        |¦  «        t          j        |	¦  «        d
t          j
        ¦   «         v st          j        t
          ¦  «        rt          j        t
          ¦  «        nd
t          j        |
¦  «        t          j        |¦  «        dœz  }dd|iz  }t          t          j        |¦  «        ¦  «        ‚d x}x}x}x}x}x}	x}x}
} || |¦  «        }h d£Šˆfd„|D ¦   «         }|‰k    }|sÂt          j        d|fd|‰f¦  «        dt          j
        ¦   «         v st          j        |¦  «        rt          j        |¦  «        nddt          j
        ¦   «         v st          j        ‰¦  «        rt          j        ‰¦  «        nddœz  }dd|iz  }t          t          j        |¦  «        ¦  «        ‚d }d S )Nr   )Úalign_with_contractÚload_contract_annexc              3   ó&   K  — | ]}|d          V — ŒdS )ÚamountNr   )r   Úhs     r   ú	<genexpr>z5test_alignment_with_contract_annex.<locals>.<genexpr>;   s&   è è € Ð+Ð+ 1�1�X”;Ð+Ð+Ð+Ð+Ð+Ð+r   Ú
6482295379Ú2r@   )z�%(py13)s
{%(py13)s = %(py0)s((%(py5)s
{%(py5)s = %(py1)s(%(py3)s)
} - %(py10)s
{%(py10)s = %(py6)s(%(py8)s)
}))
} < %(py19)s
{%(py19)s = %(py15)s(%(py17)s)
}rB   Úsumr   )r"   r   rD   rE   r    r$   r&   rb   rn   Úpy17Úpy19zassert %(py21)sÚpy21>   úAC.12121úAC.22111úAF.11213úAF.12113úAF.22313úAF.61120úAF.61321úAF.61721c                 óf   •— h | ]-\  }\  }}|¯
|¯|j         ‰v ¯|j        |d          k    ¯&|j         ’Œ.S )Úqty)ÚcoderŠ   )r   Ú_Úitry   Úkeys       €r   ú	<setcomp>z5test_alignment_with_contract_annex.<locals>.<setcomp>>   sL   ø€ ÐeÐeÐe™:˜1™g˜r 1°"Ðe¸Ðe¸r¼wÈ#¸~¸~ÐRTÔRXÐ\]Ð^cÔ\dÒRdÐRdˆrŒwÐRdÐRdÐRdr   r   )z%(py0)s == %(py2)sÚmatchedrŽ   )r"   r#   zassert %(py4)sr   )r   ru   rv   ÚHDr}   r   rB   r(   r)   r.   r/   r0   r*   r+   r,   )r   ru   rv   Úhdr3   rS   r8   rp   rW   rq   Ú@py_assert16Ú@py_assert18Ú@py_assert14Ú@py_format20Ú@py_format22Úpairsr�   r6   Ú@py_format3r4   rŽ   s                       @r   Ú"test_alignment_with_contract_annexrš   5   s•  ø€ àbÐbÐbÐbÐbÐbÐbÐbà	Ð	�RÑ	 Ô	 €Bà+Ð+¨Ð+Ñ+Ô+ÐS�sÐ+Ñ+Ô+ÐS°lÐS­g°lÑ.CÔ.CÐSÐ+Ð.CÑCÐS�3ÐCÑDÔDÐSÈsÐSÅwÈsÁ|Ä|ÐSÐDÀ|ÒSÐSÐSÑSÕSÔSÐSÐSÐSÐSÐDÀ|ÐSÑSÔSÐSÕSÔSÑSÔSÐSÐSÕSÔS�3ÑSÔSÐSÕSÔS�3ÑSÔSÐSÐSÐSÕSÔSÑSÔSÐSÐSÕSÔS�sÑSÔSÐSÕSÔS�sÑSÔSÐSÐSÕSÔSÐ+ÑSÔSÕSÔSÐ+ÑSÔSÐSÕSÔSÑSÔSÐSÐSÕSÔS­gÑSÔSÐSÕSÔS­gÑSÔSÐSÐSÕSÔS°lÑSÔSÕSÔSÐ.CÑSÔSÕSÔSÐDÑSÔSÐSÕSÔSÑSÔSÐSÐSÕSÔSÅwÑSÔSÐSÕSÔSÅwÑSÔSÐSÐSÕSÔSÈsÑSÔSÕSÔSÀ|ÑSÔSÐSÐSÑSÐSÐSÐSÐSÐSÑSÐSÕSÕSÔSÐSÑSÔSÑSÔSÐSÐSÐSÐSÐSÐSÐSÐSÐSÐSÐSÐSÐSÐSÐSÐSÐSÐSÐSØÐ  RÑ(Ô(€EØ
jÐ
jÐ
j€CØeÐeÐeÐe¨ÐeÑeÔe€GØ�cŠ>ÐÐÐÕÔÐÐÐÐˆ7�cÐÑÔÐÕÔÑÔÐÐÕÔˆ7ÑÔÐÕÔˆ7ÑÔÐÐÐÕÔÑÔÐÐÕÔ�cÑÔÐÕÔ�cÑÔÐÐÐÐÑÐÐÐÐÐÑÐÕÕÔÐÑÔÑÔÐÐÐÐÐr   c                 óà  — ddl m}  || |dz  t          d¦  «        ¬¦  «        }dd l}|                     |¦  «        }h d£}|j        }t          |¦  «        }||k    }	|	�st          j        d|	fd||f¦  «        t          j	        |¦  «        d	t          j        ¦   «         v st          j        t          ¦  «        rt          j	        t          ¦  «        nd	d
t          j        ¦   «         v st          j        |¦  «        rt          j	        |¦  «        nd
t          j	        |¦  «        t          j	        |¦  «        dœz  }
dd|
iz  }t          t          j        |¦  «        ¦  «        ‚d x}x}	x}}d S )Nr   )Úexport_workbookzdu_toan.xlsxrk   )Úcontract_value>   ú
Du toan TDúDoi chieu HDúRui ro H1-H6ÚTHKPÚNguon)ú<=)zP%(py1)s <= %(py8)s
{%(py8)s = %(py3)s(%(py6)s
{%(py6)s = %(py4)s.sheetnames
})
}ÚsetÚwb)r   rD   r   r    r$   r%   r&   )r   rœ   r   ÚopenpyxlÚload_workbookÚ
sheetnamesr¤   r(   r)   r*   r.   r/   r0   r+   r,   )r   Útmp_pathrœ   Úoutr¦   r¥   r1   r7   r8   r3   r9   r:   s               r   Útest_export_workbookr«   B   s¤  € ØIÐIÐIÐIÐIÐIà
ˆ/˜#˜x¨.Ñ8ÍÐQ]ÑI^ÔI^Ð
_Ñ
_Ô
_€CØ€O€O€Oà	×	Ò	 Ñ	$Ô	$€BØJÐJÐJÐ`ÐRTÔR_Ð`ÍcÐR_ÑN`ÔN`Ð`ÐJÐN`Ò`Ð`Ð`Ñ`Õ`Ô`Ð`Ð`Ð`Ð`ÐJÐN`Ð`Ñ`Ô`Õ`Ô`ÐJÑ`Ô`Ð`Õ`Ô`Ñ`Ô`Ð`Ð`Õ`Ô`ÍcÑ`Ô`Ð`Õ`Ô`ÍcÑ`Ô`Ð`Ð`Ð`Õ`Ô`Ñ`Ô`Ð`Ð`Õ`Ô`ÐRTÑ`Ô`Ð`Õ`Ô`ÐRTÑ`Ô`Ð`Ð`Õ`Ô`ÐR_Ñ`Ô`Õ`Ô`ÐN`Ñ`Ô`Ð`Ð`Ñ`Ð`Ð`Ð`Ð`Ð`Ñ`Ð`Õ`Õ`Ô`Ð`Ñ`Ô`Ñ`Ô`Ð`Ð`Ð`Ð`Ð`Ð`Ð`Ð`Ð`Ð`Ð`r   )Ú__doc__Úbuiltinsr.   Ú_pytest.assertion.rewriteÚ	assertionÚrewriter(   Údecimalr   Úpathlibr   r`   Ú__file__ÚresolveÚparentsÚROOTr   ÚmarkÚskipifÚexistsÚ
pytestmarkÚfixturer   r;   r]   ri   rs   r‘   rš   r«   r   r   r   ú<module>r¼      s   ððð ð € € € € € € € € € € € € Ð Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð à €€€à€tˆH�~„~×ÒÑÔÔ'¨Ô*€Ø
ˆYÑ˜Ñ"Ð%<Ñ<€àŒ[×Ò C§J¢J¡L¤LÐ 0ð  :IÐñ  Jô  J€
ð €„�hÐÑÔð(ð (ñ  Ôð(ð4ð 4ð 4ðCð Cð Cð@ð @ð @ðAð Að Að
 
ˆIÑ˜	Ñ!Ð$;Ñ;€ð „×Ò˜Ÿ	š	™œ�OÐ,HÐÑIÔIð	ð 	ñ JÔIð	ðað að að að ar   