For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
<?php $form = $this->form;
//echo "<pre>";print_r(array_keys($this->groups));echo "</pre>";
$group = $this->groups['Fabub My Invoices'];
$subGroup = $this->groups['Fabsub My Invoices- [jos_fabrik_subs_subscriptions]'];
$elements = $group->elements;
$subElements = $subGroup->elements;
//print_r($subElements['userid']);exit;
//$thisUser = JFactory::getUser($subElements['userid']->value);
$thisUser = JFactory::getUser($subElements['userid']->element_raw);
//print_r($thisUser);exit;
?>
<form method="post" <?php echo $form->attribs?>>
<?php
echo $this->plugintop;
$active = ($form->error != '') ? '' : ' fabrikHide';
echo "<div class='fabrikMainError fabrikError$active'>" . $form->error . "</div>";?>
<?php
if ($this->showEmail) {
echo $this->emailLink;
}
if ($this->showPDF) {
echo $this->pdfLink;
}
?>
<div class="page-header">
<h1>Invoice <small><button class="btn pull-right" onclick="window.print();return false;"><i class="icon-print"></i> Print</button></small></h1>
</div>
<div class="row-fluid">
<div class="span12" id="addresswidget">
<p><i class="icon-info-sign"></i> Please enter your address below and press 'Update address' to insert your address into your invoice</p>
<textarea id="newaddress" cols="30" rows="4"><?php echo $thisUser->get('name'); ?></textarea>
<br /><button type="button" class="btn" id="addaddress" ><i class="icon-home"></i> Update address</button>
</div>
</div>
<div class="row-fluid">
<div class="span9">
<dl>
<dt>To:<a href="#" id="editAddress"><small>[edit]</small></a></dt>
<dd>
<div id="address"><?php echo $thisUser->get('name'); ?></div></dd>
<dt>Invoice number</dt>
<dd><?php echo $elements['invoice_number']->element_ro?></dd>
<dt>Date</dt>
<dd><?php echo $elements['created_date']->element_ro?></dd>
</dl>
</div>
<div class="span3">
<img src="http://fabrikar.com/templates/fabrik4/images/logo.png" alt="Fabrikar" />
<ul>
<li>Fabrikar</li>
<li>22 Rue De Vautreuil</li>
<li>17000</li>
<li>La Rochelle</li>
<li>France</li>
<li>Numero Siret: 48413910000024</li>
</ul>
</div>
</div>
<table class="invoice_details">
<tbody>
<tr>
<td>1</td>
<td>
Fabrik Subscription:
<?php echo $subElements['plan']->element_ro ." (" .$subElements['type']->element_ro . ")"?>
<td>
<?php echo money_format('%i',$elements['amount']->element_ro)?> <?php echo $elements['currency']->element_ro?>
</td>
</tr>
</tbody>
<thead>
<tr>
<td>Quantity</td>
<td>Item</td>
<td>Amount</td>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="2" style="text-align:right">
Total Net:
</td>
<td>
<?php echo money_format('%i',$elements['amount']->element_ro)?> <?php echo $elements['currency']->element_ro?>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:right">
Total VAT Amount:
</td>
<td>
0.00
</td>
</tr>
<tr>
<td colspan="2" style="text-align:right">
Invoice total:
</td>
<td>
<?php echo money_format('%i',$elements['amount']->element_ro)?> <?php echo $elements['currency']->element_ro?>
</td>
</tr>
</tfoot>
</table>
<?php
echo $this->hiddenFields;
?>
<?php echo $this->pluginbottom; ?>
<div class="fabrikActions"><?php echo $form->resetButton;?> <?php echo $form->submitButton;?>
<?php echo $form->copyButton . " " . $form->gobackButton . ' ' .$this->message ?>
</div>
</form>
<?php
echo FabrikHelperHTML::keepalive();?>
<?php
header('Content-type: text/css');
$c = (int)$_REQUEST['c'];
$view = isset($_REQUEST['view']) ? $_REQUEST['view'] : 'form';
echo ".invoice_details td{
padding:5px;
}
.invoice_details{
clear:both;
width:100%;
border:1px solid #999;
}
.invoice_details thead td{
background-color:#999;
color:#fff;
}
.invoice_details{
border-collapse:collapse;
}
.invoice_details tfoot td{
background-color:#efefef;
}
.fabrikForm {
background-color:#fff;
padding:10px;
}
.fabrikForm ul{
list-style:none;
}
.fabrikForm dt{
width:150px;
float:left;
clear:left;
}
.fabrikForm dt,
.fabrikForm dd,
.fabrikForm li{
padding:2px 0;
}
@media print{
#addresswidget, #header, .moduletable, #footer, #footer2{
display:none;
}
}";?>