WIP PreorderBilling 2025-03-26
This commit is contained in:
@@ -27,6 +27,25 @@ $pagination_entity_name = "Vorbestellungen";
|
||||
max-width: 650px;
|
||||
}
|
||||
|
||||
.is-billed-button {
|
||||
padding:6px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
background-color: #25b343;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.set-billed-button {
|
||||
padding:6px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
border: 1px solid #d0d0d0;
|
||||
}
|
||||
.set-billed-button:hover {
|
||||
background-color: #007bff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 1720px) {
|
||||
.preorder-filters .col-sm-12 {
|
||||
@@ -477,7 +496,19 @@ $pagination_entity_name = "Vorbestellungen";
|
||||
<span id="update-<?=$preorder->id?>"><?=date('d.m.Y H:i', $preorder->edit)?></span>
|
||||
</td>
|
||||
|
||||
<td><?php if($preorder->adb_wohneinheit_id && is_array($preorder->adb_wohneinheit->rimo_workorders) && count($preorder->adb_wohneinheit->rimo_workorders)):?><i class="fas fa-r" title="Rimo Workorder erstellt"></i><?php endif; ?></td>
|
||||
<td class="text-nowrap">
|
||||
<?php if(!$me->address->hasPreorderBilling()): ?>
|
||||
<?php if($preorder->adb_wohneinheit_id && $preorder->adb_wohneinheit->enduser_setup_invoice_date): ?>
|
||||
<i class="fas fa-euro is-billed-button" title="Herstellungsentgelt verrechnet am <?=(new DateTime($preorder->adb_wohneinheit->enduser_setup_invoice_date))->format("d.m.Y")?>"></i>
|
||||
<?php else: ?>
|
||||
<a href="#" class="text-muted" onclick="setBilled(<?=$preorder->id?>)"><i class="fas fa-euro set-billed-button" title="Herstellungsentgelt als verrechnet markieren"></i></a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($preorder->adb_wohneinheit_id && is_array($preorder->adb_wohneinheit->rimo_workorders) && count($preorder->adb_wohneinheit->rimo_workorders)):?>
|
||||
<i class="fas fa-r p-1" title="Rimo Workorder erstellt"></i>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<div class="preorder-campaign-table-actions">
|
||||
<?php if(!$me->is(["preorderfront"]) && !$me->is("preorderreadonly")): ?>
|
||||
@@ -595,6 +626,22 @@ $pagination_entity_name = "Vorbestellungen";
|
||||
});
|
||||
});
|
||||
|
||||
function setBilled(pid) {
|
||||
if(!pid) return;
|
||||
|
||||
$.post("<?=self::getUrl("Preorder", "Api")?>", {
|
||||
do: "setBilled",
|
||||
id: pid
|
||||
},
|
||||
function(success) {
|
||||
if(success.status == "OK") {
|
||||
$("#preorder-" + pid + " .set-billed-button").parent().html("<i class='fas fa-euro is-billed-button' title='Herstellungsentgelt verrechnet am " + success.result.date + "'></i>");
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
}
|
||||
|
||||
function attributeSuccess(result) {
|
||||
var id = result.id
|
||||
var attribute = result.attribute
|
||||
|
||||
Reference in New Issue
Block a user