';
}
@@ -3570,6 +3646,8 @@ if ($action == 'create')
// Lines from source (TODO Show them also when creating invoice from template invoice)
if (!empty($origin) && !empty($originid) && is_object($objectsrc))
{
+ $langs->loadLangs(array('orders', 'propal'));
+
// TODO for compatibility
if ($origin == 'contrat') {
// Calcul contrat->price (HT), contrat->total (TTC), contrat->tva
@@ -3578,13 +3656,12 @@ if ($action == 'create')
$objectsrc->update_price(1, - 1, 1);
}
- print "\n";
- print "\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print '';
- print '';
+ print "\n\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print '';
+ print '';
switch (get_class($objectsrc)) {
case 'Propal':
@@ -3606,13 +3683,16 @@ if ($action == 'create')
$newclassname = get_class($objectsrc);
}
- print '
'.$langs->trans($newclassname).'
'.$objectsrc->getNomUrl(1);
+ // Ref of origin
+ print '
'.$langs->trans($newclassname).'
';
+ print '
';
+ print $objectsrc->getNomUrl(1);
// We check if Origin document (id and type is known) has already at least one invoice attached to it
$objectsrc->fetchObjectLinked($originid, $origin, '', 'facture');
if (is_array($objectsrc->linkedObjects['facture']) && count($objectsrc->linkedObjects['facture']) >= 1)
{
setEventMessages('WarningBillExist', null, 'warnings');
- echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['facture'])->getNomUrl(1).')';
+ echo ' - '.$langs->trans('LatestRelatedBill').' '.end($objectsrc->linkedObjects['facture'])->getNomUrl(1);
}
echo '
';
print '
'.$langs->trans('AmountHT').'
'.price($objectsrc->total_ht).'
';
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index 45246dcc412..1060c02ce96 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -413,7 +413,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month
FixAmount=Fixed amount - 1 line with label '%s'
VarAmount=Variable amount (%% tot.)
VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s'
-VarAmountAllLines=Variable amount (%% tot.) - all same lines
+VarAmountAllLines=Variable amount (%% tot.) - all lines from origin
# PaymentType
PaymentTypeVIR=Bank transfer
PaymentTypeShortVIR=Bank transfer
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 545fcdb62fb..9e56c5f5c3a 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -258,6 +258,8 @@ ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must
ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page
ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation
ErrorDateIsInFuture=Error, the date can't be in the future
+ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory
+ErrorAPercentIsRequired=Error, please fill in the percentage correctly
# Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index f7c55df211f..67544b46328 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -389,6 +389,8 @@ AmountTotal=Total amount
AmountAverage=Average amount
PriceQtyMinHT=Price quantity min. (excl. tax)
PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency)
+PercentOfOriginalObject=Percent of original object
+AmountOrPercent=Amount or percent
Percentage=Percentage
Total=Total
SubTotal=Subtotal