blueline Posted June 28, 2004 Author Share Posted June 28, 2004 Thanks. Fixed and uploaded changes. Quote Chris Sullivan Link to comment Share on other sites More sharing options...
Guest Posted June 28, 2004 Share Posted June 28, 2004 Error in Margin_Report2.php whereby the export button after the date selection is not showing up in browser. Removed the DIR_FS_Admin statement to make it the same as the <Back><Export> statement and it works fine now. Quote Link to comment Share on other sites More sharing options...
mijman2 Posted July 7, 2004 Share Posted July 7, 2004 It would be wonderful if you could release a version of this with all of the files edited from a clean version of oscommerce... It would be much easier for... New people (clean start) who want to use this, and for using comparing progams... Quote Link to comment Share on other sites More sharing options...
dcsteve72 Posted July 22, 2004 Share Posted July 22, 2004 Got 2.55 installed. Tried executing an export and was given file download errors. Put in the filename, click export. Dialog box appears with no filename or type, but does have the domain name. Choosing save (or open for that matter), generates "Cannot open file from site blah.com. Internet Explorer is unable to open this internet site. The requested site is unavailable or cannot be found." Any thoughts? Quote Link to comment Share on other sites More sharing options...
vaughnn Posted July 25, 2004 Share Posted July 25, 2004 Folks, This contribution is fantastic, but has one flaw for historical info which needs some time investigating. The cost of items is extracted from the products table when doing historical reports. If like me your items change in price regularly, or you buy the same item from multiple suppliers, the history reports over time become les and less accurate. I know that to fix this will need some changes to the orders_products table, to the checkout process, so the item cost is saved into the OP table on checkout. I can look at this, but make no promises, as have many other things on the go. Cheers, VB Quote Link to comment Share on other sites More sharing options...
vaughnn Posted July 25, 2004 Share Posted July 25, 2004 OK, had a quick look and think the following is all that is required to make it work. You will need to make some changes to the margin report files, but these are changes to the standard files to allow saving of costs for each order. I hope these changes are ALL required (they at least worked for me). make the following database change; ALTER TABLE `orders_products` ADD `products_cost` DECIMAL( 15, 4 ) DEFAULT '0.0000' NOT NULL AFTER `products_price`; make the following changes to code; includes/classes/order.php FIND $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price'], REPLACE WITH $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'cost' => $orders_products['products_cost'], 'final_price' => $orders_products['final_price'], FIND // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; REPLACE WITH // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_cost = $product['products_cost']; $products_weight = $product['products_weight']; FIND 'price' => $products[$i]['price'], 'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), REPLACE WITH 'price' => $products[$i]['price'], 'cost' => $products[$i]['cost'], 'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), includes/classes/shopping_cart.php FIND while (list($products_id, ) = each($this->contents)) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); REPLACE WITH while (list($products_id, ) = each($this->contents)) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_cost, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); FIND $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], 'price' => $products_price, REPLACE WITH $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], 'price' => $products_price, 'cost' => $products['products_cost'], checkout_process.php FIND $sql_data_array = array('orders_id' => $insert_id, 'products_id' => tep_get_prid($order->products[$i]['id']), 'products_model' => $order->products[$i]['model'], 'products_name' => $order->products[$i]['name'], 'products_price' => $order->products[$i]['price'], 'final_price' => $order->products[$i]['final_price'], 'products_tax' => $order->products[$i]['tax'], 'products_quantity' => $order->products[$i]['qty']); REPLACE WITH $sql_data_array = array('orders_id' => $insert_id, 'products_id' => tep_get_prid($order->products[$i]['id']), 'products_model' => $order->products[$i]['model'], 'products_name' => $order->products[$i]['name'], 'products_price' => $order->products[$i]['price'], 'products_cost' => $order->products[$i]['cost'], 'final_price' => $order->products[$i]['final_price'], 'products_tax' => $order->products[$i]['tax'], 'products_quantity' => $order->products[$i]['qty']); Cheers, VB Quote Link to comment Share on other sites More sharing options...
Guest Posted July 29, 2004 Share Posted July 29, 2004 Ive installed the version 2.25 and all is well. For some reason the cost prices are not showing up in the margin report. They have all been enter in via MySql database. The Margin (%) is showing up. Any suggestion for this problem? Thanks Steven Quote Link to comment Share on other sites More sharing options...
Guest Posted August 10, 2004 Share Posted August 10, 2004 v2.55a is great....but like vaughnn has mentioned, it has some bugs in it on how it lookup the product price. Furthermore, I have just discovered that my latest recent order is not being reported correctly too. Example: Order #1002 Item A has order quantity of 90, but the margin report is only reporting order quantity of 1 which gave the wrong report on sales total and gross profit as a result. Any guru to help fix this and release a new version? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 10, 2004 Share Posted August 10, 2004 Anyone interested to team up and work on resolving existing issues with this contribution? I am not very good with programming, thus I need help. Can someone help me with the following questions? Based on v2.55a: 1. Is it looking up the table 'products'? If so, what are the values that is looking up for, products_price, products_cost, etc? 2. Majority of the problem is with margin_report2.php right? 3. Command used in margin_report2.php is not osC MS2-2.2 standard commands. Is there anyway to convert to using osC standard commands, so as to make it more compatible with the osC itself as well as easier to comprehend? Eg. mysql_query can be replaced with tep_db_query? Let's identify all existing problem first, then we sort out solutions for it. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 10, 2004 Share Posted August 10, 2004 I have some one I use in India which does great programming using OSC. He dosent charge much at all. Heres his email if you want to contact him in doing this job. [email protected] Steven Quote Link to comment Share on other sites More sharing options...
blueline Posted August 10, 2004 Author Share Posted August 10, 2004 I am the author of this contribution. I can fix the issues at hand if all are identified. -Chris Quote Chris Sullivan Link to comment Share on other sites More sharing options...
Guest Posted August 10, 2004 Share Posted August 10, 2004 Hi Chris What do u mean "I can fix the issues at hand if all are identified" ? Do u need access to our admin and MySql? Steven Quote Link to comment Share on other sites More sharing options...
vaughnn Posted August 11, 2004 Share Posted August 11, 2004 Well my changes above should fix the matter of recording the cost price at sales time, and all that is left to fix after that should be a couple of minor changes to margin_report2 to give the correct information. Unfortunately if you have not got the cost history, margin_report2 will need to extract the info from current pricing costs, but these are relatively minor changes in margin_report2. Chris, I also had the issue of the qty not being used for calculating the total cost, and made some changes to the module. I have included an extract from my margin_report2 code, which fixed my qty issue. (Unfortunately I use a combination of oscommerce and phpnuke on my website [oscNuke], so when I add contributions I have to amend things to get them to work). My changes are as follows; for($i=0;$i<sizeof($o);$i++) { $price = 0; $cost = 0; $items_sold = 0; $prods_query = mysql_query("select products_id, products_price, products_cost, products_quantity from orders_products where orders_id = '" . $o[$i] . "'"); while ($prods = mysql_fetch_array($prods_query, MYSQL_ASSOC)) { $p[] = array($prods['products_id'], $prods['products_price'], $prods['products_cost'], $prods['products_quantity']); $price = $price + ($prods['products_price'] * $prods['products_quantity']); $cost = $cost + ($prods['products_cost'] * $prods['products_quantity']); $items_sold = $items_sold + $prods['products_quantity']; $total_price = $total_price + ($prods['products_price'] * $prods['products_quantity']); $total_cost = $total_cost + ($prods['products_cost'] * $prods['products_quantity']); $total_items_sold = $total_items_sold + $prods['products_quantity']; } To fix the issue with the product cost issue on item sales where you did not save the cost price to the order_products table, I would do something like the following; REPLACE $cost = $cost + ($prods['products_cost'] * $prods['products_quantity']); WITH if (!$prods['products_cost'] > 0) { $cost_query = mysql_query("select products_cost from products where products_id = '" . $prods['products_id'] . "'"); $cost_result = mysql_fetch_array($cost_query, MYSQL_ASSOC); $cost = $cost + ($cost['products_cost'] * $prods['products_quantity']); } else { $cost = $cost + ($prods['products_cost'] * $prods['products_quantity']); } I am a bit of a hack (and haven't tested this last change), but most things I have done work OK. Cheers folks, Vaughnn www.theITcrew.com.au Quote Link to comment Share on other sites More sharing options...
tlelliott77 Posted August 12, 2004 Share Posted August 12, 2004 Just looking at the install instructions I think there may be a line missing on page 4 where it says: Replace With: } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') { $product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_cost, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $product = tep_db_fetch_array($product_query); tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_cost, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); $dup_products_id = tep_db_insert_id(); I think the line: tep_db_input($product['products_price']) . "', now(), '" . Should change to: tep_db_input($product['products_price']) . "', '" . tep_db_input($product['products_cost']) . "', now(), '" . Please someone correct me if I'm wrong. Great contribution by the way. My only minor gripe is having the instructions in PDF. Makes it a pain in the ...... to copy into text files. Line breaks seem to get all screwed up. Cheers Tim Quote Link to comment Share on other sites More sharing options...
tlelliott77 Posted August 12, 2004 Share Posted August 12, 2004 Oh, I see later on in the instructions you have the same editing but with the extra change I mentioned in my last post. Might be an idea to clean that up on the next release. As far as I can see there are 3 duplicate instructions for categories.php. Cheers Tim Quote Link to comment Share on other sites More sharing options...
blueline Posted August 13, 2004 Author Share Posted August 13, 2004 Thanks Tim. I will clean it up for the next release...and I'll offer a pdf alternative Quote Chris Sullivan Link to comment Share on other sites More sharing options...
ipodskins Posted August 13, 2004 Share Posted August 13, 2004 this contribution was just what i was looking for! im not very good at the installation stuff, and was looking through the installation txt and noticed that some of the add/replace have already been replaced when i installed the header tag controller!! what do you suggest i do?? thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted August 18, 2004 Share Posted August 18, 2004 OK, had a quick look and think the following is all that is required to make it work.You will need to make some changes to the margin report files, but these are changes to the standard files to allow saving of costs for each order. I hope these changes are ALL required (they at least worked for me). make the following database change; ALTER TABLE `orders_products` ADD `products_cost` DECIMAL( 15, 4 ) DEFAULT '0.0000' NOT NULL AFTER `products_price`; make the following changes to code; includes/classes/order.php FIND ? ? ?$orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); ? ? ?while ($orders_products = tep_db_fetch_array($orders_products_query)) { ? ? ? ?$this->products[$index] = array('qty' => $orders_products['products_quantity'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'id' => $orders_products['products_id'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'name' => $orders_products['products_name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'model' => $orders_products['products_model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'tax' => $orders_products['products_tax'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'price' => $orders_products['products_price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $orders_products['final_price'], REPLACE WITH ? ? ?$orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); ? ? ?while ($orders_products = tep_db_fetch_array($orders_products_query)) { ? ? ? ?$this->products[$index] = array('qty' => $orders_products['products_quantity'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'id' => $orders_products['products_id'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'name' => $orders_products['products_name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'model' => $orders_products['products_model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'tax' => $orders_products['products_tax'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'price' => $orders_products['products_price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'cost' => $orders_products['products_cost'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $orders_products['final_price'], FIND // products price ? ? ? ?$product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); ? ? ? ?if ($product = tep_db_fetch_array($product_query)) { ? ? ? ? ?$prid = $product['products_id']; ? ? ? ? ?$products_tax = tep_get_tax_rate($product['products_tax_class_id']); ? ? ? ? ?$products_price = $product['products_price']; ? ? ? ? ?$products_weight = $product['products_weight']; REPLACE WITH // products price ? ? ? ?$product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); ? ? ? ?if ($product = tep_db_fetch_array($product_query)) { ? ? ? ? ?$prid = $product['products_id']; ? ? ? ? ?$products_tax = tep_get_tax_rate($product['products_tax_class_id']); ? ? ? ? ?$products_price = $product['products_price']; ? ? ? ? ?$products_cost = $product['products_cost']; ? ? ? ? ?$products_weight = $product['products_weight']; FIND ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'price' => $products[$i]['price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), REPLACE WITH ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'price' => $products[$i]['price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'cost' => $products[$i]['cost'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), includes/classes/shopping_cart.php FIND ? ? ?while (list($products_id, ) = each($this->contents)) { ? ? ? ?$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); REPLACE WITH ? ? ?while (list($products_id, ) = each($this->contents)) { ? ? ? ?$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_cost, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); FIND ? ? ? ? ?$products_array[] = array('id' => $products_id, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'name' => $products['products_name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'model' => $products['products_model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'image' => $products['products_image'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'price' => $products_price, REPLACE WITH ? ? ? ? ?$products_array[] = array('id' => $products_id, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'name' => $products['products_name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'model' => $products['products_model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'image' => $products['products_image'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'price' => $products_price, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'cost' => $products['products_cost'], checkout_process.php FIND ? ?$sql_data_array = array('orders_id' => $insert_id, ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_id' => tep_get_prid($order->products[$i]['id']), ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_model' => $order->products[$i]['model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_name' => $order->products[$i]['name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_price' => $order->products[$i]['price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $order->products[$i]['final_price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_tax' => $order->products[$i]['tax'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_quantity' => $order->products[$i]['qty']); REPLACE WITH ? ?$sql_data_array = array('orders_id' => $insert_id, ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_id' => tep_get_prid($order->products[$i]['id']), ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_model' => $order->products[$i]['model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_name' => $order->products[$i]['name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_price' => $order->products[$i]['price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_cost' => $order->products[$i]['cost'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $order->products[$i]['final_price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_tax' => $order->products[$i]['tax'], ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_quantity' => $order->products[$i]['qty']); Cheers, VB FIND // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; REPLACE WITH // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_cost = $product['products_cost']; $products_weight = $product['products_weight']; I am unable to locate this in /includes/classes/order.php Quote Link to comment Share on other sites More sharing options...
Guest Posted August 18, 2004 Share Posted August 18, 2004 Guys, I have compiled the bugfixes contributed by vaughnn, fixed the duplicated installation instructions, reconsolidate and uploaded as v2.56. http://www.oscommerce.com/community/contributions,1594 I hope this cleans up some of the issues reported so far. Do let us noe if there is anymore bugs found. Thank You. Quote Link to comment Share on other sites More sharing options...
cgchris99 Posted August 18, 2004 Share Posted August 18, 2004 I use this report but I think it is missing some information. The report should take into account shipping costs and also calculate the credit card transaction fees. I like to know my actual profits. With this information missing it skews the results. Quote Link to comment Share on other sites More sharing options...
blueline Posted August 19, 2004 Author Share Posted August 19, 2004 I use this report but I think it is missing some information. The report should take into account shipping costs and also calculate the credit card transaction fees. I like to know my actual profits. With this information missing it skews the results. This was built to calculate gross profit...not net. Obviously I don't know what everyone is paying in credit card fees, etc....but I can look into integrating some additional variables that you can define during installation that may take care of these issues. Quote Chris Sullivan Link to comment Share on other sites More sharing options...
dcsteve72 Posted August 19, 2004 Share Posted August 19, 2004 I think being able to specifyy some options would be great as well. But, you would really have to get pretty detailed in what options you provided to actually show the *REAL* profit and almost too many variables to really get a true picture. Thus, you'd need a good bookkeeper or accountant (which you should have anyways). If OSCommerce had/had contributions that focused more on the accounting aspects, then ok, but I'm not so sure that the margin report is the best place to house that information. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 19, 2004 Share Posted August 19, 2004 (edited) I use this report but I think it is missing some information.? The report should take into account shipping costs and also calculate the credit card transaction fees.? I like to know my actual profits.? With this information missing it skews the results. This was built to calculate gross profit...not net. Obviously I don't know what everyone is paying in credit card fees, etc....but I can look into integrating some additional variables that you can define during installation that may take care of these issues. Great work pal on this contribution. I juz help out to keep things intact and organised... No offense but I feel that we do not need new features right now. What we need is to improve on the existing codes, and bugfixing. For genuine full accounting aspects, owners of online stores should either get a proper accountant and accounting practises that is approved by auditors, not contributions of osC, which is just to aid in the work automation and reduction, not as a replacement. There are still some functionality in margin_report2.php that ain't working well. So let's focus on this first. Eg. if there are orders that were cancelled, it still shows in the margin report right? We need to exclude cancelled orders, without having to delete the order itself cause in real world practises, all orders should be retain and auditable. Edited August 19, 2004 by chaicka Quote Link to comment Share on other sites More sharing options...
cgchris99 Posted August 19, 2004 Share Posted August 19, 2004 I agree it is for showing gross margin. I usually remove the credit card fees from my gross margin since they are taken off the top automatically. Maybe I am too picky about it but when I see a gross margin and then know for a fact that 2.xxx% is automatically removed, it bothers me. You can't even just remove the disc % rate because it doesn't take into account the % rate on the shipping as well. Don't get be wrong, I really like having the report. I just may have to tweak at little more for my ANALytical mentality. thanks for a great contribution Quote Link to comment Share on other sites More sharing options...
cgchris99 Posted August 20, 2004 Share Posted August 20, 2004 Found a new problem. The margin doesn't take into consideration any 'specials' it calculates based on the full price. This is fine for the inventory report. However, the monthly reports that look at individual orders should look at the order and take the price from there. What if you manually enter an order and give someone a special price? Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.