I am not an accountant, but a programmer.

Can someone explain in FA terms how to set up my opening values?

1) Stock Level

Looks like Item Adjustment is the right place to add initial stock.
If I have correct Unit Cost will that also take care of and required GL entries,
such as Cost of Goods sold?
(So I can avoid any Journal Entries)

2) Supplier Balances

I would say Journal Entry (since that seems to be the catch-all answer) but
I do not see how to associate that entry with a specific supplier.

3) Bank accounts

Again Journal entry (ditto) but how to say which account?
I have a bank account and a paypal account

4) Customer Balances/Credits

I don't need them, I ship on paid items only, but if we answer this the thread
may become worthy of being Sticky...

5) Did I leave anything important out?

tom

252

(4 replies, posted in Items and Inventory)

When doing Inventory Adjustments where does it get the Unit Cost from?

I am starting to get the hang of basic accounting (LOL) and I am not sure if I ill need to use dimensions.

If I add them later will I have to start from scratch or will I be able to add them later without much trouble?

I realize that any prior transactions will not have the dimension associated with them.

254

(4 replies, posted in FA Modifications)

I agree.

I also was wondering it it would be a good idea (or not!) to allow renaming the files to give them a meaningful name.

Since the backups folder is inside the company directory the DB name is not really required ether.

How about adding a NAME (no extension) and it is it blank use the current naming?

tom

not sure in this case, but I found many cases where I was not seeing the PDF file because I needed to allow popups in my browser for my site.

256

(3 replies, posted in Setup)

How are these organized?

