Spreadsheet: 740469d1626353094-not-calculating-correctly-after-certain-line-value-error-sfsales-dec-2020-to-present-july-2021
Sheet: Orders and Sales

Read Me Guide:
Order table is used for recording each product that was ordered by a client.
Sales table is used for recording payments on those orders.
Invoice numbers should not be duplicated across more than 1 customer. E.g. [NAME] with invoice "123" can have multiple different items on invoice "123", but [NAME] cannot add to invoice "123" because the sales table will not record [NAME]'s name. This will not affect the sums across the tables, however, it might confuse the user to see Invoice "123" on [NAME]'s name but see [NAME]'s name in the Summary.
"View Customer" (column L) will show "N/A" if customer was not recognized or not added into the clientele table.
"Income" in sales table represents the sales that were successful and paid for. It differs from the "Profit" column in that profit is just to show the amount of profit that would be generated from this sale, while "Income" represents what was actually earned on this sale.
Do not edit grey zones.
Orders |  |  |  |  |  |  |  |  |  | Sales
Date | Invoice Number | Customer | Product | Qty | Price | Sold at | Subtotal | Profit |  | Customer | View | Invoice Number | Order Total | Date Paid | Paid | Balance | Profit | Income
2020-11-11 00:00:00 | 123 | Cassim Osman Sina Health Company | Fish [NAME] | 1 |  | 1124 |  |  |  |  |  |  |  | 2020-11-13 00:00:00 | 2255
2020-11-11 00:00:00 | 123 | Cassim Osman Sina Health Company | Fish [NAME] | 1 |  | 1125 |  |  |  |  |  |  |  | 2020-12-21 00:00:00 | 1044
2020-12-21 00:00:00 | 700 | Anneke Erasmus Mulder | Fish [NAME] | 1 |  | 1044 |  |  |  |  |  |  |  | 2020-12-23 00:00:00 | 344
2020-12-23 00:00:00 | 701 | Nabewieyah Daniels | Fish [NAME]g | 1 |  | 344 |  |  |  |  |  |  |  | 2021-01-31 00:00:00 | 895
2021-01-17 00:00:00 | 101 | Zubair Rawat | Fish [NAME] | 1 |  | 895 |  |  |  |  |  |  |  | 2021-01-05 00:00:00 | 2299
2021-01-05 00:00:00 | 102 | Khatija Rahimtoola | Fish [NAME] | 2 |  | 1125 |  |  |  |  |  |  |  | 2021-01-05 00:00:00 | 2039
2021-01-05 00:00:00 | 103 | Tahseen Ally [NAME] | Fish [NAME] | 2 |  | 995 |  |  |  |  |  |  |  | 2021-01-05 00:00:00 | 1044
2021-01-05 00:00:00 | 104 | [NAME] | Fish [NAME] | 1 |  | 995 |  |  |  |  |  |  |  | 2021-01-05 00:00:00 | 1174
2021-01-05 00:00:00 | 105 | [NAME] | Fish [NAME] | 1 |  | 1125 |  |  |  |  |  |  |  | 2021-01-10 00:00:00 | 1044
2021-01-10 00:00:00 | 106 | [NAME] | Fish [NAME] | 1 |  | 995 |  |  |  |  |  |  |  | 2021-01-08 00:00:00 | 1174
2021-01-10 00:00:00 | 107 | [NAME] | Fish [NAME] | 1 |  | 1174 |  |  |  |  |  |  |  | 2021-01-15 00:00:00 | 174
2021-01-10 00:00:00 | 108 | [NAME] | Fish Collagen 80g | 1 |  | 125 |  |  |  |  |  |  |  | 2021-01-20 00:00:00 | 95
2021-01-20 00:00:00 | 109 | Hibah Muhammed | Fish Collagen 80g | 1 |  | 95
2021-01-22 00:00:00 | 7860 | Humza Papa Qurtuba | Fish [NAME] | 1 |  | 0
2021-01-24 00:00:00 | 7861 | [NAME] | Fish Collagen 80g | 1 |  | 0
2021-01-24 00:00:00 | 7862 | ZEV | Fish [NAME] | 1 |  | 0
2021-01-24 00:00:00 | 7863 | Ma | Fish [NAME] | 1 |  | 0
2021-01-25 00:00:00 | 7864 | Moulana [NAME] | Fish Collagen 500g | 1 |  | 0 |  |  |  |  |  |  |  | 2021-01-26 00:00:00 | 15292
2021-01-26 00:00:00 | 110 | Hibah Muhammed | Fish Collagen 20kg | 1 | 2000 | 2000
2021-01-26 00:00:00 | 7865 | AEV | Fish [NAME]g | 1 |  | 0
2021-01-26 00:00:00 | 7865 | AEV | Fish [NAME]g | 1 |  |  |  |  |  |  |  |  |  | 2021-01-28 00:00:00 | 2734
2021-01-27 00:00:00 | 7866 | Aunty [NAME] | Fish [NAME]g | 1 |  | 0
2021-01-28 00:00:00 | 111 | [NAME] IS Natural | Fish [NAME] | 3 |  | 895 |  |  |  |  |  |  |  | 2021-02-02 00:00:00 | 380 |  |  |  | cash
2021-02-02 00:00:00 | 112 | [NAME] [NAME] | Fish Collagen 80g | 10 |  | 100
2021-02-02 00:00:00 | 113 | [NAME] | Fish [NAME]g | 1 |  | 380
2021-02-02 00:00:00 | 7867 | Baboo Mama Vaid | Fish Collagen 80g | 1 |  | 0
2021-02-02 00:00:00 | 114 | [NAME] | Fish Collagen 80g | 1 |  | 87.5 |  |  |  |  |  |  |  | 2021-02-02 00:00:00 | 1174
2021-02-02 00:00:00 | 115 | [NAME] | Fish [NAME] | 1 |  | 1125 |  |  |  |  |  |  |  | 2021-01-04 00:00:00 | 1049
2021-02-02 00:00:00 | 116 | [NAME] | Fish Collagen 80g | 10 |  | 100 |  |  |  |  |  |  |  | 2021-02-02 00:00:00 | 300 |  |  |  | Order combined with gelatine
2021-02-02 00:00:00 | 117 | [NAME] Agent | Fish Collagen 80g | 3 |  | 100 |  |  |  |  |  |  |  |  | 0
2021-02-04 00:00:00 | 7868 | ZEV | Fish [NAME] | 1 |  | 0 |  |  |  |  |  |  |  | 2021-02-04 00:00:00 | 312
2021-02-02 00:00:00 | 118 | Junior MV | Fish [NAME]g | 1 |  | 312 |  |  |  |  |  |  |  | 2021-02-08 00:00:00 | 600
2021-02-08 00:00:00 | 119 | [NAME] | Fish Collagen 500g | 1 |  | 575
2021-02-08 00:00:00 | 7869 | Ma | Fish [NAME]g | 3 |  | 0
2021-02-08 00:00:00 | 78610 | [NAME] | Fish [NAME]g | 1 |  | 0
2021-02-08 00:00:00 | 78611 | MEV | Fish [NAME]g | 1 |  | 0
2021-02-11 00:00:00 | 78612 | Storm Hugo | Fish Collagen 80g | 4 |  | 0
2021-02-11 00:00:00 | 78613 | Mo Lockat | Fish [NAME]g | 1 |  | 0
2021-02-13 00:00:00 | 120 | Sajida Amla Kazee | Fish [NAME]g | 3 |  | 312 |  |  |  |  |  |  |  | 2021-02-12 00:00:00 | 936
2021-02-15 00:00:00 | 121 | [NAME] | Fish [NAME]g | 2 |  | 312