================================================================================================================================================================
  FIFO STOCK LEDGER BY LOTS
  Didactic Python code · Kardex Tauro · kardex-tauro.muisca.co
================================================================================================================================================================
Movements read: 10

Product: Gray cement 50 kg
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Date        Detail                                               In  Unit cost      In value      Out  FIFO cost Cost of sales  Balance  Avg. cost Balance value
----------------------------------------------------------------------------------------------------------------------------------------------------------------
2026-03-02  Purchase from Northern Cement - Invoice 1041     100.00  18,000.00  1,800,000.00                                     100.00  18,000.00  1,800,000.00
2026-03-05  Sale to La 80 Hardware - Delivery note 233                                          90.00  18,000.00  1,620,000.00    10.00  18,000.00    180,000.00
2026-03-09  Purchase from Northern Cement - Invoice 1078      60.00  20,000.00  1,200,000.00                                      70.00  19,714.29  1,380,000.00
2026-03-12  Sale to El Portal Builder - Delivery note 240                                       20.00  19,000.00    380,000.00    50.00  20,000.00  1,000,000.00
2026-03-18  Purchase from Andean Distributor - Invoice ...    40.00  21,000.00    840,000.00                                      90.00  20,444.44  1,840,000.00
2026-03-25  Sale to La 80 Hardware - Delivery note 251                                          50.00  20,000.00  1,000,000.00    40.00  21,000.00    840,000.00
----------------------------------------------------------------------------------------------------------------------------------------------------------------
FINAL BALANCE: 40.00 units -> 840,000.00

Product: THHN 12 AWG wire
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Date        Detail                                               In  Unit cost      In value      Out  FIFO cost Cost of sales  Balance  Avg. cost Balance value
----------------------------------------------------------------------------------------------------------------------------------------------------------------
2026-03-03  Purchase from Electro Supply Inc - Invoice ...   200.00   1,200.00    240,000.00                                     200.00   1,200.00    240,000.00
2026-03-07  Sale to United Electricians - Delivery note...                                     120.00   1,200.00    144,000.00    80.00   1,200.00     96,000.00
2026-03-11  Purchase from Electro Supply Inc - Invoice ...   150.00   1,350.00    202,500.00                                     230.00   1,297.83    298,500.00
2026-03-19  Sale to United Electricians - Delivery note...                                      80.00   1,200.00     96,000.00   150.00   1,350.00    202,500.00
----------------------------------------------------------------------------------------------------------------------------------------------------------------
FINAL BALANCE: 150.00 units -> 202,500.00

================================================================================================================================================================
LOTS CONSUMED BY EACH SALE (FIFO)
================================================================================================================================================================

Product: Gray cement 50 kg
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Sale 2026-03-05: 90.00 units
  lot 2026-03-02        90.00 x    18,000.00 =     1,620,000.00
  FIFO cost of this sale:     1,620,000.00
Sale 2026-03-12: 20.00 units
  lot 2026-03-02        10.00 x    18,000.00 =       180,000.00
  lot 2026-03-09        10.00 x    20,000.00 =       200,000.00
  FIFO cost of this sale:       380,000.00
Sale 2026-03-25: 50.00 units
  lot 2026-03-09        50.00 x    20,000.00 =     1,000,000.00
  FIFO cost of this sale:     1,000,000.00

Product: THHN 12 AWG wire
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Sale 2026-03-07: 120.00 units
  lot 2026-03-03       120.00 x     1,200.00 =       144,000.00
  FIFO cost of this sale:       144,000.00
Sale 2026-03-19: 80.00 units
  lot 2026-03-03        80.00 x     1,200.00 =        96,000.00
  FIFO cost of this sale:        96,000.00

================================================================================================================================================================
SUMMARY BY PRODUCT
================================================================================================================================================================
  Gray cement 50 kg
    Purchases:    200.00 units     3,840,000.00
    Sales    :    160.00 units
    Balance  :     40.00 units       840,000.00
    FIFO cost of sales:     3,000,000.00
    Check (balance = purchases - sales): TIES
  THHN 12 AWG wire
    Purchases:    350.00 units       442,500.00
    Sales    :    200.00 units
    Balance  :    150.00 units       202,500.00
    FIFO cost of sales:       240,000.00
    Check (balance = purchases - sales): TIES
  TOTAL FIFO COST OF SALES: 3,240,000.00

File written: salida/kardex_peps.csv
File written: salida/lotes_consumidos.csv