Is there a way to export/retire old data (let's say 5 years old)?

If this got used for everything it could consume a lot of space fast.

aka

/inventory/inquiry/stock_status.php

It lists:

Location     Quantity On Hand     Re-Order Level     Demand     Available     On Order

My question is about the "On Order" field:

When the item is a Manufactured item, should the code check Work Orders to see how many are scheduled to be made?
It might be more useful than just displaying 0, because then you will see Demand (from Orders) and Orders (from Work Orders)

If this is logical I could look at doing it...

tom

258

(4 replies, posted in Manufactoring)

tom wrote:

Why do work orders complete immediately?

That's an 'Assemble' type of WO

'Advanced Manufacture' does have steps...

I am still looking at the side effects of work orders to see how Purchasing can see shortages in Raw Materials needed by manufacturing...

tom

259

(2 replies, posted in Report Bugs here)

The reason I suggest that ordering is the pull-down list is constructed like this:

Category:
    product
    product
Category:
   product
   product

They are sorted by item Description, not stock_id

So I Ended up with

Category1
    product1
Category2
    product2
Category1
    product3
Category2
    product4
Category1
    product5
Category2
    product6
Category1
    product7
Category2
    product8

Since the items are displayed by category, maybe we should order them that way on the search?

tom

260

(4 replies, posted in Manufactoring)

Why do work orders complete immediately?

When I think of a Work Order I envision it be be like issuing a PO to the production floor which will cause them to
build the widget and when done deliver them into inventory, which would close the work order.

So far the flow is fine, with one exception... there is no time delay between issuing the work order and it being completing...

If there was an "In Process" state then we could have a Work In Progress report that we could give to manufacturing to tell them what work needs to be done.

or am I missing something?

additionally...

We could then allow work orders to be entered that create a demand greater than our stock level.
Of course, the work order could not be closed until there was sufficient stock.

Sales Orders create demand on goods that can be purchased or manufactured
Work Orders create demand on goods that are purchased

tom

261

(2 replies, posted in Manufactoring)

I have added that into my import script.

I will get it added to the downloads section soon

When I run a where used query I see:

GRIT-12 - 12quot; Grit Kit

when it should say

GRIT-12 - 12" Grit Kit

HTML

<tr class='evenrow'>
<td ><a href='../../manufacturing/manage/bom_edit.php?stock_id=GRIT-12' accesskey='Q'>GRIT-12 - 12<u>q</u>uot; Grit Kit</a></td>
<td >Garage</td>
<td >Default</td>
<td >1</td>

This is because the short cut key syntax uses &,

Maybe before checking for the & the code should urldecode the string and then re-urlencode the string?

I looked around in the code, but got a bit lost...
I am sure you know right where to go...

tom

263

(12 replies, posted in Setup)

Take a look at existing modules.

It is very simple, the add module (FA code) puts the hooks in to add a link to your page and when it is clicked your page is called...

Also the simpler modules can help figure out fa function calls (db_query, etc)

tom

In includes/ui/ui_lists.inc

The order by is simply: s.description

It also includes the category description so if different categories have similar named products you will get the stock listed in alpha sort with the same category names interspersed.

Maybe a better sort order would be c.description,s.description so we group the items within one category together and then sort the stock items

tom

ps. what is MB_FLAG = 'K' ? (s.mb_flag='M' OR s.mb_flag='K')

265

(5 replies, posted in Items and Inventory)

Well it looks like my next task will be to import BOM's

I do not like the way Sales Kits appear on the Sales Order/Invoice.

It looks like Manufacturing/BOM's is the way to go

tom

266

(59 replies, posted in Modules Add-on's)

Not bad for a hacker of my vintage...

yes i recall having wrapper functions for the basic stuff to handle the PHP3 to PHP4 transition...
(or maybe it was PHP4 point releases... a lot was in flux then)

Tom

267

(59 replies, posted in Modules Add-on's)

I see the html_entity_decode calls in write() of sales/includes/cart_class.inc

AH HA!

I think I should be doing a $cart->write instead of add_sales_order!

Yes that fixed it!

whew

268

(59 replies, posted in Modules Add-on's)

add_to_order calls $order->add_to_cart, calls line_details wth a NULL description so get_item is called and it uses that description, at that point the description is correct.

still tracing...

btw: add_to_cart and line_details are from sales/includes/cart_class.inc
----

I think the problem is that get_item fetches item details from the database and does not htmlspecialchars_decode() the data.

Maybe the caller should do it, but since get_item is a fairly generic utility function it should return plain decoded data

I am not sure the other impacts. - I did not see many other calls.
They were mostly used in areas that would be used for Display, not feed back to the database.

I will change it locally in line_details (since it knows it will feed it back to the db) and if that is the wrong change
i'll get the right one from CVS

tom

269

(59 replies, posted in Modules Add-on's)

Yes we agree.

But!

The string that has the problem is the DESCRIPTION which I am not passing to add_to_order, so it is NULL was add_to_order calls $order->add_to_cart and then the description is gotten from get_item()

I'll run an sql_trace and see...

270

(59 replies, posted in Modules Add-on's)

This is strange.

In my order import I use add_to_order() (sales/includes/ui/sales_order_ui.inc)

If I import an order with a Description that has a " in it I end up with

16&quot; Plate Glass Blank

And if I enter the sales order by hand I get

16" Plate Glass Blank

Here is my code

include($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/data_checks.inc");
include_once($path_to_root . "/sales/includes/db/branches_db.inc");
include_once($path_to_root . "/sales/includes/db/customers_db.inc");
include_once($path_to_root . "/sales/includes/db/sales_order_db.inc");
include_once($path_to_root . "/sales/includes/cart_class.inc");
include_once($path_to_root . "/sales/includes/ui/sales_order_ui.inc");

$cart = new Cart(30); // New Sales Order
        $cart->customer_id = $customer['debtor_no'];
        $cart->customer_currency = $customer['curr_code'];
        $cart->Branch = $branch['branch_code'];
        $cart->cust_ref = "osC Order # $oID";
        $cart->Comments = $comments;
        $cart->document_date = Today();
        // $_POST['OrderDate'] = $cart->document_date;
        $cart->sales_type = $customer['sales_type'];
        $cart->ship_via = $branch['default_ship_via'];
        $cart->deliver_to = $branch['br_name'];
        $cart->delivery_address = $branch['br_address'];
        $cart->phone = $branch['phone'];
        $cart->email = $branch['email'];
        $cart->freight_cost = $order_total['value'];
        $cart->Location = $branch['default_location'];
        $cart->due_date = Today();
        $sql = "SELECT * FROM orders_products WHERE orders_id = $oID";
        $result = mysql_query($sql, $osc);
        $lines = array();
        while ($prod = mysql_fetch_assoc($result)) {
            add_to_order($cart, $prod['products_model'], $prod['products_quantity'], $prod['products_price'], $customer['pymt_discount']);
        }
        mysql_free_result($result);
        // print_r($cart);
        $order_no = add_sales_order($cart);
        display_notification("Added Order Number $order_no");

What is funny, When I call add_to_order I do not pass the description, it gets pulled from the FA db.

confusing...

tom

271

(59 replies, posted in Modules Add-on's)

I have not seen any problems, I am just anticipating real life.

Since osCommerce computes Taxes and displays them to the customer and then
later FA has to re-compute taxes based on what is actually delivered.

I am worried about telling the customer the taxes are $x and then FA computing them to be $y

Based on the GL accounts we will send $y to the government, people tend to get upset if we collect one total and pay a different total.
(I think you can get fined if you Under pay taxes... over paying is usually not a problem!)

tom

272

(6 replies, posted in Installation)

When are email supposed to be sent?

In the code I saw emails can be send to a Inevntory Location email address.. it also looked like there was a flag to enable/disable it.

More details please!

tom

273

(1 replies, posted in Report Bugs here)

The demo data and new data (en_US-demo.sql  en_US-new.sql ) should be updated to have a default fiscal year of 2009

tom

274

(59 replies, posted in Modules Add-on's)

I have cleaned things up a bit.

I also expanded the item_import to support Sales Kits and Foreign Item Codes.

I am going to put together the modules and get them uploaded.
I stop at Sales Orders at the moment.

Order #     Customer     Branch     Comments

The 'Comments' column displays Customer Order Reference, not the SO comments

Verified by looking at view_sales_order.php

tom