Add php files
This commit is contained in:
30
modules/EcmStockDocIns/copy_old_quotes.php
Executable file
30
modules/EcmStockDocIns/copy_old_quotes.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/*
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$res=$db->query('select * from ecmstockdocins where deleted=0');
|
||||
|
||||
|
||||
while($dane = $db->fetchByAssoc($res)){
|
||||
$t= new EcmTransaction();
|
||||
$t->name = $dane['name'].
|
||||
$t->type=1;
|
||||
$t->value= format_number($dane['total_brutto'],2);
|
||||
$t->currency_id=$dane['currency_id'];
|
||||
$t->type2='5a25aeb2-579d-a779-c597-55f17ec44203';
|
||||
$t->record_type="EcmStockDocIns";
|
||||
$t->record_id=$dane['id'];
|
||||
|
||||
$date = new DateTime($dane['date_fk']);
|
||||
$date->modify("+90 day");
|
||||
|
||||
$t->payment_date=$date->format("d.m.Y");
|
||||
$t->currency_value=$dane['currency_value'];
|
||||
$t->register_date=date("d.m.Y",strtotime($dane['date_fk']));
|
||||
$t->parent_name=$dane['parent_name'];
|
||||
$t->parent_id=$dane['parent_id'];
|
||||
$t->assigned_user_id='3040bf5e6d8ed7c5e86b18c16d1c6be5';
|
||||
$t->save();
|
||||
}
|
||||
*/
|
||||
?>
|
||||
Reference in New Issue
Block a user