What are the demo limitations?

52

(36 replies, posted in Reporting)

Some have success with PHP 8.0 and many have problems with later PHP versions.

53

(36 replies, posted in Reporting)

Some have success with PHP 8.0 and many have problems with later PHP versions.

A note page in the wiki would be good to know the extent of PHP version compatibility for each release.

55

(1 replies, posted in Reporting)

Generally only the repXXX.php files can be so placed. @joe - can the above be done too?

56

(5 replies, posted in Installation)

A cronjob is easily done in linux. Contact your hosting admin.

Which Report are you referring to?

58

(1 replies, posted in Wish List)

Make a multi lingual string for the description with a utf8 field type

59

(3 replies, posted in Reporting)

Why don't you fork the FA in GitHub and make a folder with changed files after a commit to import the original into the changes folder. That way it will be able to track changes whenever a changed file is updated in the core. Have a look at my fork.

Possible write permission error in the web server path.

It doesn't appear to have been pushed into the GitHub repo yet here. but is available in the SF.net repo. Hope the GitHub repo gets synched correctly in time.

Unofficial FA 2.4.x extensions repo

63

(3 replies, posted in Wish List)

Please make customisation to current version / master code base listing diff files. Use WinMerge for it as you are using windows (CRLF in your files).

64

(5 replies, posted in Installation)

Can re-validate session when it expires until logout - no need for db tables and other customisations. A cronjob to revalidate all sessions from time to time is also another option without FA code change.

This occurs due to lines 28-32 in includes/db/audit_trail_db.inc:

    $sql = "UPDATE ".TB_PREF."audit_trail audit LEFT JOIN ".TB_PREF."fiscal_year year ON year.begin<='$date' AND year.end>='$date'
        SET audit.gl_seq = IF(audit.id=".db_insert_id().", 0, NULL),"
        ."audit.fiscal_year=year.id"
        . " WHERE type=".db_escape($trans_type)." AND trans_no="
        . db_escape($trans_no);

If there is no valid matching value of the field fiscal_year as happens when no records for fiscal year in question, this will error out.

At each display_note() you have appended:

    //Para imprimir deposito
    submenu_view(_("&View this Deposit"), ST_BANKDEPOSIT, $trans_no);
    //Para imprimir deposito

and

     //Para imprimir Transferencia
    submenu_view(_("&View this Transfer"), ST_BANKTRANSFER, $trans_no);
    //Para imprimir pago

into the files respectively.

67

(3 replies, posted in Reporting)

Looks like you maybe using a dated version of your report file for your customisation where you adjust and add some column widths and insert in those values in the new columns.

Looks like you are using an older version of sales/includes/db/cust_trans_db.inc. You have added a function at nearly the end of the said file as:

function get_sql_for_customer_inquiry_with_bank($from, $to, $cust_id = ALL_TEXT, $filter = ALL_TEXT, $show_voided = 0, $bank="")
{
    $date_after = date2sql($from);
    $date_to = date2sql($to);

    $sql = "SELECT 
          trans.type, 
        trans.trans_no, 
        trans.order_, 
        trans.reference,
        trans.tran_date, 
        trans.due_date, 
        debtor.name, 
        branch.br_name,
        debtor.curr_code,
        bank_account_name,
        IF(prep_amount, prep_amount, trans.ov_amount + trans.ov_gst + trans.ov_freight 
            + trans.ov_freight_tax + trans.ov_discount)    AS TotalAmount,"
//       if ($filter != ALL_TEXT)
//          $sql .= "@bal := @bal+IF(prep_amount, prep_amount, trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount), ";

//    else
//        $sql .= "IF(trans.type=".ST_CUSTDELIVERY.",'', IF(trans.type=".ST_SALESINVOICE." OR trans.type=".ST_BANKPAYMENT.",@bal := @bal+
//            (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount), @bal := @bal-
//            (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount))) , ";
        . "IF(trans.type IN(".implode(',',  array(ST_CUSTCREDIT,ST_CUSTPAYMENT,ST_BANKDEPOSIT))."), -1, 1)
                *(IF(prep_amount, prep_amount, trans.ov_amount + trans.ov_gst + trans.ov_freight 
            + trans.ov_freight_tax + trans.ov_discount)-trans.alloc) Balance, 
        debtor.debtor_no,";

    $sql .= "trans.alloc AS Allocated,
        ((trans.type = ".ST_SALESINVOICE." || trans.type = ".ST_JOURNAL.")
            AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue ,
        Sum(line.quantity-line.qty_done) AS Outstanding,
        Sum(line.qty_done) AS HasChild,
        prep_amount";
    // it's a payment so also get the bank account
    $sql .= ", bank_act,".TB_PREF."bank_accounts.account_type AS BankTransType,
        ".TB_PREF."bank_accounts.bank_curr_code,
        ".TB_PREF."bank_accounts.id,
        ".TB_PREF."bank_trans.amount as bank_amount";
    $sql .= " FROM "
        .TB_PREF."debtor_trans as trans
            LEFT JOIN ".TB_PREF."debtor_trans_details as line
                ON trans.trans_no=line.debtor_trans_no AND trans.type=line.debtor_trans_type
            LEFT JOIN ".TB_PREF."voided as v
                ON trans.trans_no=v.id AND trans.type=v.type
                        LEFT JOIN ".TB_PREF."audit_trail as audit ON (trans.type=audit.type AND trans.trans_no=audit.trans_no)
                        LEFT JOIN ".TB_PREF."users as user ON (audit.user=user.id)
            LEFT JOIN ".TB_PREF."cust_branch as branch ON trans.branch_code=branch.branch_code,"
        .TB_PREF."debtors_master as debtor";
    $sql .= ", ".TB_PREF."bank_trans, ".TB_PREF."bank_accounts";

    $sql .= " WHERE debtor.debtor_no = trans.debtor_no"; // exclude voided transactions and self-balancing (journal) transactions:
    if (!$show_voided)
        $sql .= " AND ISNULL(v.date_) AND (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount) != 0";

    if ($filter == '2')
        $sql .= " AND ABS(IF(prep_amount, prep_amount, ABS(trans.ov_amount) + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount)-trans.alloc)>"
            .FLOAT_COMP_DELTA;
    else {
        $sql .= " AND trans.tran_date >= '$date_after'
            AND trans.tran_date <= '$date_to'";
    }

    if ($cust_id != ALL_TEXT)
        $sql .= " AND trans.debtor_no = ".db_escape($cust_id);

    if ($filter != ALL_TEXT)
    {
        if ($filter == '1')
        {
            $sql .= " AND (trans.type = ".ST_SALESINVOICE.") ";
        }
        elseif ($filter == '2')
        {
            $sql .= " AND (trans.type <> ".ST_CUSTDELIVERY.") ";
        }
        elseif ($filter == '3')
        {
            $sql .= " AND (trans.type = " . ST_CUSTPAYMENT
                ." OR trans.type = ".ST_BANKDEPOSIT." OR trans.type = ".ST_BANKPAYMENT.") ";
        }
        elseif ($filter == '4')
        {
            $sql .= " AND trans.type = ".ST_CUSTCREDIT." ";
        }
        elseif ($filter == '5')
        {
            $sql .= " AND trans.type = ".ST_CUSTDELIVERY." ";
        }

        if ($filter == '2')
        {
            $today =  date2sql(Today());
            $sql .= " AND trans.due_date < '$today'
                AND (ABS(trans.ov_amount) + trans.ov_gst + trans.ov_freight_tax + 
                trans.ov_freight + trans.ov_discount - trans.alloc > 0) ";
        }
    }

    // it's a payment so also get the bank account
    $sql .= " AND ".TB_PREF."bank_trans.trans_no = trans.trans_no
            AND ".TB_PREF."bank_trans.type = trans.type
            AND ".TB_PREF."bank_trans.amount != 0
            AND ".TB_PREF."bank_accounts.id=".TB_PREF."bank_trans.bank_act";
    if($bank!=""){
        $sql .= " AND ".TB_PREF."bank_accounts.id=".db_escape($bank);
    }

    $sql .= " GROUP BY trans.trans_no, trans.type, trans.debtor_no";

    return $sql;
}

What did you mean by "insert the files at this address" ? Should some function calls in the said files be replaced with the above function?

69

(8 replies, posted in Installation)

Switch your hosting provider otherwise to one which allows different versions pf PHP like PHP 5, 5.5.
What is your MySQL/MariaDB versions? As your hosting provider if you do not know how.
What happens if you do not use https and just use http instead?
change Line 14 in includes/session.inc as appropriate:

define('SECURE_ONLY', true); // if you really need also http (unsecure) access allowed, you can set this to NULL

If the above is beyond you, request professional assistance in the Job/Offers board with an appropriate bounty.

70

(36 replies, posted in Reporting)

Tnx

Post it here for a good discussion. Mantis participation is sparse but technical. Github is for accepted code after peer review.

72

(8 replies, posted in Installation)

Are you on Linux or Windows?
Check the includes/session.inc file and make the first constant NULL.

The various cheque extensions have this constant:
https://github.com/apmuthu/FA24extensions/blob/master/Extensions/rep_batch_check_print/reporting/rep_batch_check_print.php
https://github.com/apmuthu/FA24extensions/blob/master/Extensions/rep_check_print/reporting/rep_check_print.php
https://github.com/apmuthu/FA24extensions/blob/master/Extensions/rep_cheque_print/reporting/rep_cheque_print.php

74

(36 replies, posted in Reporting)

@irronics, @joe: The said patch for reporting/includes/class.mail.inc will break for all versions of PHP < 5.4.
Refer the line:

var $headers = [];

It should be changed to:

var $headers = Array();

We need to take care of legacy users so as not to break their installs.

The PHP short array syntax does not work for older versions of PHP.

As of PHP 5.4 you can also use the short array syntax, which replaces array() with [].
https://stackoverflow.com/questions/40086788/short-array-syntax-in-php-5-6-doesnt-work

In fact there is a short array sniffer to check if needed but that is too bothersome.

75

(8 replies, posted in Installation)

What is the PHP version you are using?