crater-invoice / crater

Open Source Invoicing Solution for Individuals & Businesses
https://craterapp.com
GNU Affero General Public License v3.0
7.71k stars 1.6k forks source link

Custom field in item #508

Open imchivaa opened 3 years ago

imchivaa commented 3 years ago

Is your feature request related to a problem? Please describe. When selling an item, i required to have the purchased price and how much i am selling to know how much will be the profit for that item. Example: item purchased for 100, sold for 120, profit is 20.

I can write some db query to compute the profit via the backend, i would like to have the ability to have custom fields to store the values per product. Currently there is no way to have custom fields in items.

Describe the solution you'd like Able to implement custom fields to items.

Describe alternatives you've considered Allow to have custom fields in items like elsewhere.

custom-field

mohitpanjwani commented 3 years ago

This is already done on backend! It'll released on the next major release.

imchivaa commented 3 years ago

Well done, thank you! 🔥

Adrian-Samuel commented 2 years ago

@mohitpanjwani was this completed? I don't see the ability to edit Invoice Item Fields on the demo

iedev1 commented 2 years ago

I see that there is some support for this.

If you add items directly in the custom_fields table (via phpMyAdmin or something else) with a type of "Item" it will show up in the template.

The Invoice model retrieves these custom fields and the default template displays it via resources/views/app/pdf/invoice/partials/table.blade.php.

However, there is no way to update this via the admin UI so that's not very helpful.