0
Hi,
I have brought a large majority of the joomla backend up to the front to allow admin functions without granting access into the backend.
I have tried your invoice before - whats the issue around joomla user look-ups, do I really have to create a company and search in that, I couldnt find a away around it, so had to minify the rows in the table and assign the user_id to that of the real joomla user to get it to work.
Is there a true method of binding joomla users to an invoice.
Also, I am wanting to bring the invoice creation to the frontend to admin level users can create invoices and/or modify invoices without the need to be in the backend.
My system creates invoices automatically and i had to assgn to joomlausers via updating the table to force the issue.
I just need a method of allowing financial accounting user to be able to update an invoice.
Any ideas, or direction other than bodging the admin controller.
I have brought a large majority of the joomla backend up to the front to allow admin functions without granting access into the backend.
I have tried your invoice before - whats the issue around joomla user look-ups, do I really have to create a company and search in that, I couldnt find a away around it, so had to minify the rows in the table and assign the user_id to that of the real joomla user to get it to work.
Is there a true method of binding joomla users to an invoice.
Also, I am wanting to bring the invoice creation to the frontend to admin level users can create invoices and/or modify invoices without the need to be in the backend.
My system creates invoices automatically and i had to assgn to joomlausers via updating the table to force the issue.
I just need a method of allowing financial accounting user to be able to update an invoice.
Any ideas, or direction other than bodging the admin controller.
Responses (8)
-
Accepted Answer
0invoices are bind to Contacts (using the user_id field), and Contats are the ones bind to real users (usgin the user_id field)
invoices -> contacts -> users
well, what you ask for is some deep customization.. basically you need to bring all the models controllers and views to the frontend to allow frontend edition...
but.. that's not easy, you will probably have to change controllers behavior, change function names ("tasks"), etc... :S -
Accepted Answer
0I spent a full day working on getting it on the frontend, your right too much configuration.
I decided the easiest option is to disable the menu in joomla cpanel and add a [RETURN TO MAIN SYSTEM] button to go back.
bluestork/index.php
That solved that problem, I also had to add some checking [if not my account] dont show cpanel if they mod the url and select /administrator.
If there is a wish list, an admin frontend change invoice would be very cool - keeps the pesky users out of thing they shouldnt be in. -
Accepted Answer
-
Accepted Answer
0Hi,
I stopped working on the frontend stuff, just too difficult and time is against me, but it will be possible youself by creating a few lookup scripts and make changes as you wish.
I have a couple of scripts that do the following:
1) sync my own product table (only 20 records)
$sql="INSERT INTO jos_invoices_templateitems ( `name`,`desc`,`amount`,`value` ) VALUES ";
foreach ( $name as $opscode ){
$x++;
$sql .="('".$opscode->code."','".$opscode->type."',1,'".$opscode->cost."')";
if ( $x < $count ){
$sql.=",";
}
}
2) Add an invoice:
INSERT INTO `masterDB`.`jos_invoices_invoices` (`id`, `created_by`, `user_id`, `added`, `to_name`, `to_address`, `invoice_num`, `real_invoice_num`, `from_name`, `from_address`, `from_num`, `invoice_date`, `publish`, `notes`, `template_id`, `taxes`, `start_publish`, `end_publish`, `currency_before`, `currency_after`, `status`, `to_email`, `to_company`, `from_phone`, `from_url`, `from_email`) VALUES (NULL, '749', '749', '2012-12-12 00:00:00', 'VW BRISTOL', 'THE ADDRESS - GOES THERE', '3 - TEXT', '3', 'FROM NAME FIELD', 'FROM ADDRESS - FIELD', 'fiscal number', '2012-12-13 00:00:00', '1', 'some notes can be added here', '1', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '£', '', 'pending', 'customer@email.com', 'VM BRISTOL', '01733 260000', 'a url field', 'from valet email');
Change the database and the user id '749' to something real.
I found it just easy to use lookups and executing cronjobs to generate invoices.
I have modified the admin template to hide all main menu and so to the customer it appears an extra level of security - when its not.
I will come back in the next few months with my examples to how i've managed the invoices.
I would say other than expensive invoice components this one it a piece of piss to manipulate to get the results you want. -
Accepted Answer
-
Accepted Answer
0[attachment]index.php[/attachment]
I have attached my INDEX.PHP for admin template bluestork, please backup you existing one replace with this one:
You'll need to change the USERID == 749 to the userid of yours.
Create another user and give them access to the admin screen so you can see the menu hidden.
This an ideal interim solution - also I changed the joomla admin login screen to hind everything, I have done a lot of customisation and you would not recognise the install I am using.
Have a play with this and please give feedback
Enjoy -
Accepted Answer
0I could not upload the file so here it is pasted:
/**
* @package Joomla.Administrator
* @subpackage Templates.bluestork
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access.
defined('_JEXEC') or die;
jimport('joomla.filesystem.file');
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$doc->addStyleSheet('templates/system/css/system.css');
$doc->addStyleSheet('templates/'.$this->template.'/css/template.css');
if ($this->direction == 'rtl') {
$doc->addStyleSheet('templates/'.$this->template.'/css/template_rtl.css');
}
/** Load specific language related css */
$lang = JFactory::getLanguage();
$file = 'language/'.$lang->getTag().'/'.$lang->getTag().'.css';
if (JFile::exists($file)) {
$doc->addStyleSheet($file);
}
if ($this->params->get('textBig')) {
$doc->addStyleSheet('templates/'.$this->template.'/css/textbig.css');
}
if ($this->params->get('highContrast')) {
$doc->addStyleSheet('templates/'.$this->template.'/css/highcontrast.css');
}
$user =& JFactory::getUser();
$USERNAME=$user->name;
$USERID=$user->id;
?>
if ( $USERID == 749 ){
echo " ";
}
if ( $USERID == 749 || $USERID == 784 || $USERID == 798){
}else{
echo "You are not authorised to view this";
exit;
}
?>
//Display an harcoded logout
$task = JRequest::getCmd('task');
if ($task == 'edit' || $task == 'editA' || JRequest::getInt('hidemainmenu')) {
$logoutLink = '';
} else {
$logoutLink = JRoute::_('index.php?option=com_login&task=logout&'. JSession::getFormToken() .'=1');
}
$hideLinks = JRequest::getBool('hidemainmenu');
$output = array();
// Print the Preview link to Main site.
$output[] = ''.JText::_('JGLOBAL_VIEW_SITE').'';
// Print the logout link.
$output[] = '' .($hideLinks ? '' : '').JText::_('JLOGOUT').($hideLinks ? '' : '').'';
// Output the items.
foreach ($output as $item) :
echo $item;
endforeach;
?>
Your Reply

Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »