the0forge / sp

GNU General Public License v3.0
0 stars 1 forks source link

Reports #5

Open r31gnf1r3 opened 10 years ago

r31gnf1r3 commented 10 years ago

Reports will be displayed using jQuery Tables (Ref: https://datatables.net/examples/). Also will need to be able to export the report in both PDF/CSV.

Waiting on confirmation of exact reports

Need to make base system. I.e. jQuery Tables. Reports will be selectable by date ranges, invoice etc. Please look at old reporting system (in MS ACCESS) to gain understanding of what their current reporting looks like

r31gnf1r3 commented 10 years ago

There will be 9 types of reports as it stands.

r31gnf1r3 commented 10 years ago

Ref for additional export formats: https://docs.djangoproject.com/en/dev/howto/outputting-csv/ https://docs.djangoproject.com/en/dev/howto/outputting-pdf/

r31gnf1r3 commented 10 years ago

Good examples of jQuery datatables: https://datatables.net/release-datatables/examples/advanced_init/dom_multiple_elements.html https://datatables.net/release-datatables/examples/basic_init/multi_col_sort.html

zvadym commented 10 years ago

@r31gnf1r3 please give me example of Product Sold by Catalog Query by Catalog I cant found pdf..

zvadym commented 10 years ago

Top Sellers (customers) Query by Start/End Date done, but

@r31gnf1r3 there are Contact First and Last names in this reports. But customer can has more then one contact. Which one I can show?

zvadym commented 10 years ago

describe please "Sent Items List" and "Minimum Stock" reports

r31gnf1r3 commented 10 years ago

Okay. The contact names, it should show firstly the main contact details on the customer, then if they have contact details, then depending on 'x' amount of customers i.e. say client has 3 contact records, they should be added to the end of the csv row (they don't need to display in the html and pdf view, only primary details in html/pdf view) but on the csv only they should be attached to the csv by 'x' amount.. example:

say we have: John Smith, john@email.com, telephone123 Jane Doe, jane@email, telephone321

They should be attached to the csv on that record like: John Smith, john@email.com, telephone123, Jane Doe, jane@email, telephone321

r31gnf1r3 commented 10 years ago

Sent items, thats based on the orders that have status shipped. This is so they can see what items have been dispatched/shipped.

r31gnf1r3 commented 10 years ago

Minimum stock, now they have unrealistic stock levels within there data at the moment, but they are going to do a total stocktake once our system goes live, and they will update them appropriately.

There should a minimum stock level, and when the stock is lower then that, they appear on that report.

zvadym commented 10 years ago

Top Sellers - we dont have "the main contact". We have 1+ contacts but without the main. So, I display all contacts.

Working on "Sent items" now

zvadym commented 10 years ago

Hi @r31gnf1r3 Report: Minimum stock.

Model:

Filter:

Fields:

What should be in fields indicated as ??? ?

zvadym commented 10 years ago

and @r31gnf1r3, can you describe all remaining reports in the same format? This will speed up the work )

zvadym commented 10 years ago

Report: Sent items

Model:

Filter:

Fields:

r31gnf1r3 commented 10 years ago

So Minimum Stock @zvadim

Like discussed, we will need to add to models "stock adjust" which should have the following:

Using this we can do the minimum stock. Note: This should be added to the import script also, as they actually have this data already, but we will worry about that on the final merge roll-out

r31gnf1r3 commented 10 years ago

Product.code ??? - page no - this is done using the catalog issue product Product.description ??? - OrderYN - this is if stock is below minimum amount Product.minimum_stock Product.current_stock ??? - SumOfQty Out1 - this is the amount sold. ??? - Last In Qty - can use the new stock adjust to work this out ??? - Last In Date - can user the new stock adjust to work this out

r31gnf1r3 commented 10 years ago

Date ID (order ID?) Company name Type - ??? this is customer type Suburb - Order.shipping_suburb Telephone - ??? this is the main customer telephone

zvadym commented 10 years ago
zvadym commented 10 years ago

@r31gnf1r3 Product Stock Costings (stocktake) Query by Start/End Date and Royalty Summary by Type Query by Royalty Type & Start/End Date

have done

r31gnf1r3 commented 10 years ago

_1. Sales Order Listing:_

Date From: 07/01/2010

Date To: 08/05/2010

Does nothing..

Also date range wrong. should be day/month/year.

_2. Top Sellers_

CSV export wrong, uses semi-colon, should be comma. Also all fields should have comma filtered out of them in the export. Also contacts should be the last field (as it is 'n' amount). Not Total OR remove the comma's between contacts. As it stands the CSV is unreadble by any office software. Try opening it up into Office/Excel. Just comes up with errors.

Also date range wrong. should be day/month/year.

_3. Sent Items_

Date From: 07/01/2010

Date To: 08/20/2012

Also date range wrong. should be day/month/year.

Does nothing..

_4. Minimum Stock Report_

Does nothing. Blank page.

_5. Volume by Product._

When click 'Products' have dialog jQuery modal saying "enter product code" (dont use find product dialog, too confusing). Just have enter product code only.

Also date range wrong. should be day/month/year.

CSV export wrong, uses semi-colon, should be comma. Also all fields should have comma filtered out of them in the export.

_6. Product Stock Costings (stocktake)_

Date From: 07/01/2010

Date To: 07/10/2011

Also date range wrong. should be day/month/year.

Does nothing..

_7. Royalty Summary by Type_

Date From: 07/01/2011

Date To: 08/20/2012

Supplier: SP

Also date range wrong. should be day/month/year.

Does nothing..

zvadym commented 10 years ago

@r31gnf1r3 date format - fixed csv - fixed

Others.. please use smaller date range. Your server is .. low power. it can not handle a large range of values.

About - 4. Minimum Stock Report -empty because no data for this report.

BTW you have to do re-datamigration!

r31gnf1r3 commented 10 years ago

With 4. Minimum Stock Report, We have the current stock and minimum stock amount for each product. So the report should work, just that the last in quantity and last in date will be null.

r31gnf1r3 commented 10 years ago

Also with displaying reports on the web front end. Two things just to make it look nicer.

  1. Use according fillspace. (http://jqueryui.com/accordion/#fillspace) and have the default action of the first one open.
  $(function() {
    $( "#accordion" ).accordion({
      heightStyle: "fill"
    });
  });
  1. Use datatables on the tabled data (https://datatables.net/release-datatables/examples/advanced_init/dom_multiple_elements.html) per accordion, that way they will be able to sort the data etc.
$(document).ready(function() {
    $('#example').dataTable( {
        "dom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>'
    } );
} );

That should clear the whitespace, and make it easy to sort/look at the data when it comes out. Like below:

image

and:

image

r31gnf1r3 commented 10 years ago

When loading reports please give a blue overlay using http://malsup.com/jquery/block/#demos

image

And also percentage time if possible.

r31gnf1r3 commented 10 years ago

CSV export wrong, should be comma. Also all fields should have comma filtered out of them in the export. Also make sure html codes like '&' are changed back to '&'

zvadym commented 10 years ago

@r31gnf1r3

Use according fillspace

it dont work.

Hrmm. Okay. Thought if you put containing div around according to be max height/width then called resize resize should work.

http://stackoverflow.com/questions/4415928/the-problem-about-the-of-jquery-ui-accordion-fill-space

zvadym commented 10 years ago

Loader added and csv fixed

zvadym commented 10 years ago

@r31gnf1r3 What next?