1

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

@aterad & @@ngicon I have successfully installed shipment tracking module on FA 2.4.11

1. Please Download module from https://github.com/apmuthu/FA24extensions
2. Paste it in your module directory and make sure you don't change folder name shipment_tracking
3. Install plugin shipment_tracking from setup -> Install/Activate Extensions
4. Activate extension shipment_tracking for your company
5. Give access permission to your role setup -> Access Setup
6. Logout FA and re-login to your account.

Hope this will help you

2

(13 replies, posted in Reporting)

@mayassleiman I have used TCPDF for this invoice type. You can find so useful information here https://frontaccounting.com/punbb/viewtopic.php?id=9018

3

(7 replies, posted in Manufactoring)

@kurt I am available to FrontAccounting training if you are interested PM.

4

(15 replies, posted in Installation)

I faced a similar issue, fixed it replacing FrontHrm folder in modules folder with latest version https://github.com/notrinos/FrontHrm

5

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

@gssekhar please make sure to use customer group for indian states as it will help you for place of supply. Here is screenshot for HSN module

6

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

@ngicon try to enable debug

config.php

    $debug             = 1;
    $go_debug         = 1;

and share error message.

7

(5 replies, posted in Reporting)

@nilesh230780 I have used TCPDF for this invoice type. You can find so useful information here https://frontaccounting.com/punbb/viewtopic.php?id=9018

8

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

@verviv I has this module for Indian GST I soon update it on my GitHub repo.

9

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

Indian GST Unit Of Measure 0_item_units SQL Data Dumping

DROP TABLE IF EXISTS `0_item_units`;
-- --------------------------------------------------------

--
-- Table structure for table `0_item_units`
--

CREATE TABLE `0_item_units` (
  `abbr` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  `decimals` tinyint(2) NOT NULL,
  `inactive` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `0_item_units`
--

INSERT INTO `0_item_units` (`abbr`, `name`, `decimals`, `inactive`) VALUES
('BAG', 'Bags', 0, 0),
('BAL', 'Bale', 0, 0),
('BDL', 'Bundles', 0, 0),
('BKL', 'Buckles', 0, 0),
('BOU', 'Billions Of Units', 0, 0),
('BOX', 'Box', 0, 0),
('BTL', 'Bottles', 0, 0),
('BUN', 'Bunches', 0, 0),
('CAN', 'Cans', 0, 0),
('CBM', 'Cubic Meter', 2, 0),
('CCM', 'Cubic Centimeter', 2, 0),
('CMS', 'Centimeter', 2, 0),
('CTN', 'Cartons', 1, 0),
('DOZ', 'Dozen', 1, 0),
('DRM', 'Drum', 1, 0),
('GGR', 'Great Gross', 1, 0),
('GMS', 'Grams', 3, 0),
('GRS', 'Gross', 1, 0),
('GYD', 'Gross Yards', 2, 0),
('KGS', 'Kilograms', 3, 0),
('KLR', 'Kiloliter', 3, 0),
('KME', 'Kilometre', 2, 0),
('MLT', 'Millilitre', 3, 0),
('MTR', 'Meters', 2, 0),
('NOS', 'Numbers', 0, 0),
('OTH', 'Others', 0, 0),
('PAC', 'Packs', 0, 0),
('PCS', 'Pieces', 0, 0),
('PRS', 'Pairs', 0, 0),
('QTL', 'Quintal', 3, 0),
('ROL', 'Rolls', 1, 0),
('SET', 'Sets', 1, 0),
('SQF', 'Square Feet', 3, 0),
('SQM', 'Square Meters', 3, 0),
('SQY', 'Square Yards', 3, 0),
('TBS', 'Tablets', 0, 0),
('TGM', 'Ten Gross', 0, 0),
('THD', 'Thousands', 2, 0),
('TON', 'Tonnes', 3, 0),
('TUB', 'Tubes', 1, 0),
('UGS', 'US Gallons', 2, 0),
('UNT', 'Units', 0, 0),
('YDS', 'Yards', 2, 0);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `0_item_units`
--
ALTER TABLE `0_item_units`
  ADD PRIMARY KEY (`abbr`),
  ADD UNIQUE KEY `name` (`name`);
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

I will soon update this module with some reports like Invoice Receipt, which will give you clear idea on how to use it. If you urgently need any help PM me.

Customer Credit Note Doesn't Show Transaction References List as dropdown list, when having more than one transaction reference for customer credit note.

https://mpulse.in/images/Credit_Note.jpg

@apmuthu: Sorry for not pushing, README.md to repo. I will update it today with all details.

@joe: Thanks for your reply, you are correct new version is quite heavy and our current version is absolutely working fine and we can include existing TCPDF Class in this module.

FA TCPDF library used  4.0.027 (2008-09-19)
For example: QR Code (2D barcode) support was added from version 4.9.000

Since version 4.0.027 till 6.3.2 CHANGE LOG

I know we can create report placing repXXX.php in company/0/reporting but was stuck in some places eg: loading images, loading new ttf fonts etc. So came up with this.

Purpose of this module, is to overwrite existing FA reports with own template report - We can use existing older / newer or any other PDF library.

We have just pasted TCPDF library into module folder, and include to use it's class for creating pdf files. If we want to use some other library we can do that as well. 

Why this approach?
Changing core system file is not good idea, it may cause problem in updating software and troubleshoot problem.

Only those who need huge customization can you it

So here is what we are doing - First registering our module to enable hook.

define ('IMPULSE_TCPDF', 251<<8);

class hooks_TCPDF extends hooks {

    function __construct() {
        $this->module_name = 'TCPDF';
    }
    
    function install_access() {
        $security_sections[IMPULSE_TCPDF] =  _('TCPDF');
        $security_areas['PULSE_PDF'] = array(IMPULSE_TCPDF|1, _('Allow PDF Printing'));
        return array($security_areas, $security_sections);
    }
    
    function activate_extension($company, $check_only=true) {
        global $db_connections;
        
        $updates = array( 'update.sql' => array('TCPDF'));
 
        return $this->update_databases($company, $updates, $check_only);
    }
    
    function deactivate_extension($company, $check_only=true) {
        global $db_connections;

        $updates = array('remove.sql' => array('TCPDF'));

        return $this->update_databases($company, $updates, $check_only);
    }
    
}

Now when we activate this module and provide access, while printing reports reporting/reports_main.php will scan through each active module searching for module_folder/reporting/reports_custom.php to add report and register controls.

Suppose we want to print rep107 with our template invoice we created with TCPDF or other library. In module_folder/reporting/reports_custom.php

global $reports;

// Override Reports Here
// You Can Find This In reporting/reports_main.php

$reports->addReport(RC_CUSTOMER, 107, _('Print &Invoices'),
    array(    _('From') => 'INVOICE',
            _('To') => 'INVOICE',
            _('Currency Filter') => 'CURRENCY',
            _('email Customers') => 'YES_NO',
            _('Payment Link') => 'PAYMENT_LINK',
            _('Comments') => 'TEXTBOX',
            _('Customer') => 'CUSTOMERS_NO_FILTER',
            _('Orientation') => 'ORIENTATION',
            _('Copy') => 'INV_COPY'
));

// Example To Register Controls

function invoice_copy($name, $type) {
    if($type == 'INV_COPY')
        return "<select name = '".$name."'><option value='0'>"._('Original Copy For Recipient')."</option><option value='1'>"._('Duplicate Copy For Transporter ')."</option><option value='2'>"._('Triplicate Copy For Supplier')."</option></select>";
}

$reports->register_controls('invoice_copy');

We have changed $reports object for our module. With new field Copy in Customer -- Print Invoices, same way we can add field or remove field.

Note: Only Those Report Added here Will Be Replace, Other Reports Does Not Have Any Effect.

Now we need last file rep107.php in module_folder/reporting this is invoice template file

<?php
        // $page_security can be found in respective file in reporting folder
        $page_security = 'SA_SALESTRANSVIEW';
        ob_start();

        $path_to_root="..";

        include_once($path_to_root . "/includes/session.inc");
        include_once($path_to_root . "/includes/date_functions.inc");
        include_once($path_to_root . "/includes/data_checks.inc");
        include_once($path_to_root . "/sales/includes/sales_db.inc");
        include_once($path_to_root . "/gl/includes/db/gl_db_currencies.inc");
        include_once($path_to_root . "/inventory/includes/db/items_db.inc");
       // here you can write your own fuctions
        include_once($path_to_root."/modules/TCPDF/reporting/includes/db/rep107_db.php");
       // this can be any PDF Libarary
        require_once($path_to_root . "/modules/TCPDF/tcpdf.php");

// ---------------------------------------------------------
        $from = $_POST['PARAM_0'];
        $to = $_POST['PARAM_1'];
        $invoice_currency = $_POST['PARAM_2'];
        $email = $_POST['PARAM_3'];
        $pay_service = $_POST['PARAM_4'];
        $comments = $_POST['PARAM_5'];
        $customer = $_POST['PARAM_6'];
        $i = $_POST['PARAM_7'];

        if (!$from || !$to) return;

        $dec = user_price_dec();

        $fno = explode("-", $from);
        $tno = explode("-", $to);
        $from = min($fno[0], $tno[0]);
        $to = max($fno[0], $tno[0]);
        $range = get_invoice_range($from, $to);
        
        // Demo Invoice Starts
        // In this example HTML is used to create PDF file.
        $html = '
        <style>
        table, tr, td {
        padding: 15px;
        }
        </style>
        <table style="background-color: #222222; color: #fff">
        <tbody>
        <tr>
        <td><h1>INVOICE<strong> #21234</strong></h1></td>
        <td align="right">
        123 street, ABC Store<br/>
        Country, State, 00000
        <br/>
        <strong>+00-1234567890</strong> | <strong>abc@xyz</strong>
        </td>
        </tr>
        </tbody>
        </table>
        ';
        $html .= '
        <table>
        <tbody>
        <tr>
        <td>Invoice to<br/>
        <strong>Demo Customer</strong>
        <br/>
        123 street, ABC Store<br/>
        Country, State, 00000
        </td>
        <td align="right">
        <strong>Total Due: $ 23,442.00/strong><br/>
        Tax ID: ABCDEFGHIJ12345<br/>
        Invoice Date: '.date('d-m-Y').'
        </td>
        </tr>
        </tbody>
        </table>
        ';
        $html .= '
        <table>
        <thead>
        <tr style="font-weight:bold;">
        <th>Item name</th>
        <th>Price</th>
        <th>Quantity</th>
        <th>Total</th>
        </tr>
        </thead>
        <tbody>';
        $html .= '
        <tr>
        <td style="border-bottom: 1px solid #222">Demo Item</td>
        <td style="border-bottom: 1px solid #222">$23,422.00</td>
        <td style="border-bottom: 1px solid #222">1</td>
        <td style="border-bottom: 1px solid #222">$23,422.00</td>
        </tr>
        ';
        $html .='
        <tr align="right">
        <td colspan="4"><strong>Grand total: $23,422.00</strong></td>
        </tr>
        <tr>
        <td colspan="4">
        <h2>Thank you for your business.</h2><br/>
        <strong>Terms and conditions:<br/></strong>
        It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using Content here, content here, making it look like readable English.
        </td>
        </tr>
        </tbody>
        </table>';
        // create new PDF document
        $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
        // set default monospaced font
        // set margins
        $pdf->SetMargins(-1, 0, -1);
        // remove default header/footer
        $pdf->setPrintHeader(false);
        $pdf->setPrintFooter(false);
        // set auto page breaks
        $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
        // set image scale factor
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        // Set font
        $pdf->SetFont('helvetica', '', 10);
        $pdf->AddPage();
        // Print text using writeHTMLCell()
        $pdf->writeHTMLCell(0, 0, '', '', $html, 0, 0, 0, true, '', true);
        // Demo Invoice Ends

        ob_end_clean();

        $filename = 'Invoice';


        $root_dir =  $_SERVER['DOCUMENT_ROOT'].substr(company_path(),3). '/pdf_files';
        $dir = company_path(). '/pdf_files';

        $fname = $root_dir.'/'.$filename.'.pdf';
        $pdf->Output($fname, 'F');


        if ($d = @opendir($dir)) {
        while (($file = readdir($d)) !== false) {
            if (!is_file($dir.'/'.$file) || $file == 'index.php') continue;
            $ftime = filemtime($dir.'/'.$file);
            if (time()-$ftime > 180){
                unlink($dir.'/'.$file);
            }
        }
        closedir($d);
        }

        global $Ajax;
        $Ajax->popup($dir.'/'.$filename.'.pdf'); 
        exit;

In the above example we included

       // here you can write your own fuctions for this template.
        include_once($path_to_root."/modules/TCPDF/reporting/includes/db/rep107_db.php");
       // this can be any PDF Libarary you are trying to print invoice with
        require_once($path_to_root . "/modules/TCPDF/tcpdf.php");

That's it now whenever user try to print invoice this report will print.

Here is sample Invoice Format I Created With TCPDF / dompdf in FrontAccountingERP

Invoice Template 1 - Rep107
Invoice Template 2  - Rep107
Invoice Template 3 - Rep107
Receipt Template 1 - Rep112

Your suggestion, thoughts and comment are appreciated.

Regards

I have made this module with TCPDF to over ride existing FA Reports with your own fancy report. Though you need basic PHP knowledge to make one.

No pre made reports has been provided with this module.

I have included Demo Rep107 as an example, get an idea from it.

See TCPDF examples here https://tcpdf.org/examples/

TCPDF Module Github https://github.com/impulse-solutions/FA-TCPDF

Regards

14

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

thanks @apmuthu: for the changes, I will update the suggested changes in my repo as well.

@anoopmb: I found this function in includes/hooks.inc

This database transaction hooks are for modules to invoked before transaction is voided

function hook_db_prevoid($type, $type_no)
{
    return hook_invoke_all('db_prevoid', $type, $type_no);
}

Where $type is type of transaction like ST_PURCHORDER. Which mean first parameter must be ST_PURCHORDER.

So your correct, but @joe or @apmuthu may provide more information on this.

Regards

16

(4 replies, posted in Items and Inventory)

I have created a module for HSN code, batch number, mrp, bin, expiry, manufacture, stocked date. PM me to know more.

17

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

update ship_via in debtor_trans field if shipping company is changed and has been committed to GITHUB.

files modified shipments\includes\db\tracking_db.inc with new function (updated attachment in first post)

@apmuthu: thanks for the information.

It would be great help if fiscal year start date and end date, fields can be included during FA fresh installation or during creating new company.

Regards

@apmuthu it because I was using Indian COA while installing new company and area access was not granted to System Administrator

in en_IN-new.sql

TABLE 0_security_roles

('2', 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;769;770;771;772;773;774;2817;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5641;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;10497;10753;10754;10755;10756;10757;11009;11010;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132;775', '0')

in en_US-new.sql -

TABLE 0_security_roles

('2', 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;9472;9728;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;526;769;770;771;772;773;774;2817;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5641;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;9217;9218;9220;9473;9474;9475;9476;9729;10497;10753;10754;10755;10756;10757;11009;11010;11011;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15628;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132;775', '0')

Missing sections

9472;9728

Missing Areas

9217;9218;9220;9473;9474;9475;9476;9729;11011;15628

Regards

21

(2 replies, posted in Setup)

@flpages very good work. I know how difficult it is to create informative videos. It will definitely help many FA users.

22

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

thanks @kvvaradha for correction. Bug has been fix and committed to github repository. Yes I am planning to provide.

1. Option to change shipment status
2. update ship_via in debtor_trans field if shipping company is changed.
3. provide hyperlink popup on tracking number string with API url.
4. shipping label - package wise
5. Option to change label size and package size.

opinion and suggestions are needed.

Regards

23

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

Hello

Created shipping tracking module for FA. In case anyone needs it.

https://github.com/impulse-solutions/FA … acking.git

Regards

@joe I have notice tax group is disabled for secondary company if we have more than one company in same database. Is this intentional or need to be corrected.

Regards

25

(1 replies, posted in FA Modifications)

@Mahmoud Ali may be you are looking for search item list while making invoice

Setup - Company Setup

Check Box - Search Item List

Now you can type product name and enter.. All matching item entries related to your search will be displayed in item list.

Tip: Avoid using mouse to focus on field instead use keyboard.

Type Keyword -- Enter -- TAB -- Up / Down Arrow to select product.

Bonus: Type * and Enter -- it will display all products.

Regards