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.
252 11/18/2023 08:45:47 pm
Re: 0005724: Bug In Date Editing in Latest FA (7 replies, posted in Report Bugs here)
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.
253 11/18/2023 08:36:03 pm
Re: Print the payment, deposit and transfer transactions directly (2 replies, posted in Banking and General Ledger)
At each display_note() you have appended:
//Para imprimir deposito
submenu_view(_("&View this Deposit"), ST_BANKDEPOSIT, $trans_no);
//Para imprimir depositoand
//Para imprimir Transferencia
submenu_view(_("&View this Transfer"), ST_BANKTRANSFER, $trans_no);
//Para imprimir pagointo the files respectively.
254 11/18/2023 08:32:24 pm
Re: Rep704 Total Debit and Total Credit (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.
255 11/18/2023 08:25:15 pm
Re: Show bank account in Customer Transactions type:payment (2 replies, posted in Accounts Receivable)
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?
256 11/07/2023 01:53:38 am
Re: Is FrontAccounting right for me? (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 NULLIf the above is beyond you, request professional assistance in the Job/Offers board with an appropriate bounty.
258 11/05/2023 04:14:03 am
Re: Import Transactions not working (28 replies, posted in Modules/Add-on's)
Post it here for a good discussion. Mantis participation is sparse but technical. Github is for accepted code after peer review.
259 11/05/2023 04:12:39 am
Re: Is FrontAccounting right for me? (8 replies, posted in Installation)
Are you on Linux or Windows?
Check the includes/session.inc file and make the first constant NULL.
260 11/01/2023 02:20:31 pm
Re: Invoice:Figures to Words , previous code not working in version 2.4.17 (2 replies, posted in Reporting)
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
261 11/01/2023 02:14:11 pm
Re: Emailing not setting mime-type (40 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.
262 11/01/2023 02:03:07 pm
Re: Is FrontAccounting right for me? (8 replies, posted in Installation)
What is the PHP version you are using?
263 10/27/2023 07:22:12 pm
Re: Release 2.4.17 (4 replies, posted in Announcements)
Post Release Fixes attached.
Github Master (Bleeding Edge) Download Link
These fixes can be applied to (overwrite) the release version to be fully functional.
264 10/27/2023 06:47:39 pm
Topic: Better sql construct in sales/includes/db/sales_order_db.inc (3 replies, posted in Accounts Receivable)
At the end of the file sales/includes/db/sales_order_db.inc we have:
function last_sales_order_detail($order, $field)
{
$sql = "SELECT $field
FROM ".TB_PREF."sales_order_details d
WHERE order_no =
(SELECT order_no FROM ".TB_PREF."sales_orders o
WHERE debtor_no=" . db_escape($order->customer_id) . "
ORDER BY order_no DESC LIMIT 1)
ORDER BY d.id DESC LIMIT 1";
$last_query=db_query($sql, "Could not retrieve last order detail");
$row = db_fetch_row($last_query);
return $row == false ? false : $row[0];
}Kindly change it to:
function last_sales_order_detail($order, $field)
{
$sql = "SELECT $field
FROM ".TB_PREF."sales_order_details d
LEFT JOIN " .TB_PREF."sales_orders o on d.order_no=o.order_no
WHERE debtor_no=" . db_escape($order->customer_id) . "
ORDER BY d.id DESC LIMIT 1";
$last_query=db_query($sql, "Could not retrieve last order detail");
$row = db_fetch_row($last_query);
return $row == false ? false : $row[0];
}It uses a left join instead of a secondary select.
The on d.order_no=o.order_no can become USING (order_no) to further optimise it.
265 10/27/2023 06:21:07 pm
Re: Release 2.4.17 (4 replies, posted in Announcements)
Those with issues regarding MIME type in emailrefer this post. - Resolved
266 10/27/2023 06:14:42 pm
Re: Is FrontAccounting right for me? (8 replies, posted in Installation)
GST/HST - ok
Multi Currency - ok
Payroll - contact @notrinos for his Open Source extension and @kvvaradha's commercial extension (do not know if it needs ioncube or other coded licencing)
Reconciliation - rudimentary but sufficient for simple tasks - check the extensions.
For QB features vs FA - there may be other users whose migration experiences may be useful.
Welcome to the project!
267 10/27/2023 06:07:21 pm
Re: Item Code length limited in the box for entering. (2 replies, posted in Items and Inventory)
Clear cache in FA and in the browser and then try.
268 10/27/2023 06:06:17 pm
Re: Project Tasks (11 replies, posted in Modules Add-on's)
Can create a separate php application using the FA Tables data and extend the existing rudimentary CRM in FA. Can also use the document upload attachment facility in FA to integrate with manual systems too.
269 10/19/2023 04:44:28 pm
Re: Release 2.4.17 (4 replies, posted in Announcements)
Release date 2023-10-09 as of GitHub commit https://github.com/FrontAccountingERP/FA/commit/4e6c60dfc8ab630d72010941b00f65b9659fe0b3
SF Download Link
MD5: ae2e009a6d89f6118d4c45fd5954ec1d
Filesize: 1,884,638 bytes
270 10/19/2023 04:35:33 pm
Re: Release 2.4.17 (4 replies, posted in Announcements)
Two new translation strings introduced in lang/new_language_template/LC_MESSAGES/empty.po
Could not retrieve %s bank account number
Could not retrieve exchange rate for %s - %s271 10/19/2023 04:27:51 pm
Re: Project Tasks (11 replies, posted in Modules Add-on's)
Can try to link with vTigerCRM
272 10/19/2023 04:22:01 pm
Re: Customer Portal (2 replies, posted in Modules Add-on's)
Also consider what would happen if someone tried a negative value as payment!
273 09/16/2023 04:08:07 am
Re: A problem with the entry reference (1 replies, posted in Report Bugs here)
This is a well known race condition. The corresponding INSERT statement should be modified to make the primary key as NULL so that it is generated at runtime and then last_insert_id() should be used to populate the dependant foreign keys.
274 09/16/2023 04:05:21 am
Re: Cannot install 2.4.16 (4 replies, posted in Installation)
Check the config file for any relative / absolute urls and for directory separator issues.
State your PHP / MySQL versions.
275 09/16/2023 03:57:53 am
Re: How to round total selling price from $1,499.94 to $1,500 (7 replies, posted in Items and Inventory)
Add a negative discount of 6 cents
