I'm not sure if this is intentionally omitted but in order to be consistent with the rest of the pages this should be included in sales_orders_view.php as well.


if (!isset($_POST['customer_id']))
    $_POST['customer_id'] = get_global_customer();

I think what you're looking for is this: https://ibb.co/NYBnHkw

in sales_order_view.php add a new function:

function attach_link($row) 
{
    global $trans_type;
        return pager_link( _("Attach Documents"),
            "/admin/attachments.php?filterType=".$trans_type."&trans_no=" .$row['order_no'], ICON_ATTACH);
}

then under-> elseif ($trans_type == ST_SALESQUOTE) {
add ->  array('insert'=>true, 'fun'=>'attach_link')


*you'll have to create/define ICON_ATTACH in includes/types.php

3

(10 replies, posted in FA Modifications)

This can be useful to calculate shipping cost too. Especially on quotes or sales orders.

I purchased a laptop for $1000 -> depreciation 50% per year, but it will not show in Profit & Loss Statement at the end of the year.

What am I missing?

The item show as asset in the system but it's not calculated for end of year tax deduction.

let's say your have an employee that resigned but after a few month he's coming back

in include/ui/employee_ui.php add function at end

function employee_inactive_row($label, $name, $active=null) {
    echo "<tr><td class='label'>$label</td><td>";
   
    if($active==0){
        echo "<input type='radio' name=$name value='0' checked > Active&nbsp;&nbsp;&nbsp;";
        echo "<input type='radio' name=$name value='1'> Resigned &nbsp;&nbsp;&nbsp;";
        echo "<input type='radio' name=$name value='2'> Fired";
    }
    elseif($active==1) {
         echo "<input type='radio' name=$name value='0'> Active&nbsp;&nbsp;&nbsp;";
        echo "<input type='radio' name=$name value='1' checked> Resigned &nbsp;&nbsp;&nbsp;";
        echo "<input type='radio' name=$name value='2'> Fired";
    }
    else {
        echo "<input type='radio' name=$name value='0'> Active&nbsp;&nbsp;&nbsp;";
        echo "<input type='radio' name=$name value='1'> Resigned &nbsp;&nbsp;&nbsp;";
        echo "<input type='radio' name=$name value='2' checked> Fired";
    }
    echo "</td></tr>";
}

in manage/employee.php

replace line 310 with
employee_inactive_row(_('Status').':', 'EmpInactive', get_post('EmpInactive') );

to handle the fired message replace line 145 with
if (get_post('EmpInactive') == 1 or get_post('EmpInactive') ==2) {



Now your have better options to handle this.

This will solve a database error "Incorrect integer value"

I get all sorts of errors. here's one when you try to add employees:

DATABASE ERROR : Could not write employee data
error code : 1366
error message : Incorrect integer value: '' for column 'emp_id' at row 1

or another one

DATABASE ERROR : Could not write employee data
error code : 1366
error message : Incorrect integer value: '' for column 'inactive' at row 1

7

(3 replies, posted in Report Bugs here)

Sorry guys, I think this might be my doing because of some changes I made in pdf_report.inc

8

(3 replies, posted in Report Bugs here)

if you try to print some documents (like customer statement) the file is .pdf -> as in empty.pdf

so in pdf_report.inc change $fname to
$fname = $dir.'/'.uniqid('').'.pdf';

9

(4 replies, posted in Report Bugs here)

@joe I increased the width of popup windows to 1100x650 through the scripts. It seems to fit better with screen sizes and resolution this days...

10

(4 replies, posted in Report Bugs here)

the menu is not suppose to show when your press F2 and F4 from sales_order_entry.php

so customer.php replace line 22 with
page(_($help_context = "Customers"), @$_REQUEST['popup'], false, "", $js);

and items.php replace line 35 with
page($_SESSION['page_title'], @$_REQUEST['popup'], false, "", $js);

11

(0 replies, posted in FA Modifications)

I like to call a function after new item is added "Add Item Button" and page is updated with new item. What's the ajax for that?

- ajax success -> do something
-ajax error -> do something else

12

(5 replies, posted in Installation)

has anyone been able to upgrade to 2.4? the biggest issue I have is database compatibility.

@apmuthu do you have an sql dump file to convert 2.3 to 2.4?

boxygen wrote:

I can see this commit by @joe for Item Editable Description. I have applied this but I couldn't find any change in Behaviour of Editable Item Description. Any Idea how shall I expect the change?


to view in pages and PDF add -nl2br- in -> sales\includes\ui\sales_order_ui.inc -> around line 183

label_cell($stock_item->item_description);

to

label_cell(nl2br($stock_item->item_description) );



you also want to replace in sales\includes\ui\sales_order_ui.inc around line 492

text_cells(null,'item_description', null, 45, 150);

to

textarea_cells(null, 'item_description', null, '45' , 5,  $title = null);

14

(0 replies, posted in FA Modifications)

if you want a bit more space between line items in your PDF files add the following under "while" loop in rep109.php
around line 108 add

 $rep->NewLine(1,0,5); // 1 stand for new line and 5 for space height

you can change 5 to 10 if you want more space

you can do the same for quotes, invoices etc...

15

(4 replies, posted in Wish List)

I'm using phpmailer on several projects and it works great. Emails will pass through google and yahoo spam filter.
I don't know much about swiftmailer, but I read that now requires PHP 7.0 or higher.

16

(4 replies, posted in Wish List)

php mail function is becoming unreliable this days, not to mention gmail and yahoo spam filter doesn't like emails sent this way. Also, if you are on a shared host account, you can experience a few hours delay in sending out email.

A better alternative is phpmailer or even better SMPT.

If phpmailer is used, it will be very useful to have the sender as the login user account. This way Salesman Bob is sending quote email to Company A, so that if Company A have questions, it will call Salesman Bob.

If u want to select all text/number with one click from item input box (very handy on mobile) add this:

includes/ui/ui_input.php around line 749 replace:
echo "<input class='amount' type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" dec=\"$dec\" value=\"" . $_POST[$name]. "\">";

with:
echo "<input onClick='this.select();' class='amount' type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" dec=\"$dec\" value=\"" . $_POST[$name]. "\">";


no more backspace or double click to change values.

this should be a great feature, resizable textarea instead of textbox. I think this post should move to Wish List...

19

(6 replies, posted in Wish List)

Account number as a unique ID for each account.
Each Account have an ID in database, that can be use, or a complete new number.

Example:
Forman and Son Enterprises -> account# 235
Forman Design and Something -> account #244

So when the customer call with questions about the account all you need is the account number (which by the way can also be the phone number) and make it easier and faster to search.

In US a lot of companies associate your phone number with the account number, so when you call, before they answer your call they pull up your account info to speed up the process.

20

(6 replies, posted in Wish List)

Account numbers could be a helpful thing to have, especially when you have to deal with a lot of business using similar name. This should avoid any confusion.
Also it will make it easier and faster to do searches for transactions.

21

(1 replies, posted in Wish List)

Under - Reports and Analysis -> General Ledger -> Profit and Loss Statement, you can get reports for specific dimensions which is very helpful, but what about if you want to exclude a dimension from the report.

  Profit and Loss Statement for all sales except a dimension or two.

@apmuthu is right, you open a can of worms if you try to push FA info on documents.

I believe there are several reasons, FA is not the most popular open source accounting script out there, but that's a big/long topic for another post...

23

(3 replies, posted in Wish List)

Here's a better example: https://ibb.co/irCVgc

This is how I config my sales/quotes orders.

Now, if customer calls and wants to purchase another item for living room, that item will be added last in the list, and fulfilling this order is nothing but a puzzle

24

(3 replies, posted in Wish List)

yes but if the customer wants to add "living room item 3" to this order, then the items list look like:

Living Room Item 1
Living Room Item 2
Dining Room Item 1
Dining Room Item 2
Living Room Item 3
...

do you see the problem? and if you have multiple items, it's hard to keep track of items

25

(3 replies, posted in Wish List)

It will be very helpful to be able to drag and drop items to rearrange the order. For a manufacturing company you're constantly changing the configuration of items, specially for quotes purposes. This way you can group items by properties...

Example:
Group Items - Living room
item1
item2
item3

Group Items - Dining room
item1
item2

Group Item - what ever
Item1
item2

Now, if the customer want to add "item4" in Group Living Room, this item will be added to the end of the list, making it very difficult to keep track of what you are ordering/customizing.