phase 2 dev
This commit is contained in:
parent
5a7478907e
commit
ba48745809
59 changed files with 2692 additions and 1994 deletions
|
|
@ -63,13 +63,13 @@ class BookingPDFRepository extends BaseRepository
|
|||
{
|
||||
$document = new stdClass();
|
||||
$document->name = 'registration';
|
||||
$document->number = $this->model->lead_id;
|
||||
$document->number = $this->model->inquiry_id;
|
||||
$document->title = 'BUCHUNGSAUFTRAG';
|
||||
$document->voucher = null;
|
||||
$document->date = now();
|
||||
$document->total = $this->model->getPriceRaw();
|
||||
$dir = $this->getDirPath('pdf', 'booking', $document->date->format('Y'));
|
||||
$filename = "Buchnungsauftrag-" . $this->model->lead_id . ".pdf";
|
||||
$filename = "Buchnungsauftrag-" . $this->model->inquiry_id . ".pdf";
|
||||
$pdf_file = new CreatePDF('pdf.booking_registration');
|
||||
$data = [
|
||||
'booking' => $this->model,
|
||||
|
|
@ -85,7 +85,7 @@ class BookingPDFRepository extends BaseRepository
|
|||
{
|
||||
$document = new stdClass();
|
||||
$document->name = 'confirmation';
|
||||
$document->number = $this->model->lead_id;
|
||||
$document->number = $this->model->inquiry_id;
|
||||
$document->title = 'REISEBESTÄTIGUNG';
|
||||
$document->voucher = null;
|
||||
$document->date = now();
|
||||
|
|
@ -104,7 +104,7 @@ class BookingPDFRepository extends BaseRepository
|
|||
$document->final_payment_date = date('Y-m-d');
|
||||
}
|
||||
$dir = $this->getDirPath('pdf', 'booking', $document->date->format('Y'));
|
||||
$filename = "Reisebestätigung-" . $this->model->lead_id . ".pdf";
|
||||
$filename = "Reisebestätigung-" . $this->model->inquiry_id . ".pdf";
|
||||
|
||||
$pdf_file = new CreatePDF('pdf.booking_confirmation');
|
||||
$data = [
|
||||
|
|
@ -160,14 +160,14 @@ class BookingPDFRepository extends BaseRepository
|
|||
{
|
||||
$document = new stdClass();
|
||||
$document->name = 'voucher';
|
||||
$document->number = $this->model->lead_id;
|
||||
$document->number = $this->model->inquiry_id;
|
||||
$document->name = 'voucher';
|
||||
$document->title = $agency ? 'VOUCHER Agentur' : 'VOUCHER';
|
||||
$document->voucher = $agency ? 'agency' : 'client';
|
||||
$document->date = now();
|
||||
|
||||
$dir = $this->getDirPath('pdf', 'voucher', $document->date->format('Y'));
|
||||
$filename = ($agency ? 'VoucherAgentur' : 'Voucher') . "-" . $this->model->lead_id . ".pdf";
|
||||
$filename = ($agency ? 'VoucherAgentur' : 'Voucher') . "-" . $this->model->inquiry_id . ".pdf";
|
||||
|
||||
$pdf_file = new CreatePDF('pdf.booking_voucher');
|
||||
$data = [
|
||||
|
|
@ -224,7 +224,7 @@ class BookingPDFRepository extends BaseRepository
|
|||
//init document
|
||||
$document = new stdClass();
|
||||
$document->name = $identifier;
|
||||
$document->number = $this->model->lead_id;
|
||||
$document->number = $this->model->inquiry_id;
|
||||
$document->title = 'STORNOBESTÄTIGUNG';
|
||||
$document->voucher = null;
|
||||
$document->date = Carbon::parse($data['storno_print']);
|
||||
|
|
@ -253,7 +253,7 @@ class BookingPDFRepository extends BaseRepository
|
|||
|
||||
|
||||
$dir = $this->getDirPath('pdf', 'storno', $document->date->format('Y'));
|
||||
$filename = "Reisestornierung -" . $this->model->lead_id . ".pdf";
|
||||
$filename = "Reisestornierung -" . $this->model->inquiry_id . ".pdf";
|
||||
|
||||
$pdf_file = new CreatePDF('pdf.booking_storno');
|
||||
$data = [
|
||||
|
|
@ -288,7 +288,9 @@ class BookingPDFRepository extends BaseRepository
|
|||
$fill = [
|
||||
'booking_id' => $this->model->id,
|
||||
'customer_id' => $this->model->customer_id,
|
||||
'lead_id' => $this->model->lead_id,
|
||||
// booking_documents.lead_id ist ein Shadow-Feld von booking.inquiry_id;
|
||||
// die Spalte selbst wird von Phase 2 nicht umbenannt.
|
||||
'lead_id' => $this->model->inquiry_id,
|
||||
'identifier' => $identifier,
|
||||
'filename' => $filename,
|
||||
'dir' => $dir,
|
||||
|
|
|
|||
|
|
@ -157,11 +157,12 @@ class BookingRepository extends BaseRepository
|
|||
{
|
||||
|
||||
$this->model = Booking::findOrFail($id);
|
||||
$this->model->setPriceTotalForCurrentState();
|
||||
$fill = [
|
||||
'deposit_total' => $data['deposit_total'] ? Util::_clean_float($data['deposit_total']) : 0,
|
||||
'final_payment' => $data['final_payment'] ? Util::_clean_float($data['final_payment']) : 0,
|
||||
'final_payment_date' => $data['final_payment_date'] ? _reformat_date($data['final_payment_date']) : null,
|
||||
'price_total' => ($this->model->getPriceRaw() + $this->model->getServiceTotal(true)),
|
||||
'price_total' => $this->model->getPriceTotalRaw(),
|
||||
];
|
||||
$this->model->fill($fill);
|
||||
$this->model->save();
|
||||
|
|
@ -210,7 +211,7 @@ class BookingRepository extends BaseRepository
|
|||
}
|
||||
}
|
||||
}
|
||||
$this->model->price_total = ($this->model->getPriceRaw() + $this->model->getServiceTotal(true));
|
||||
$this->model->setPriceTotalForCurrentState();
|
||||
$this->model->save();
|
||||
|
||||
return $this->model;
|
||||
|
|
|
|||
|
|
@ -135,7 +135,8 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$customer_mail->fill([
|
||||
'booking_id' => $booking->id,
|
||||
'customer_id' => $booking->customer_id,
|
||||
'lead_id' => $booking->lead_id,
|
||||
// customer_mails.lead_id-Spalte bleibt unverändert; Wert kommt aus booking.inquiry_id
|
||||
'lead_id' => $booking->inquiry_id,
|
||||
'is_answer' => $is_answer,
|
||||
'reply_id' => $reply_id,
|
||||
'email' => $mail_from,
|
||||
|
|
@ -153,7 +154,8 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$customer_mail = CustomerMail::create([
|
||||
'booking_id' => $booking->id,
|
||||
'customer_id' => $booking->customer_id,
|
||||
'lead_id' => $booking->lead_id,
|
||||
// customer_mails.lead_id-Spalte bleibt unverändert; Wert kommt aus booking.inquiry_id
|
||||
'lead_id' => $booking->inquiry_id,
|
||||
'is_answer' => $is_answer,
|
||||
'reply_id' => $reply_id,
|
||||
'email' => $mail_from,
|
||||
|
|
@ -300,7 +302,7 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$value->id = $customer_mail->booking_id;
|
||||
$value->booking = $booking;
|
||||
$value->show = 'single';
|
||||
$value->lead_title_id = " - (".$value->booking->lead_id.")";
|
||||
$value->lead_title_id = " - (".$value->booking->inquiry_id.")";
|
||||
|
||||
|
||||
$tmp = [];
|
||||
|
|
@ -342,7 +344,7 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$value->booking = $booking;
|
||||
$value->show = 'single';
|
||||
$value->draft = true;
|
||||
$value->lead_title_id = " - (".$value->booking->lead_id.")";
|
||||
$value->lead_title_id = " - (".$value->booking->inquiry_id.")";
|
||||
|
||||
}else{
|
||||
//multi
|
||||
|
|
@ -379,8 +381,8 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$value->draft = false;
|
||||
$value->booking = $booking;
|
||||
$value->message = "";
|
||||
$value->subject = " - (".$value->booking->lead_id.")";
|
||||
$value->lead_title_id = " - (".$value->booking->lead_id.")";
|
||||
$value->subject = " - (".$value->booking->inquiry_id.")";
|
||||
$value->lead_title_id = " - (".$value->booking->inquiry_id.")";
|
||||
$value->s_placeholder = "Betreff des Kunden";
|
||||
$value->m_placeholder = "Nachricht des Kunden";
|
||||
if(isset($data['customer_mail_id']) && $customer_mail = CustomerMail::find($data['customer_mail_id'])){
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ class LeadRepository extends BaseRepository {
|
|||
$data = [
|
||||
'booking_date' => date('Y-m-d'), //now
|
||||
'customer_id' => $this->model->customer->id,
|
||||
'lead_id' => $this->model->id,
|
||||
'inquiry_id' => $this->model->id,
|
||||
'new_drafts' => 1,
|
||||
'sf_guard_user_id' => $this->model->sf_guard_user_id,
|
||||
'branch_id' => 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue