added submodule saimod_webcraft_billing_satelite, corrected autoloads
This commit is contained in:
parent
b95f8dd8d9
commit
8e2f6d330c
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
||||
[submodule "lib/system"]
|
||||
path = lib/system
|
||||
url = git@mojotrollz.eu:system.git
|
||||
[submodule "danube/sai/saimod_webcraft_billing_satelite"]
|
||||
path = danube/sai/saimod_webcraft_billing_satelite
|
||||
url = git@mojotrollz.eu:webcraft/saimod_webcraft_billing_satelite.git
|
||||
|
||||
@ -1,3 +1,2 @@
|
||||
<?php
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_webcraft_billing_satelite','');
|
||||
\SYSTEM\SAI\sai::register('saimod_webcraft_billing_satelite');
|
||||
require_once dirname(__FILE__).'/saimod_webcraft_billing_satelite/autoload.inc';
|
||||
1
danube/sai/saimod_webcraft_billing_satelite
Submodule
1
danube/sai/saimod_webcraft_billing_satelite
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 78e98ddddf1d8b182ffe3315db1326827b32321b
|
||||
@ -1,8 +0,0 @@
|
||||
td.customer_details {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.olPopup {
|
||||
background: red;
|
||||
width: 1000px;
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
function init_saimod_webcraft_billing_satelite() {
|
||||
$('#billingtab a').click(function (e) {e.preventDefault(); $(this).tab('show');});
|
||||
}
|
||||
@ -1,43 +0,0 @@
|
||||
<?php
|
||||
class saimod_webcraft_billing_satelite extends \SYSTEM\SAI\SaiModule {
|
||||
public static function sai_mod_saimod_webcraft_billing_satelite(){
|
||||
$token = \SYSTEM\CONFIG\config::get(config_ids::WEBCRAFT_BILLING_TOKEN);
|
||||
$billing = json_decode(file_get_contents('http://mojotrollz.eu/web/webcraft/api.php?call=billing&action=billing&token='.$token),true);
|
||||
$project = json_decode(file_get_contents('http://mojotrollz.eu/web/webcraft/api.php?call=billing&action=project&token='.$token),true);
|
||||
$customer = json_decode(file_get_contents('http://mojotrollz.eu/web/webcraft/api.php?call=billing&action=customer&token='.$token),true);
|
||||
|
||||
$vars = array('content_project' => '');
|
||||
if($project['status']){
|
||||
foreach($project['result'] as $row){
|
||||
$row['customer_company'] = $row['customer_company'] == "" ? $row['customer_company'] = "" : $row['customer_company'] .= " - ";
|
||||
$vars['content_project'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(),'saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_project.tpl'), $row);}
|
||||
}
|
||||
|
||||
$vars['content_billing'] = '';
|
||||
if($billing['status']){
|
||||
foreach($billing['result'] as $row){
|
||||
$row['pdf_link'] = './sai.php?sai_mod=saimod_webcraft_billing_satelite&action=getpdf&billid='.$row['ID'];
|
||||
$row['state'] = $row['payed_date'] == "0000-00-00 00:00:00" ? "important" : "success";
|
||||
$vars['content_billing'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(),'saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_billing.tpl'), $row);}
|
||||
}
|
||||
|
||||
if($customer['status']){
|
||||
$vars = array_merge($vars,$customer['result']);}
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(),'saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl'), $vars);}
|
||||
|
||||
public static function sai_mod_saimod_webcraft_billing_satelite_action_getpdf($billid){
|
||||
$token = \SYSTEM\CONFIG\config::get(config_ids::WEBCRAFT_BILLING_TOKEN);
|
||||
header("Content-type: application/pdf");
|
||||
return file_get_contents('http://mojotrollz.eu/web/webcraft/api.php?call=billing&action=bill&token='.$token.'&ID='.$billid);}
|
||||
|
||||
public static function html_li_menu(){return '<li><a href="#" saimenu="saimod_webcraft_billing_satelite">Rechnungen</a></li><li class="divider"></li>';}
|
||||
public static function right_public(){return false;}
|
||||
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
||||
public static function sai_mod_saimod_webcraft_billing_satelite_flag_js(){
|
||||
return \SYSTEM\LOG\JsonResult::toString(
|
||||
array( \SYSTEM\WEBPATH(new PSAI(),'saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.js')));}
|
||||
public static function sai_mod_saimod_webcraft_billing_satelite_flag_css(){
|
||||
return \SYSTEM\LOG\JsonResult::toString(
|
||||
array( \SYSTEM\WEBPATH(new PSAI(),'saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.css')));}
|
||||
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
<h4>Verwaltung</h4>
|
||||
<hr>
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-tabs" id="billingtab">
|
||||
<li class="active"><a href="#tab_billing">Rechnungen</a></li>
|
||||
<li><a href="#tab_project">Projekte</a></li>
|
||||
<li><a href="#tab_customer">Kundeninformation</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_billing">
|
||||
<table class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
||||
<tr>
|
||||
<th>Rechnungsnummer</th>
|
||||
<th>Projekt</th>
|
||||
<th>Datum</th>
|
||||
<th>PDF</th>
|
||||
<th>Betrag</th>
|
||||
<th>Bezahlt am</th>
|
||||
</tr>
|
||||
${content_billing}
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab_project">
|
||||
<table class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Nutzer</th>
|
||||
<th>Firma</th>
|
||||
<th>seit</th>
|
||||
<th>URL</th>
|
||||
<th>Serverpfad</th>
|
||||
<th>token</th>
|
||||
</tr>
|
||||
${content_project}
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab_customer">
|
||||
<table class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
||||
<tr>
|
||||
<td class="customer_details">Nutzer ID</td>
|
||||
<td>${ID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="customer_details">Firma</td>
|
||||
<td>${company}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="customer_details">Vorname</td>
|
||||
<td>${name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="customer_details">Nachname</td>
|
||||
<td>${name_last}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="customer_details">Addresse</td>
|
||||
<td>${address}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="customer_details">Beigetreten</td>
|
||||
<td>${join}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,8 +0,0 @@
|
||||
<tr>
|
||||
<td>${ID}</td>
|
||||
<td>${project_name}</td>
|
||||
<td>${date}</td>
|
||||
<td><a href="${pdf_link}" target="_blank">PDF</a></td>
|
||||
<td>${balance} €</td>
|
||||
<td><span class="badge badge-${state}">${payed_date}</span></td>
|
||||
</tr>
|
||||
@ -1,9 +0,0 @@
|
||||
<tr>
|
||||
<td>${ID}</td>
|
||||
<td>${customer_company}${customer_name} ${customer_name_last}</td>
|
||||
<td>${name}</td>
|
||||
<td>${date}</td>
|
||||
<td><a href="${url}" target="_blank">${url}</a></td>
|
||||
<td>${path}</td>
|
||||
<td>${token}</td>
|
||||
</tr>
|
||||
@ -1,2 +0,0 @@
|
||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5100, 42, 0, 0, 'saimod_webcraft_billing_satelite', 'action', NULL);
|
||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5101, 42, 2, 5100, 'getpdf', 'billid', 'UINT');
|
||||
Reference in New Issue
Block a user