dragotin / kraft

Kraft helps to handle your daily quotes and invoices in your small business.
http://volle-kraft-voraus.de
GNU General Public License v2.0
58 stars 18 forks source link

Add New Catalogs #58

Closed ghost closed 4 years ago

ghost commented 5 years ago

Hi

I'm trying to add a catalog in the database.

I need a catalog with some description of works (Scope of Work). I just need the description without any prices.

Any chance to implement this too?

Thanks, Dan

dragotin commented 5 years ago

It is not yet implemented in Kraft, but you can do it with a little SQL gymnastic.

Catalog entries are stored in the table Catalog. In that, a chapterID is referenced to identify the catalog chapter the entry appears in. All the chapters are stored in table CatalogChapters with name and description and stuff. Important is the foreign key catalogSetID. It references an entry in the table CatalogSet where the existing Catalogs are listed.

To add a new Catalog (with normal templates) into your Kraft installation, you just need to:

Now the chapter will appear in Kraft in the Catalog list and can be used as usual: cataloglist

dragotin commented 5 years ago

Apart from this hackery workaround, this really should be implemented in Kraft.

ghost commented 5 years ago

Hi

Thanks.

I figured this out too. I'm just wondering, how to stop showing the prices for this particular catalog? I just want to add some description without any prices listed at the end of a "Print Document".

Like:

Item                     Qty.                     Unit                     Price                     Sum

Scope of work
1. Masking up 
Carpet: Blablabla
Furniture, windows, bathroom vanities: Blablabla
Skirting boards: Blablabla

2. Ceilings
Preparation: Blablabla
Finish: Blablabla
Wet areas: Blablabla

Labour                    7                    Hours                    $736                    $5152

(empty space) < --- This would be great too ;)

Materials                 1                    pausch.                 $1,75                   $1.75             
- sandingpaper
- paint
-  

Some additional description can be listed at the end then too. 
...

Sometimes it's just necessary to add some text without any prices, units etc listed.

So, it would be perfect to add a new "TemplCatalog / MaterialCatalog". Like "DescriptionCatalog" without any 'links' to materials/time templates.

I was looking for those two "TemplCatalog / MaterialCatalog" to add a new "DescriptionCatalog" there but I couldn't find it. And my knowledge about databases is = 0. I don't know how to implement this :/

Thanks, Dan

dragotin commented 5 years ago

But in your example above, wouldn't that also fit into a (lengthy) entry text, ie. does it have to be in the list of items of the document?

ghost commented 5 years ago

Well, for me (here - NZ) it's just nicer like this. It makes Kraft much more flexible like that, I guess. So, it'll be always a possibility to add some words/text to some positions without a price list. And I don't have to show every single price of a material and/or labour if it's just an estimate for example.

I could add my own position and we don't really need this "issue" - 'Enhancement-Request - Position Numbers like subfolders'.

I use Kraft only to get the prices together. It isn't fully usable for me. I also need to use word/excel, which isn't really convenient. It is "only" this "small" problem to make Kraft fully usable if I just want to click the "Print Document" button.

Anyhow, is it hard to implement? Maybe I can help you somehow? Maybe I can add the "DescriptionCatalog" by myself? Where can I find those twos "TemplCatalog / MaterialCatalog"?

ghost commented 5 years ago

I found a workaround. If someone has the same "problem" they can hide the prices etc in the file /kraft/reports/invoice.trml ` <!-- {{POS_AMOUNT}}

{{POS_UNIT}}
    <td><para style="{{POS_KIND}}ctext">{{POS_UNITPRICE}}</para></td> 
    <td><para style="{{POS_KIND}}ctext">{{POS_TOTAL}}</para></td> -->`

It isn't a perfect solution but if you need to hide the prices for an estimate for example it can be a way.

dragotin commented 5 years ago

Yes, that works, but it removes the information for all items in a document, right? Or did you manage to have that only for selected items?

My idea to implement this would be to have another "type" of items which only consists of text. Lets see...

ghost commented 5 years ago

That would be great but yeah it's without any unit prices etc.. Actually only items are available but the item list will be use the whole page (left to right).

I can send you the .trml file and some screenshots if you want to. The .trml file is a little documented and has all the changes included. So you can create a third Catalog and use it with the .trml file. No need for that, just my way. The Logo is on top of the middle now and the address and email ... underneath. And some other changes.

You can add a new "Document Type" for example "Quote - No prices" and change the path to /usr/share/kraft/reports/custom-invoice.trml like you said in your documents.

There is only one problem, if you have a lot of positions the first page is mostly empty and the list of your items start at the second page. That's a little annoying. Is it possible to delete / disable the part of the "Salutatory Address" and "Entry Text on First Page:" or another way that the list can start on the first page straightaway? No matter how many items are listed?

Regards Dan

dragotin commented 4 years ago

The next version of Kraft with have a new document type Offer with no prices This prints the PDF without price tags shown. I hope that solves your problem.