# InvoiceNinja Update

### 1. Overview and Context

This procedure updates the InvoiceNinja table in the [SQL Database](https://docs.punctumbooks.com/books/service-component-library/page/sql-database).

### 2. Triggers

The execution of this procedure is usually triggered by

- [Metrics](https://docs.punctumbooks.com/books/service-portfolio-management-spm/page/metrics-process)

### 3. Steps to Be Performed

#### 3.1 Download

Sales data per product can be conveniently generated under "Reports," organized by Invoice Item. Product numbers in InvoiceNinja correspond to [PBNs](https://wiki.punctumbooks.com/index.php?title=PBN "PBN").

[![Screenshot 2024-03-18 at 10.22.57.png](https://docs.punctumbooks.com/uploads/images/gallery/2024-03/scaled-1680-/Mqcb24fsqSe1DZ7N-screenshot-2024-03-18-at-10-22-57.png)](https://docs.punctumbooks.com/uploads/images/gallery/2024-03/Mqcb24fsqSe1DZ7N-screenshot-2024-03-18-at-10-22-57.png)

InvoiceNinja delivers CSV files. They suck.


#### 3.2 Clean

- Open in LibreOffice
- Sort by invoice number
- delete rows with non-book data
- convert Product column to text, append 0 to PBNs
- fix InvoiceDate to 20XX-XX-01
- fix price by removing $ sign
- delete table header
- save as text CSV, comma-delimited

#### 3.3 Upload

- Navigate to phpMyAdmin table "InvoiceNinja"
- select Import tab;
- select file
- click "Go."
- archive file under Punctum Admin &gt; Metrics &gt; InvoiceNinja


### 4. Additional Information

### 5. Document Control

<table border="1" id="bkmrk-document-id-srm-001-" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 50%;"></col><col style="width: 50%;"></col></colgroup><tbody><tr><td>**Document ID**</td><td>PRO-036</td></tr><tr><td>**Document Owner**</td><td>Vincent</td></tr><tr><td>**Version**</td><td>1.0</td></tr><tr><td>**Last Date of Change**</td><td>March 26, 2026</td></tr><tr><td>**Next Review Due Date**</td><td>  
</td></tr><tr><td>**Version &amp; Change Tracking**</td><td>  
</td></tr></tbody></table>