order items
This commit is contained in:
parent
2b9f1cd78c
commit
41e345b646
|
|
@ -9,7 +9,7 @@ class UsersAddPermission2 extends Migration
|
||||||
{
|
{
|
||||||
Schema::table('users', function($table)
|
Schema::table('users', function($table)
|
||||||
{
|
{
|
||||||
$table->text('permission2')->default('[{"code":"dashboard"},{"code":"producedStocks"},{"code":"bagActions"},{"code":"rulonActions"},{"code":"rawStocks"},{"code":"rawActions"},{"code":"extrudorProduction"},{"code":"productionRulon"},{"code":"sewerProduction"},{"code":"orders"},{"code":"acceptAccountant"},{"code":"rawActionsCrud"},{"code":"crudExtrudor"},{"code":"inboxProductionRulon"},{"code":"crudProductionRulon"},{"code":"crudSewerProduction"},{"code":"crudOrders"}]')->nullable();
|
$table->text('permission2')->nullable();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -280,6 +280,7 @@ class Order extends ComponentBase
|
||||||
<td style="font-weight: bold;">' . ($x + 1) . '</td>
|
<td style="font-weight: bold;">' . ($x + 1) . '</td>
|
||||||
<td><a href="/order-detail/' . $orderDatas[$x]->id . '" style="font-weight: bold;">Sargyt #' . $orderDatas[$x]->id . '</a></td>
|
<td><a href="/order-detail/' . $orderDatas[$x]->id . '" style="font-weight: bold;">Sargyt #' . $orderDatas[$x]->id . '</a></td>
|
||||||
<td><a href="/order-detail/' . $orderDatas[$x]->id . '" style="font-weight: bold;">' . $orderDatas[$x]->client->name . '</a></td>
|
<td><a href="/order-detail/' . $orderDatas[$x]->id . '" style="font-weight: bold;">' . $orderDatas[$x]->client->name . '</a></td>
|
||||||
|
<td>' . ($orderDatas[$x]->contract_no ?? "") . '</td>
|
||||||
<td>' . $orderDatas[$x]->client->country . '</td>
|
<td>' . $orderDatas[$x]->client->country . '</td>
|
||||||
<td><span class="badge badge-soft-primary"
|
<td><span class="badge badge-soft-primary"
|
||||||
style="font-size: 14px;">' . number_format($orderDatas[$x]->order_all_price) . ' $</span>
|
style="font-size: 14px;">' . number_format($orderDatas[$x]->order_all_price) . ' $</span>
|
||||||
|
|
@ -1188,6 +1189,7 @@ class Order extends ComponentBase
|
||||||
$createOrder = new OrderModel();
|
$createOrder = new OrderModel();
|
||||||
$createOrder->client_id = $data["client_id"];
|
$createOrder->client_id = $data["client_id"];
|
||||||
$createOrder->note = $data["note"];
|
$createOrder->note = $data["note"];
|
||||||
|
$createOrder->contract_no = $data["contract_no"];
|
||||||
$createOrder->shipping_id = 0;
|
$createOrder->shipping_id = 0;
|
||||||
$createOrder->user_id = $user->id;
|
$createOrder->user_id = $user->id;
|
||||||
$createOrder->save();
|
$createOrder->save();
|
||||||
|
|
|
||||||
|
|
@ -70,9 +70,9 @@ class OrderItem extends ComponentBase
|
||||||
|
|
||||||
if($stockCalc > 0){
|
if($stockCalc > 0){
|
||||||
|
|
||||||
$notCompleteCalc = '<font style="color: darkgreen;"> +'.($stockCalc - $amountCalc).' artyk</font>';
|
$notCompleteCalc = '<font style="color: darkgreen;"> +'.number_format(($stockCalc - $amountCalc), 2).' artyk</font>';
|
||||||
}else{
|
}elseif($stockCalc < 0){
|
||||||
$notCompleteCalc = '<font style="color: darkred;">'.($stockCalc - $amountCalc).' ýetenok</font>';
|
$notCompleteCalc = '<font style="color: darkred;">'.number_format(($stockCalc - $amountCalc), 2).' ýetenok</font>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -109,9 +109,9 @@ class OrderItem extends ComponentBase
|
||||||
|
|
||||||
if($stockCalc > 0){
|
if($stockCalc > 0){
|
||||||
|
|
||||||
$notCompleteCalc = '<font style="color: darkgreen;"> +'.($stockCalc - $amountCalc).' artyk</font>';
|
$notCompleteCalc = '<font style="color: darkgreen;"> +'.number_format(($stockCalc - $amountCalc), 2).' artyk</font>';
|
||||||
}else{
|
}elseif($stockCalc < 0){
|
||||||
$notCompleteCalc = '<font style="color: darkred;">'.($stockCalc - $amountCalc).' ýetenok</font>';
|
$notCompleteCalc = '<font style="color: darkred;">'.number_format(($stockCalc - $amountCalc), 2).' ýetenok</font>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php namespace Romanah\Gokbakja\Updates;
|
||||||
|
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableUpdateRomanahGokbakjaOrder8 extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('romanah_gokbakja_order', function($table)
|
||||||
|
{
|
||||||
|
$table->string('contract_no')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('romanah_gokbakja_order', function($table)
|
||||||
|
{
|
||||||
|
$table->dropColumn('contract_no');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -357,3 +357,6 @@
|
||||||
1.0.120:
|
1.0.120:
|
||||||
- 'Created table romanah_gokbakja_user_permission'
|
- 'Created table romanah_gokbakja_user_permission'
|
||||||
- builder_table_create_romanah_gokbakja_user_permission.php
|
- builder_table_create_romanah_gokbakja_user_permission.php
|
||||||
|
1.0.121:
|
||||||
|
- 'Updated table romanah_gokbakja_order'
|
||||||
|
- builder_table_update_romanah_gokbakja_order_8.php
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ function onStart(){
|
||||||
|
|
||||||
$link = $this->page["url"];
|
$link = $this->page["url"];
|
||||||
|
|
||||||
|
if(\Auth::user()){
|
||||||
$acceptPermissions = \Auth::user()->permission2;
|
$acceptPermissions = \Auth::user()->permission2;
|
||||||
|
|
||||||
$this["isDirector"] = false;
|
$this["isDirector"] = false;
|
||||||
|
|
@ -93,7 +94,7 @@ function onStart(){
|
||||||
$this["rawActions"] = true;
|
$this["rawActions"] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
==
|
==
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,13 @@ function onStart(){
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
|
<div>
|
||||||
|
<label class="form-label">Şertnama Nomeri</label>
|
||||||
|
<input type="text" name="contract_no" class="form-control" placeholder="Şertnama Nomeri">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div>
|
<div>
|
||||||
<label class="form-label">Bellik</label>
|
<label class="form-label">Bellik</label>
|
||||||
|
|
@ -98,6 +105,7 @@ function onStart(){
|
||||||
<th style="width: 5%;">№</th>
|
<th style="width: 5%;">№</th>
|
||||||
<th>Sargyt No</th>
|
<th>Sargyt No</th>
|
||||||
<th>Klent</th>
|
<th>Klent</th>
|
||||||
|
<th>Şertnama Nomeri</th>
|
||||||
<th>Ýurdy</th>
|
<th>Ýurdy</th>
|
||||||
<th>Bahasy</th>
|
<th>Bahasy</th>
|
||||||
<th>Tölenen</th>
|
<th>Tölenen</th>
|
||||||
|
|
@ -115,6 +123,7 @@ function onStart(){
|
||||||
<th style="width: 5%;">№</th>
|
<th style="width: 5%;">№</th>
|
||||||
<th>Sargyt No</th>
|
<th>Sargyt No</th>
|
||||||
<th>Klent</th>
|
<th>Klent</th>
|
||||||
|
<th>Şertnama Nomeri</th>
|
||||||
<th>Ýurdy</th>
|
<th>Ýurdy</th>
|
||||||
<th>Bahasy</th>
|
<th>Bahasy</th>
|
||||||
<th>Tölenen</th>
|
<th>Tölenen</th>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue