mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on UBL support
This commit is contained in:
parent
ee03ae7003
commit
861bbbb7d9
@ -24,7 +24,7 @@ class DashboardController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
//dd(dispatch(new \App\Jobs\ConvertInvoiceToUbl(\App\Models\Invoice::find(51))));
|
dd(dispatch(new \App\Jobs\ConvertInvoiceToUbl(\App\Models\Invoice::find(51))));
|
||||||
|
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$viewAll = $user->hasPermission('view_all');
|
$viewAll = $user->hasPermission('view_all');
|
||||||
|
@ -134,6 +134,7 @@ class SubscriptionController extends BaseController
|
|||||||
$subscription = Subscription::scope($subscriptionPublicId)->firstOrFail();
|
$subscription = Subscription::scope($subscriptionPublicId)->firstOrFail();
|
||||||
} else {
|
} else {
|
||||||
$subscription = Subscription::createNew();
|
$subscription = Subscription::createNew();
|
||||||
|
$subscriptionPublicId = $subscription->public_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$validator = Validator::make(Input::all(), $rules);
|
$validator = Validator::make(Input::all(), $rules);
|
||||||
@ -154,6 +155,14 @@ class SubscriptionController extends BaseController
|
|||||||
Session::flash('message', $message);
|
Session::flash('message', $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Redirect::to('subscriptions/' . $subscriptionPublicId . '/edit');
|
return redirect('/settings/api_tokens');
|
||||||
|
|
||||||
|
/*
|
||||||
|
if ($subscriptionPublicId) {
|
||||||
|
return Redirect::to('subscriptions/' . $subscriptionPublicId . '/edit');
|
||||||
|
} else {
|
||||||
|
return redirect('/settings/api_tokens');
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,106 +42,131 @@ class ConvertInvoiceToUbl extends Job
|
|||||||
$ublInvoice->setIssueDate(date_create($invoice->invoice_date));
|
$ublInvoice->setIssueDate(date_create($invoice->invoice_date));
|
||||||
$ublInvoice->setInvoiceTypeCode('SalesInvoice');
|
$ublInvoice->setInvoiceTypeCode('SalesInvoice');
|
||||||
|
|
||||||
// account
|
$supplierParty = $this->createParty($account, $invoice->user);
|
||||||
$supplierParty = new Party();
|
|
||||||
$supplierParty->setName($account->name);
|
|
||||||
$supplierAddress = (new Address())
|
|
||||||
->setCityName($account->city)
|
|
||||||
->setStreetName($account->address1)
|
|
||||||
->setBuildingNumber($account->address2)
|
|
||||||
->setPostalZone($account->postal_code);
|
|
||||||
|
|
||||||
if ($account->country_id) {
|
|
||||||
$country = new Country();
|
|
||||||
$country->setIdentificationCode($account->country->iso_3166_2);
|
|
||||||
$supplierAddress->setCountry($country);
|
|
||||||
}
|
|
||||||
|
|
||||||
$supplierParty->setPostalAddress($supplierAddress);
|
|
||||||
$supplierParty->setPhysicalLocation($supplierAddress);
|
|
||||||
|
|
||||||
$contact = new Contact();
|
|
||||||
$contact->setElectronicMail($invoice->user->email);
|
|
||||||
$supplierParty->setContact($contact);
|
|
||||||
|
|
||||||
$ublInvoice->setAccountingSupplierParty($supplierParty);
|
$ublInvoice->setAccountingSupplierParty($supplierParty);
|
||||||
|
|
||||||
// client
|
$customerParty = $this->createParty($client, $client->contacts[0]);
|
||||||
$customerParty = new Party();
|
|
||||||
$customerParty->setName($client->getDisplayName());
|
|
||||||
$customerAddress = (new Address())
|
|
||||||
->setCityName($client->city)
|
|
||||||
->setStreetName($client->address1)
|
|
||||||
->setBuildingNumber($client->address2)
|
|
||||||
->setPostalZone($client->postal_code);
|
|
||||||
|
|
||||||
if ($client->country_id) {
|
|
||||||
$country = new Country();
|
|
||||||
$country->setIdentificationCode($client->country->iso_3166_2);
|
|
||||||
$customerAddress->setCountry($country);
|
|
||||||
}
|
|
||||||
|
|
||||||
$customerParty->setPostalAddress($customerAddress);
|
|
||||||
$customerParty->setPhysicalLocation($customerAddress);
|
|
||||||
|
|
||||||
$contact = new Contact();
|
|
||||||
$contact->setElectronicMail($client->contacts[0]->email);
|
|
||||||
$customerParty->setContact($contact);
|
|
||||||
|
|
||||||
$ublInvoice->setAccountingCustomerParty($customerParty);
|
$ublInvoice->setAccountingCustomerParty($customerParty);
|
||||||
|
|
||||||
// line items
|
// line items
|
||||||
$invoiceLine = [];
|
$invoiceLine = [];
|
||||||
|
$taxable = $invoice->getTaxable();
|
||||||
|
|
||||||
foreach ($invoice->invoice_items as $index => $item) {
|
foreach ($invoice->invoice_items as $index => $item) {
|
||||||
$invoiceLine = (new InvoiceLine())
|
$itemTaxable = $invoice->getItemTaxable($item, $taxable);
|
||||||
->setId($index + 1)
|
$item->setRelation('invoice', $invoice);
|
||||||
->setInvoicedQuantity($item->qty)
|
$invoiceLines[] = $this->createInvoiceLine($invoice, $index, $item, $itemTaxable);
|
||||||
->setLineExtensionAmount($item->cost)
|
|
||||||
->setItem((new Item())
|
|
||||||
->setName($item->product_key)
|
|
||||||
->setDescription($item->description));
|
|
||||||
//->setSellersItemIdentification("1ABCD"));
|
|
||||||
|
|
||||||
if ($item->tax_name1 || $item->tax_rate1) {
|
|
||||||
$taxtotal = (new TaxTotal())
|
|
||||||
->setTaxAmount(10)
|
|
||||||
->addTaxSubTotal((new TaxSubTotal())
|
|
||||||
->setTaxAmount(10)
|
|
||||||
->setTaxableAmount(100)
|
|
||||||
->setTaxCategory((new TaxCategory())
|
|
||||||
->setId("H")
|
|
||||||
->setName("NL, Hoog Tarief")
|
|
||||||
->setPercent(21.00)));
|
|
||||||
$invoiceLine->setTaxTotal($taxtotal);
|
|
||||||
}
|
|
||||||
|
|
||||||
$invoiceLines[] = $invoiceLine;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$ublInvoice->setInvoiceLines($invoiceLines);
|
$ublInvoice->setInvoiceLines($invoiceLines);
|
||||||
|
|
||||||
if ($invoice->tax_name1 || $invoice->tax_rate1) {
|
if ($invoice->hasTaxes()) {
|
||||||
$taxtotal = (new TaxTotal())
|
$taxtotal = new TaxTotal();
|
||||||
->setTaxAmount(10)
|
$taxAmount1 = $taxAmount2 = 0;
|
||||||
->addTaxSubTotal((new TaxSubTotal())
|
|
||||||
->setTaxAmount(10)
|
if ($item->tax_name1 || $item->tax_rate1) {
|
||||||
->setTaxableAmount(100)
|
$taxAmount1 = $invoice->taxAmount($taxable, $invoice->tax_rate1);
|
||||||
->setTaxCategory((new TaxCategory())
|
$taxtotal->addTaxSubTotal((new TaxSubTotal())
|
||||||
->setId("H")
|
->setTaxAmount($taxAmount1)
|
||||||
->setName("NL, Hoog Tarief")
|
->setTaxableAmount($taxable)
|
||||||
->setPercent(21.00)));
|
->setTaxCategory((new TaxCategory())
|
||||||
|
->setId($item->tax_name1)
|
||||||
|
->setName($item->tax_name1)
|
||||||
|
->setPercent($item->tax_rate1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($item->tax_name2 || $item->tax_rate2) {
|
||||||
|
$itemTaxAmount2 = $invoice->taxAmount($taxable, $invoice->tax_rate2);
|
||||||
|
$taxtotal->addTaxSubTotal((new TaxSubTotal())
|
||||||
|
->setTaxAmount($taxAmount2)
|
||||||
|
->setTaxableAmount($taxable)
|
||||||
|
->setTaxCategory((new TaxCategory())
|
||||||
|
->setId($item->tax_name2)
|
||||||
|
->setName($item->tax_name2)
|
||||||
|
->setPercent($item->tax_rate2)));
|
||||||
|
}
|
||||||
|
|
||||||
|
$taxtotal->setTaxAmount($taxAmount1 + $taxAmount2);
|
||||||
$ublInvoice->setTaxTotal($taxtotal);
|
$ublInvoice->setTaxTotal($taxtotal);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ublInvoice->setLegalMonetaryTotal((new LegalMonetaryTotal())
|
$ublInvoice->setLegalMonetaryTotal((new LegalMonetaryTotal())
|
||||||
->setLineExtensionAmount(100)
|
//->setLineExtensionAmount()
|
||||||
->setTaxExclusiveAmount(100)
|
->setTaxExclusiveAmount($taxable)
|
||||||
->setPayableAmount(-1000)
|
->setPayableAmount($invoice->balance));
|
||||||
->setAllowanceTotalAmount(50));
|
|
||||||
|
|
||||||
return $xmlService->write('Invoice', [
|
return $xmlService->write('Invoice', [
|
||||||
$ublInvoice
|
$ublInvoice
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createParty($company, $user)
|
||||||
|
{
|
||||||
|
$party = new Party();
|
||||||
|
$party->setName($company->name);
|
||||||
|
$address = (new Address())
|
||||||
|
->setCityName($company->city)
|
||||||
|
->setStreetName($company->address1)
|
||||||
|
->setBuildingNumber($company->address2)
|
||||||
|
->setPostalZone($company->postal_code);
|
||||||
|
|
||||||
|
if ($company->country_id) {
|
||||||
|
$country = new Country();
|
||||||
|
$country->setIdentificationCode($company->country->iso_3166_2);
|
||||||
|
$address->setCountry($country);
|
||||||
|
}
|
||||||
|
|
||||||
|
$party->setPostalAddress($address);
|
||||||
|
$party->setPhysicalLocation($address);
|
||||||
|
|
||||||
|
$contact = new Contact();
|
||||||
|
$contact->setElectronicMail($user->email);
|
||||||
|
$party->setContact($contact);
|
||||||
|
|
||||||
|
return $party;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function createInvoiceLine($invoice, $index, $item, $taxable)
|
||||||
|
{
|
||||||
|
$invoiceLine = (new InvoiceLine())
|
||||||
|
->setId($index + 1)
|
||||||
|
->setInvoicedQuantity($item->qty)
|
||||||
|
->setLineExtensionAmount($item->costWithDiscount())
|
||||||
|
->setItem((new Item())
|
||||||
|
->setName($item->product_key)
|
||||||
|
->setDescription($item->description));
|
||||||
|
//->setSellersItemIdentification("1ABCD"));
|
||||||
|
|
||||||
|
if ($item->hasTaxes()) {
|
||||||
|
$taxtotal = new TaxTotal();
|
||||||
|
$itemTaxAmount1 = $itemTaxAmount2 = 0;
|
||||||
|
|
||||||
|
if ($item->tax_name1 || $item->tax_rate1) {
|
||||||
|
$itemTaxAmount1 = $invoice->taxAmount($taxable, $item->tax_rate1);
|
||||||
|
$taxtotal->addTaxSubTotal((new TaxSubTotal())
|
||||||
|
->setTaxAmount($itemTaxAmount1)
|
||||||
|
->setTaxableAmount($taxable)
|
||||||
|
->setTaxCategory((new TaxCategory())
|
||||||
|
->setId($item->tax_name1)
|
||||||
|
->setName($item->tax_name1)
|
||||||
|
->setPercent($item->tax_rate1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($item->tax_name2 || $item->tax_rate2) {
|
||||||
|
$itemTaxAmount2 = $invoice->taxAmount($taxable, $item->tax_rate2);
|
||||||
|
$taxtotal->addTaxSubTotal((new TaxSubTotal())
|
||||||
|
->setTaxAmount($itemTaxAmount2)
|
||||||
|
->setTaxableAmount($taxable)
|
||||||
|
->setTaxCategory((new TaxCategory())
|
||||||
|
->setId($item->tax_name2)
|
||||||
|
->setName($item->tax_name2)
|
||||||
|
->setPercent($item->tax_rate2)));
|
||||||
|
}
|
||||||
|
|
||||||
|
$taxtotal->setTaxAmount($itemTaxAmount1 + $itemTaxAmount2);
|
||||||
|
$invoiceLine->setTaxTotal($taxtotal);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $invoiceLine;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1386,21 +1386,12 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
$paidAmount = $this->getAmountPaid($calculatePaid);
|
$paidAmount = $this->getAmountPaid($calculatePaid);
|
||||||
|
|
||||||
if ($this->tax_name1) {
|
if ($this->tax_name1) {
|
||||||
if ($account->inclusive_taxes) {
|
$invoiceTaxAmount = $this->taxAmount($taxable, $this->tax_rate1);
|
||||||
$invoiceTaxAmount = round(($taxable * 100) / (100 + ($this->tax_rate1 * 100)), 2);
|
|
||||||
} else {
|
|
||||||
$invoiceTaxAmount = round($taxable * ($this->tax_rate1 / 100), 2);
|
|
||||||
}
|
|
||||||
$invoicePaidAmount = floatval($this->amount) && $invoiceTaxAmount ? ($paidAmount / $this->amount * $invoiceTaxAmount) : 0;
|
$invoicePaidAmount = floatval($this->amount) && $invoiceTaxAmount ? ($paidAmount / $this->amount * $invoiceTaxAmount) : 0;
|
||||||
$this->calculateTax($taxes, $this->tax_name1, $this->tax_rate1, $invoiceTaxAmount, $invoicePaidAmount);
|
$this->calculateTax($taxes, $this->tax_name1, $this->tax_rate1, $invoiceTaxAmount, $invoicePaidAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->tax_name2) {
|
if ($this->tax_name2) {
|
||||||
if ($account->inclusive_taxes) {
|
$invoiceTaxAmount = $this->taxAmount($taxable, $this->tax_rate2);
|
||||||
$invoiceTaxAmount = round(($taxable * 100) / (100 + ($this->tax_rate2 * 100)), 2);
|
|
||||||
} else {
|
|
||||||
$invoiceTaxAmount = round($taxable * ($this->tax_rate2 / 100), 2);
|
|
||||||
}
|
|
||||||
$invoicePaidAmount = floatval($this->amount) && $invoiceTaxAmount ? ($paidAmount / $this->amount * $invoiceTaxAmount) : 0;
|
$invoicePaidAmount = floatval($this->amount) && $invoiceTaxAmount ? ($paidAmount / $this->amount * $invoiceTaxAmount) : 0;
|
||||||
$this->calculateTax($taxes, $this->tax_name2, $this->tax_rate2, $invoiceTaxAmount, $invoicePaidAmount);
|
$this->calculateTax($taxes, $this->tax_name2, $this->tax_rate2, $invoiceTaxAmount, $invoicePaidAmount);
|
||||||
}
|
}
|
||||||
@ -1409,21 +1400,12 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
$itemTaxable = $this->getItemTaxable($invoiceItem, $taxable);
|
$itemTaxable = $this->getItemTaxable($invoiceItem, $taxable);
|
||||||
|
|
||||||
if ($invoiceItem->tax_name1) {
|
if ($invoiceItem->tax_name1) {
|
||||||
if ($account->inclusive_taxes) {
|
$itemTaxAmount = $this->taxAmount($itemTaxable, $invoiceItem->tax_rate1);
|
||||||
$itemTaxAmount = round(($itemTaxable * 100) / (100 + ($invoiceItem->tax_rate1 * 100)), 2);
|
|
||||||
} else {
|
|
||||||
$itemTaxAmount = round($itemTaxable * ($invoiceItem->tax_rate1 / 100), 2);
|
|
||||||
}
|
|
||||||
$itemPaidAmount = floatval($this->amount) && $itemTaxAmount ? ($paidAmount / $this->amount * $itemTaxAmount) : 0;
|
$itemPaidAmount = floatval($this->amount) && $itemTaxAmount ? ($paidAmount / $this->amount * $itemTaxAmount) : 0;
|
||||||
$this->calculateTax($taxes, $invoiceItem->tax_name1, $invoiceItem->tax_rate1, $itemTaxAmount, $itemPaidAmount);
|
$this->calculateTax($taxes, $invoiceItem->tax_name1, $invoiceItem->tax_rate1, $itemTaxAmount, $itemPaidAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($invoiceItem->tax_name2) {
|
if ($invoiceItem->tax_name2) {
|
||||||
if ($account->inclusive_taxes) {
|
$itemTaxAmount = $this->taxAmount($itemTaxable, $invoiceItem->tax_rate2);
|
||||||
$itemTaxAmount = round(($itemTaxable * 100) / (100 + ($invoiceItem->tax_rate2 * 100)), 2);
|
|
||||||
} else {
|
|
||||||
$itemTaxAmount = round($itemTaxable * ($invoiceItem->tax_rate2 / 100), 2);
|
|
||||||
}
|
|
||||||
$itemPaidAmount = floatval($this->amount) && $itemTaxAmount ? ($paidAmount / $this->amount * $itemTaxAmount) : 0;
|
$itemPaidAmount = floatval($this->amount) && $itemTaxAmount ? ($paidAmount / $this->amount * $itemTaxAmount) : 0;
|
||||||
$this->calculateTax($taxes, $invoiceItem->tax_name2, $invoiceItem->tax_rate2, $itemTaxAmount, $itemPaidAmount);
|
$this->calculateTax($taxes, $invoiceItem->tax_name2, $invoiceItem->tax_rate2, $itemTaxAmount, $itemPaidAmount);
|
||||||
}
|
}
|
||||||
@ -1432,6 +1414,17 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
return $taxes;
|
return $taxes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function taxAmount($taxable, $rate)
|
||||||
|
{
|
||||||
|
$account = $this->account;
|
||||||
|
|
||||||
|
if ($account->inclusive_taxes) {
|
||||||
|
return round(($taxable * 100) / (100 + ($rate * 100)), 2);
|
||||||
|
} else {
|
||||||
|
return round($taxable * ($rate / 100), 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $taxes
|
* @param $taxes
|
||||||
* @param $name
|
* @param $name
|
||||||
@ -1589,6 +1582,20 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasTaxes()
|
||||||
|
{
|
||||||
|
if ($this->tax_name1 || $this->tax_rate1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->tax_name2 || $this->tax_rate2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Invoice::creating(function ($invoice) {
|
Invoice::creating(function ($invoice) {
|
||||||
|
@ -107,4 +107,33 @@ class InvoiceItem extends EntityModel
|
|||||||
$this->save();
|
$this->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasTaxes()
|
||||||
|
{
|
||||||
|
if ($this->tax_name1 || $this->tax_rate1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->tax_name2 || $this->tax_rate2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function costWithDiscount()
|
||||||
|
{
|
||||||
|
$cost = $this->cost;
|
||||||
|
|
||||||
|
if ($this->discount != 0) {
|
||||||
|
if ($this->invoice->is_amount_discount) {
|
||||||
|
$cost -= $discount / $this->qty;
|
||||||
|
} else {
|
||||||
|
$cost -= $cost * $discount / 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $cost;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
10
composer.lock
generated
10
composer.lock
generated
@ -1085,16 +1085,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "cleverit/ubl_invoice",
|
"name": "cleverit/ubl_invoice",
|
||||||
"version": "v1.0",
|
"version": "v1.0.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/CleverIT/UBL_invoice.git",
|
"url": "https://github.com/CleverIT/UBL_invoice.git",
|
||||||
"reference": "3c4ec1dd8dc826d6c8302e191565b8ac1a947022"
|
"reference": "8b98ed26b975cae24eea319f3f2cefd82add735e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/CleverIT/UBL_invoice/zipball/3c4ec1dd8dc826d6c8302e191565b8ac1a947022",
|
"url": "https://api.github.com/repos/CleverIT/UBL_invoice/zipball/8b98ed26b975cae24eea319f3f2cefd82add735e",
|
||||||
"reference": "3c4ec1dd8dc826d6c8302e191565b8ac1a947022",
|
"reference": "8b98ed26b975cae24eea319f3f2cefd82add735e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1133,7 +1133,7 @@
|
|||||||
"xml",
|
"xml",
|
||||||
"xml invoice"
|
"xml invoice"
|
||||||
],
|
],
|
||||||
"time": "2018-01-11 19:26:20"
|
"time": "2018-01-13 00:27:05"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "codedge/laravel-selfupdater",
|
"name": "codedge/laravel-selfupdater",
|
||||||
|
@ -2649,6 +2649,7 @@ $LANG = array(
|
|||||||
'signature_on_pdf_help' => 'Show the client signature on the invoice/quote PDF.',
|
'signature_on_pdf_help' => 'Show the client signature on the invoice/quote PDF.',
|
||||||
'expired_white_label' => 'The white label license has expired',
|
'expired_white_label' => 'The white label license has expired',
|
||||||
'return_to_login' => 'Return to Login',
|
'return_to_login' => 'Return to Login',
|
||||||
|
'beta' => 'Beta',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
])) : false) !!}
|
])) : false) !!}
|
||||||
|
|
||||||
{!! Former::checkbox('ubl_email_attachment')
|
{!! Former::checkbox('ubl_email_attachment')
|
||||||
->text(trans('texts.enable'))
|
->text(trans('texts.enable') . ' [' . trans('texts.beta') . ']')
|
||||||
->value(1) !!}
|
->value(1) !!}
|
||||||
|
|
||||||
{!! Former::checkbox('document_email_attachment')
|
{!! Former::checkbox('document_email_attachment')
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{!! Former::open($url)->method($method)->addClass('warn-on-exit')->rules(array(
|
{!! Former::open($url)->method($method)->addClass('warn-on-exit')->rules(array(
|
||||||
'event_id' => 'required',
|
'event_id' => 'required',
|
||||||
'target_url' => 'required|url',
|
'target_url' => 'required|url',
|
||||||
'format' => 'required',
|
//'format' => 'required',
|
||||||
)); !!}
|
)); !!}
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
@ -63,13 +63,15 @@
|
|||||||
{!! Former::text('target_url')
|
{!! Former::text('target_url')
|
||||||
->placeholder('https://example.com')!!}
|
->placeholder('https://example.com')!!}
|
||||||
|
|
||||||
|
<!--
|
||||||
{!! Former::select('format')
|
{!! Former::select('format')
|
||||||
->options([
|
->options([
|
||||||
SUBSCRIPTION_FORMAT_JSON => SUBSCRIPTION_FORMAT_JSON,
|
SUBSCRIPTION_FORMAT_JSON => SUBSCRIPTION_FORMAT_JSON,
|
||||||
SUBSCRIPTION_FORMAT_UBL => SUBSCRIPTION_FORMAT_UBL
|
SUBSCRIPTION_FORMAT_UBL => SUBSCRIPTION_FORMAT_UBL
|
||||||
])
|
])
|
||||||
->help('target_url_help') !!}
|
->help('target_url_help') !!}
|
||||||
|
-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user