Topic: Not translatable string in rep108

Hi,

Rep108 has a not-translatable string : display_notification ("No customers with outstanding balances found");

It should be : display_notification (_("No customers with outstanding balances found"));

Also po- en mo-files need to be updated.

Kind regards,
F.

Re: Not translatable string in rep108

Thanks for reporting this.

This is fixed and committed to stable repo.
A fixed empty.po file can be downloaded here[ and a fixed rep108.php can be downloaded here.

Joe

Re: Not translatable string in rep108

Thanks Joe !

I also have a suggestion for rep108 to NOT mail statements if there are no overdue debs :

        if (($email == 1) AND ((($CustomerRecord["Due"]-$CustomerRecord["Overdue1"]) <> 0) OR (($CustomerRecord["Overdue1"]-$CustomerRecord["Overdue2"]) <> 0) OR ($CustomerRecord["Overdue2"] <> 0)))
            $rep->End($email, _("Statement") . " " . _("as of") . " " . sql2date($date));
        else if ($email == 1)
            display_notification (_("Customer(s) has(have) no overdue debs."));

Needs also updated *.po-file.

F.

Re: Not translatable string in rep108

Yes, a good idea. Will do that later this evening.

Joe

Re: Not translatable string in rep108

@advocaat.pollet

Please download the file rep108.php1. Rename it to rep108.php and replace it in the /reporting folder.

Test this and report back.

If it is ok, we can commit it and update the po file.

/Joe

Re: Not translatable string in rep108

@Joe

When there are no overdue-debts :

Undefined index: name in bestand: /var/lib/(...)/vhost/(...)/frontaccounting/reporting/rep108.php op regel 186

Kind regards,
F.

Re: Not translatable string in rep108

Hi,

'Name' should be 'DebtorName'

F.

Re: Not translatable string in rep108

There is also another not-translatable string string in rep108 :

            $rep->filename = "Statement" . $myrow['debtor_no'] . ".pdf";

Should be :

            $rep->filename = _("Statement") . $myrow['debtor_no'] . ".pdf";

Kind regards,

F.

Re: Not translatable string in rep108

Hello again,

name changed to DebtorName.

@advocaat.pollet
Your last suggestion regarding $rep->filename change I am not sure this is a good idea. Normally we are not localizing file names.

Please downlows this file, rename, replace and check. If ok we will commit it and an empty.po to stable repo.

/Joe

Re: Not translatable string in rep108

Hi Joe,

A better approach that also works if allocations are shown :

        if ($email == 1)   
        {
            if (($CustomerRecord["Balance"]) != ($CustomerRecord["Balance"] - $CustomerRecord["Due"]))
                $rep->End($email, _("Statement") . " " . _("as of") . " " . sql2date($date) . " " . _("from") . " " . get_company_pref('coy_name'));
            else
                display_notification(sprintf(_("Customer %s has no overdue debs. No e-mail is send."), $myrow["DebtorName"]));       
        }

Notification is also more clear : No e-mail is send.

*.po-file needs to be updated :
-'from'
-'Customer %s has no overdue debs. No e-mail is send.'

Thanks !
F.

Re: Not translatable string in rep108

Ok, these changes has now been fixed and committed to stable repo.

A new rep108.php file can be downloaded here and a new empty.po can be downloaded here.

Joe

Re: Not translatable string in rep108

"Customer %s has no overdue debs. No e-mail is send."

should be:

"Customer %s has no overdue debits. No e-mail is sent."

Re: Not translatable string in rep108

Fixed and committed to stable repo.

A new rep108.php file can be downloaded here and a new empty.po can be downloaded here.

Joe