

/********************/
/* new features with new version 2.0 */

//=========================
8_20260219
> tx categorizing eg

+ debit["account_code"] > 6000
+ AND credit["account_code"] < 1500){
    echo "re-tx (4 NON purchase/sale)";
}
 -
//=========================
7_20260118
> inventory splitting,
+issue1;inventory purchased as 50kg to sale per kg..?
 i) have a column to indicate connection.
 -
 ...
 ii)  
 -

//=========================
6_20251129
> lipa mdogo mdogo...
+issue1; sale inventory with more than 1 tx!
 i) 
 -
 ...
 ii)  
 -

 //=========================
5_20251105
> checks data of tx .... 
+issue1; if a tx ...
 i) a sale tx,
 -also has a cogs tx.
 ...
 ii) a tx tx_type, 
 -corresponds to the 2 tx_lines account_codes!
 ...
 iii) ...
 -

//=========================
4_20251015
receivables & payables, taking and paying back!
+issue1; payables:
    i)  a loan ment to be paid back ?
    ...
    ...
    
    ii) a purchase to be recorded as payable ?
    ...
    ...
    
+issue2; receivables:
i) a sale to be recoded as receivable ?
+WHEN?
-ONLY when paid after the day of trasaction.
+HOW?
-a) debit [1201(receivables -must record customer)] credit [4101(slaes)]
-b) ...
...
...
    
ii) ... ?
    ...
    ...
>solution1: 
- new table 'txs_connect' or 'txs_extra' which …?,
- main goal yo connect txs
- eg a payable tx, being paid by 1 or more txs.
- eg a achievable tx, paid by 1 or more txs.
- eg ...,
- eg ...

>solution1: 
- no new table, merge customers, vendors & loaners into table contacts.
    a) columns; 
        id, 
        name,
        phone,
        address,
        email, 
        type, (perzon/business or vendor/customer),
        notes,
        created_at,
        updated_at
- a receivable tx must have customer filled (must be in table custimers).
- a payable tx must have vendor or loanee filled (must be in table vendors/supplier/loaners?).
- have a feature ie Receivables & Payables, to manage...
a) payment status (eg 100%, 75%, ... ).
b) paying process eg select the tx(s) to pay, etc.
c) what about partial payments?
d) any need to update paid tx description?
e)...
-

//=========================

3. txs view... 
- tx row bg color according to tx_type...
if debit_code like '6xxx' && credit_code like '1xxx'

DONE:
-ensured displays a journal entry view.

/********************/
/* bugs */
//=========================
2_20250930 customers & vendors accounts receivables & payables to have unique account code!
+issue1;...
- ...,
- ...
//=========================
1_20250928 inventory items to have unique account code!
+issue1; general is 1501, eg 110201...etc
+issue2; tx of same date, same tx_type & same eg inventory item sale!
- ...,
- ...
+solution issue1; there shall be a...
1of2: table `items`.
- columns
    `id`, `code`(account), `name`, ``, 
    etc
- columns attributes
    id; auto-increment,
    code; 1102 //1st four are for inventory account_code,
          0100 // parent for all paint products,
          eg 0101 // paint 4L...,
          ...,
          ...
    name; unique eg
          paint gloss 4L basco black 
          or paint emulsion 0.5L glory chocolate
          or paint spray 0.4L ...
          etc
    ...; ...,
    ...; ...
2of2: ... 
- ...,
- ...

//=========================
